def make_service(api, version, credentials_path=None):
 if credentials_path:
  credentials = ServiceAccountCredentials.from_json_keyfile_name(credentials_path, scopes=PLATFORM_FULL_SCOPE)
 else:
  credentials = GoogleCredentials.get_application_default()
 http = credentials.authorize(httplib2.Http())
 return apiclient.discovery.build(api, version, http=http)

def make_service ( api , version , credentials_path = None ) : if credentials_path : credentials = ServiceAccountCredentials . from_json_keyfile_name ( credentials_path , scopes = PLATFORM_FULL_SCOPE ) else : credentials = GoogleCredentials . get_application_default ( ) http = credentials . authorize ( httplib2 . Http ( ) ) return apiclient . discovery . build ( api , version , http = http )
factory method for creating a new stackdrivermetricsservice .