Display & Video 360 API . advertisers . locationLists

Instance Methods

assignedLocations()

Returns the assignedLocations Resource.

close()

Close httplib2 connections.

create(advertiserId, body=None, x__xgafv=None)

Creates a new location list. Returns the newly created location list if successful.

get(advertiserId, locationListId, x__xgafv=None)

Gets a location list.

list(advertiserId, filter=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)

Lists location lists based on a given advertiser id.

list_next()

Retrieves the next page of results.

patch(advertiserId, locationListId, body=None, updateMask=None, x__xgafv=None)

Updates a location list. Returns the updated location list if successful.

Method Details

close()
Close httplib2 connections.
create(advertiserId, body=None, x__xgafv=None)
Creates a new location list. Returns the newly created location list if successful.

Args:
  advertiserId: string, Required. The ID of the DV360 advertiser to which the location list belongs. (required)
  body: object, The request body.
    The object takes the form of:

{ # A list of locations used for targeting.
  "advertiserId": "A String", # Required. Immutable. The unique ID of the advertiser the location list belongs to.
  "displayName": "A String", # Required. The display name of the location list. Must be UTF-8 encoded with a maximum size of 240 bytes.
  "locationListId": "A String", # Output only. The unique ID of the location list. Assigned by the system.
  "locationType": "A String", # Required. Immutable. The type of location. All locations in the list will share this type.
  "name": "A String", # Output only. The resource name of the location list.
}

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

Returns:
  An object of the form:

    { # A list of locations used for targeting.
  "advertiserId": "A String", # Required. Immutable. The unique ID of the advertiser the location list belongs to.
  "displayName": "A String", # Required. The display name of the location list. Must be UTF-8 encoded with a maximum size of 240 bytes.
  "locationListId": "A String", # Output only. The unique ID of the location list. Assigned by the system.
  "locationType": "A String", # Required. Immutable. The type of location. All locations in the list will share this type.
  "name": "A String", # Output only. The resource name of the location list.
}
get(advertiserId, locationListId, x__xgafv=None)
Gets a location list.

Args:
  advertiserId: string, Required. The ID of the DV360 advertiser to which the fetched location list belongs. (required)
  locationListId: string, Required. The ID of the location list to fetch. (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A list of locations used for targeting.
  "advertiserId": "A String", # Required. Immutable. The unique ID of the advertiser the location list belongs to.
  "displayName": "A String", # Required. The display name of the location list. Must be UTF-8 encoded with a maximum size of 240 bytes.
  "locationListId": "A String", # Output only. The unique ID of the location list. Assigned by the system.
  "locationType": "A String", # Required. Immutable. The type of location. All locations in the list will share this type.
  "name": "A String", # Output only. The resource name of the location list.
}
list(advertiserId, filter=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)
Lists location lists based on a given advertiser id.

Args:
  advertiserId: string, Required. The ID of the DV360 advertiser to which the fetched location lists belong. (required)
  filter: string, Allows filtering by location list fields. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by `AND` or `OR` logical operators. A sequence of restrictions implicitly uses `AND`. * A restriction has the form of `{field} {operator} {value}`. * All fields must use the `EQUALS (=)` operator. Supported fields: * `locationType` Examples: * All regional location list: `locationType="TARGETING_LOCATION_TYPE_REGIONAL"` * All proximity location list: `locationType="TARGETING_LOCATION_TYPE_PROXIMITY"` The length of this field should be no more than 500 characters. Reference our [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for more information.
  orderBy: string, Field by which to sort the list. Acceptable values are: * `locationListId` (default) * `displayName` The default sorting order is ascending. To specify descending order for a field, a suffix "desc" should be added to the field name. Example: `displayName desc`.
  pageSize: integer, Requested page size. Must be between `1` and `200`. Defaults to `100` if not set. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.
  pageToken: string, A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListLocationLists` method. If not specified, the first page of results will be returned.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    {
  "locationLists": [ # The list of location lists. This list will be absent if empty.
    { # A list of locations used for targeting.
      "advertiserId": "A String", # Required. Immutable. The unique ID of the advertiser the location list belongs to.
      "displayName": "A String", # Required. The display name of the location list. Must be UTF-8 encoded with a maximum size of 240 bytes.
      "locationListId": "A String", # Output only. The unique ID of the location list. Assigned by the system.
      "locationType": "A String", # Required. Immutable. The type of location. All locations in the list will share this type.
      "name": "A String", # Output only. The resource name of the location list.
    },
  ],
  "nextPageToken": "A String", # A token to retrieve the next page of results. Pass this value in the page_token field in the subsequent call to `ListLocationLists` method to retrieve the next page of results.
}
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.
        
patch(advertiserId, locationListId, body=None, updateMask=None, x__xgafv=None)
Updates a location list. Returns the updated location list if successful.

Args:
  advertiserId: string, Required. The ID of the DV360 advertiser to which the location lists belongs. (required)
  locationListId: string, Output only. The unique ID of the location list. Assigned by the system. (required)
  body: object, The request body.
    The object takes the form of:

{ # A list of locations used for targeting.
  "advertiserId": "A String", # Required. Immutable. The unique ID of the advertiser the location list belongs to.
  "displayName": "A String", # Required. The display name of the location list. Must be UTF-8 encoded with a maximum size of 240 bytes.
  "locationListId": "A String", # Output only. The unique ID of the location list. Assigned by the system.
  "locationType": "A String", # Required. Immutable. The type of location. All locations in the list will share this type.
  "name": "A String", # Output only. The resource name of the location list.
}

  updateMask: string, Required. The mask to control which fields to update.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A list of locations used for targeting.
  "advertiserId": "A String", # Required. Immutable. The unique ID of the advertiser the location list belongs to.
  "displayName": "A String", # Required. The display name of the location list. Must be UTF-8 encoded with a maximum size of 240 bytes.
  "locationListId": "A String", # Output only. The unique ID of the location list. Assigned by the system.
  "locationType": "A String", # Required. Immutable. The type of location. All locations in the list will share this type.
  "name": "A String", # Output only. The resource name of the location list.
}