gam.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:GAMADV-X 作者: taers232c 项目源码 文件源码
def doInfoCustomer():
  cd = buildGAPIObject(API.DIRECTORY)
  checkForExtraneousArguments()
  try:
    customerInfo = callGAPI(cd.customers(), u'get',
                            throw_reasons=[GAPI.BAD_REQUEST, GAPI.RESOURCE_NOT_FOUND, GAPI.FORBIDDEN],
                            customerKey=GC.Values[GC.CUSTOMER_ID])
    printKeyValueList([u'Customer ID', customerInfo[u'id']])
    printKeyValueList([u'Primary Domain', customerInfo[u'customerDomain']])
    printKeyValueList([u'Customer Creation Time', formatLocalTime(customerInfo[u'customerCreationTime'])])
    verified = callGAPI(cd.domains(), u'get',
                        customer=customerInfo[u'id'], domainName=customerInfo[u'customerDomain'], fields=u'verified')[u'verified']
    printKeyValueList([u'Primary Domain Verified', verified])
    printKeyValueList([u'Default Language', customerInfo[u'language']])
    _showCustomerAddressPhoneNumber(customerInfo)
    printKeyValueList([u'Admin Secondary Email', customerInfo[u'alternateEmail']])
    _showCustomerLicenseInfo(customerInfo[u'id'])
  except (GAPI.badRequest, GAPI.resourceNotFound, GAPI.forbidden):
    accessErrorExit(cd)

# gam update customer [primary <DomainName>] [adminsecondaryemail|alternateemail <EmailAddress>] [language <LanguageCode] [phone|phonenumber <String>]
#   [contact|contactname <String>] [name|organizationname <String>]
#   [address1|addressline1 <String>] [address2|addressline2 <String>] [address3|addressline3 <String>]
#   [locality <String>] [region <String>] [postalcode <String>] [country|countrycode <String>]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号