def list_accounts(): """Lists the Google Analytics accounts available to the current user.""" client = AnalyticsAdminServiceClient() results = client.list_accounts() print("Result:") for account in results: print_account(account)
def list_accounts(): """Lists the available Google Analytics accounts.""" from google.analytics.admin import AnalyticsAdminServiceClient # Using a default constructor instructs the client to use the credentials # specified in GOOGLE_APPLICATION_CREDENTIALS environment variable. client = AnalyticsAdminServiceClient() # Displays the configuration information for all Google Analytics accounts # available to the authenticated user. for account in client.list_accounts(): print(account)