# AdSense Platform API . platforms . accounts . sites

## Instance Methods

Close httplib2 connections.

Creates a site for a specified account.

Deletes a site from a specified account.

Gets a site from a specified sub-account.

Lists sites for a specific account.

Retrieves the next page of results.

Requests the review of a site. The site should be in REQUIRES_REVIEW or NEEDS_ATTENTION state. Note: Make sure you place an [ad tag](https://developers.google.com/adsense/platforms/direct/ad-tags) on your site before requesting a review.

### Method Details

`close()`

    Close httplib2 connections.

`create(parent, body=None, x__xgafv=None)`

    Creates a site for a specified account.

    Args:
      parent: string, Required. Account to create site. Format: platforms/{platform}/accounts/{account_id} (required)
      body: object, The request body.
        The object takes the form of:

    { # Representation of a Site.
      "domain": "A String", # Domain/sub-domain of the site. Must be a valid domain complying with [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt) and formatted as punycode [RFC 3492](https://www.ietf.org/rfc/rfc3492.txt) in case the domain contains unicode characters.
      "name": "A String", # Output only. Resource name of a site. Format: platforms/{platform}/accounts/{account}/sites/{site}
      "state": "A String", # Output only. State of a site.
    }

      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # Representation of a Site.
      "domain": "A String", # Domain/sub-domain of the site. Must be a valid domain complying with [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt) and formatted as punycode [RFC 3492](https://www.ietf.org/rfc/rfc3492.txt) in case the domain contains unicode characters.
      "name": "A String", # Output only. Resource name of a site. Format: platforms/{platform}/accounts/{account}/sites/{site}
      "state": "A String", # Output only. State of a site.
    }

`delete(name, x__xgafv=None)`

    Deletes a site from a specified account.

    Args:
      name: string, Required. The name of the site to delete. Format: platforms/{platform}/accounts/{account}/sites/{site} (required)
      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
    }

`get(name, x__xgafv=None)`

    Gets a site from a specified sub-account.

    Args:
      name: string, Required. The name of the site to retrieve. Format: platforms/{platform}/accounts/{account}/sites/{site} (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 a Site.
      "domain": "A String", # Domain/sub-domain of the site. Must be a valid domain complying with [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt) and formatted as punycode [RFC 3492](https://www.ietf.org/rfc/rfc3492.txt) in case the domain contains unicode characters.
      "name": "A String", # Output only. Resource name of a site. Format: platforms/{platform}/accounts/{account}/sites/{site}
      "state": "A String", # Output only. State of a site.
    }

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

    Lists sites for a specific account.

    Args:
      parent: string, Required. The account which owns the sites. Format: platforms/{platform}/accounts/{account} (required)
      pageSize: integer, The maximum number of sites to include in the response, used for paging. If unspecified, at most 10000 sites 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 `ListSites` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListSites` 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 site list rpc.
      "nextPageToken": "A String", # Continuation token used to page through sites. To retrieve the next page of the results, set the next request's "page_token" value to this.
      "sites": [ # The sites returned in this list response.
        { # Representation of a Site.
          "domain": "A String", # Domain/sub-domain of the site. Must be a valid domain complying with [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt) and formatted as punycode [RFC 3492](https://www.ietf.org/rfc/rfc3492.txt) in case the domain contains unicode characters.
          "name": "A String", # Output only. Resource name of a site. Format: platforms/{platform}/accounts/{account}/sites/{site}
          "state": "A String", # Output only. State of a site.
        },
      ],
    }

`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.

`requestReview(name, x__xgafv=None)`

    Requests the review of a site. The site should be in REQUIRES_REVIEW or NEEDS_ATTENTION state. Note: Make sure you place an [ad tag](https://developers.google.com/adsense/platforms/direct/ad-tags) on your site before requesting a review.

    Args:
      name: string, Required. The name of the site to submit for review. Format: platforms/{platform}/accounts/{account}/sites/{site} (required)
      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 site request review rpc.
    }