AdSense Management API . accounts

Instance Methods

adclients()

Returns the adclients Resource.

alerts()

Returns the alerts Resource.

payments()

Returns the payments Resource.

reports()

Returns the reports Resource.

sites()

Returns the sites Resource.

close()

Close httplib2 connections.

get(name, x__xgafv=None)

Gets information about the selected AdSense account.

getAdBlockingRecoveryTag(name, x__xgafv=None)

Gets the ad blocking recovery tag of an account.

list(pageSize=None, pageToken=None, x__xgafv=None)

Lists all accounts available to this user.

listChildAccounts(parent, pageSize=None, pageToken=None, x__xgafv=None)

Lists all accounts directly managed by the given AdSense account.

listChildAccounts_next()

Retrieves the next page of results.

list_next()

Retrieves the next page of results.

Method Details

close()
Close httplib2 connections.
get(name, x__xgafv=None)
Gets information about the selected AdSense account.

Args:
  name: string, Required. Account to get information about. Format: accounts/{account} (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Representation of an account.
  "createTime": "A String", # Output only. Creation time of the account.
  "displayName": "A String", # Output only. Display name of this account.
  "name": "A String", # Output only. Resource name of the account. Format: accounts/pub-[0-9]+
  "pendingTasks": [ # Output only. Outstanding tasks that need to be completed as part of the sign-up process for a new account. e.g. "billing-profile-creation", "phone-pin-verification".
    "A String",
  ],
  "premium": True or False, # Output only. Whether this account is premium.
  "state": "A String", # Output only. State of the account.
  "timeZone": { # Represents a time zone from the [IANA Time Zone Database](https://www.iana.org/time-zones). # The account time zone, as used by reporting. For more information, see [changing the time zone of your reports](https://support.google.com/adsense/answer/9830725).
    "id": "A String", # IANA Time Zone Database time zone, e.g. "America/New_York".
    "version": "A String", # Optional. IANA Time Zone Database version number, e.g. "2019a".
  },
}
getAdBlockingRecoveryTag(name, x__xgafv=None)
Gets the ad blocking recovery tag of an account.

Args:
  name: string, Required. The name of the account to get the tag for. Format: accounts/{account} (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Representation of an ad blocking recovery tag. See https://support.google.com/adsense/answer/11575177.
  "errorProtectionCode": "A String", # Error protection code that can be used in conjunction with the tag. It'll display a message to users if an [ad blocking extension blocks their access to your site](https://support.google.com/adsense/answer/11575480).
  "tag": "A String", # The ad blocking recovery tag. Note that the message generated by the tag can be blocked by an ad blocking extension. If this is not your desired outcome, then you'll need to use it in conjunction with the error protection code.
}
list(pageSize=None, pageToken=None, x__xgafv=None)
Lists all accounts available to this user.

Args:
  pageSize: integer, The maximum number of accounts to include in the response, used for paging. If unspecified, at most 10000 accounts will be returned. The maximum value is 10000; values above 10000 will be coerced to 10000.
  pageToken: string, A page token, received from a previous `ListAccounts` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListAccounts` must match the call that provided the page token.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Response definition for the account list rpc.
  "accounts": [ # The accounts returned in this list response.
    { # Representation of an account.
      "createTime": "A String", # Output only. Creation time of the account.
      "displayName": "A String", # Output only. Display name of this account.
      "name": "A String", # Output only. Resource name of the account. Format: accounts/pub-[0-9]+
      "pendingTasks": [ # Output only. Outstanding tasks that need to be completed as part of the sign-up process for a new account. e.g. "billing-profile-creation", "phone-pin-verification".
        "A String",
      ],
      "premium": True or False, # Output only. Whether this account is premium.
      "state": "A String", # Output only. State of the account.
      "timeZone": { # Represents a time zone from the [IANA Time Zone Database](https://www.iana.org/time-zones). # The account time zone, as used by reporting. For more information, see [changing the time zone of your reports](https://support.google.com/adsense/answer/9830725).
        "id": "A String", # IANA Time Zone Database time zone, e.g. "America/New_York".
        "version": "A String", # Optional. IANA Time Zone Database version number, e.g. "2019a".
      },
    },
  ],
  "nextPageToken": "A String", # Continuation token used to page through accounts. To retrieve the next page of the results, set the next request's "page_token" value to this.
}
listChildAccounts(parent, pageSize=None, pageToken=None, x__xgafv=None)
Lists all accounts directly managed by the given AdSense account.

Args:
  parent: string, Required. The parent account, which owns the child accounts. Format: accounts/{account} (required)
  pageSize: integer, The maximum number of accounts to include in the response, used for paging. If unspecified, at most 10000 accounts will be returned. The maximum value is 10000; values above 10000 will be coerced to 10000.
  pageToken: string, A page token, received from a previous `ListAccounts` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListAccounts` must match the call that provided the page token.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Response definition for the child account list rpc.
  "accounts": [ # The accounts returned in this list response.
    { # Representation of an account.
      "createTime": "A String", # Output only. Creation time of the account.
      "displayName": "A String", # Output only. Display name of this account.
      "name": "A String", # Output only. Resource name of the account. Format: accounts/pub-[0-9]+
      "pendingTasks": [ # Output only. Outstanding tasks that need to be completed as part of the sign-up process for a new account. e.g. "billing-profile-creation", "phone-pin-verification".
        "A String",
      ],
      "premium": True or False, # Output only. Whether this account is premium.
      "state": "A String", # Output only. State of the account.
      "timeZone": { # Represents a time zone from the [IANA Time Zone Database](https://www.iana.org/time-zones). # The account time zone, as used by reporting. For more information, see [changing the time zone of your reports](https://support.google.com/adsense/answer/9830725).
        "id": "A String", # IANA Time Zone Database time zone, e.g. "America/New_York".
        "version": "A String", # Optional. IANA Time Zone Database version number, e.g. "2019a".
      },
    },
  ],
  "nextPageToken": "A String", # Continuation token used to page through accounts. To retrieve the next page of the results, set the next request's "page_token" value to this.
}
listChildAccounts_next()
Retrieves the next page of results.

        Args:
          previous_request: The request for the previous page. (required)
          previous_response: The response from the request for the previous page. (required)

        Returns:
          A request object that you can call 'execute()' on to request the next
          page. Returns None if there are no more items in the collection.
        
list_next()
Retrieves the next page of results.

        Args:
          previous_request: The request for the previous page. (required)
          previous_response: The response from the request for the previous page. (required)

        Returns:
          A request object that you can call 'execute()' on to request the next
          page. Returns None if there are no more items in the collection.