Python Google My Business V1 Error - AttributeError: 'Resource' object has no attribute 'locations'
Python Google My Business V1 Error - AttributeError: 'Resource' object has no attribute 'locations'
我正在尝试通过 API.
在 Google 我的公司中获取本地帐户下的列表
CLIENT_SECRETS_FILE = "client_secret.json"
SCOPES = ["https://www.googleapis.com/auth/business.manage"]
API_SERVICE_NAME = "mybusiness"
API_VERSION = "v1"
service = googleapiclient.discovery.build(
API_SERVICE_NAME,
API_VERSION,
credentials=credentials,
discoveryServiceUrl="https://mybusinessaccountmanagement.googleapis.com/$discovery/rest?version=v1",
)
response = (
service.accounts()
.locations()
.lists(parent="accounts/113097808549740046769")
.execute()
)
这是返回错误:AttributeError: 'Resource' object has no attribute 'locations'
请指教
accounts.locations.list method 是业务信息 API 的一部分,而不是帐户管理 API。
我正在尝试通过 API.
在 Google 我的公司中获取本地帐户下的列表CLIENT_SECRETS_FILE = "client_secret.json"
SCOPES = ["https://www.googleapis.com/auth/business.manage"]
API_SERVICE_NAME = "mybusiness"
API_VERSION = "v1"
service = googleapiclient.discovery.build(
API_SERVICE_NAME,
API_VERSION,
credentials=credentials,
discoveryServiceUrl="https://mybusinessaccountmanagement.googleapis.com/$discovery/rest?version=v1",
)
response = (
service.accounts()
.locations()
.lists(parent="accounts/113097808549740046769")
.execute()
)
这是返回错误:AttributeError: 'Resource' object has no attribute 'locations'
请指教
accounts.locations.list method 是业务信息 API 的一部分,而不是帐户管理 API。