コード例 #1
0
 def __init__(self, project_id, credentials_path=None):
     LOGGER.debug("Initializing Stackdriver Logging API ...")
     self.api = auth.build_service(
         api='logging',
         version=StackdriverExporter.LOGGING_API_VERSION,
         credentials_path=credentials_path,
         scopes=StackdriverExporter.SCOPES)
     self.project_id = "projects/{}".format(project_id)
コード例 #2
0
    def __init__(self, gsuite_admin, credentials_path=None):
        self.api_name = 'reports_{}'.format(
            AdminReportsAPIFetcher.REPORTS_API_VERSION)

        logger.debug("Initializing Admin API '{}' ...".format(self.api_name))
        self.api = auth.build_service(api='admin',
                                      version=self.api_name,
                                      credentials_path=credentials_path,
                                      user_email=gsuite_admin,
                                      scopes=AdminReportsAPIFetcher.SCOPES)