DCM/DFA Reporting And Trafficking API . 4 . directorySites

Instance Methods

get(profileId=*, id=*)

Gets one directory site by ID.

insert(profileId=*, body=None)

Inserts a new directory site.

list(profileId=*, dfpNetworkCode=None, acceptsInStreamVideoPlacements=None, pageToken=None, acceptsPublisherPaidPlacements=None, sortOrder=None, acceptsInterstitialPlacements=None, maxResults=None, active=None, searchString=None, ids=None, sortField=None)

Retrieves a list of directory sites, possibly filtered. This method supports paging.

list_next(previous_request=*, previous_response=*)

Retrieves the next page of results.

Method Details

get(profileId=*, id=*)
Gets one directory site by ID.

Args:
  profileId: string, User profile ID associated with this request. (required)
  id: string, Directory site ID. (required)

Returns:
  An object of the form:

    { # DirectorySites contains properties of a website from the Site Directory. Sites need to be added to an account via the Sites resource before they can be assigned to a placement.
      "kind": "dfareporting#directorySite", # Identifies what kind of resource this is. Value: the fixed string "dfareporting#directorySite".
      "name": "A String", # Name of this directory site.
      "settings": { # Directory Site Settings # Directory site settings.
        "interstitialPlacementAccepted": True or False, # Whether this site accepts interstitial ads.
        "activeViewOptOut": True or False, # Whether this directory site has disabled active view creatives.
        "instreamVideoPlacementAccepted": True or False, # Whether this site accepts in-stream video ads.
        "dfpSettings": { # Google Ad Manager Settings # Directory site Ad Manager settings.
          "publisherPortalOnly": True or False, # Whether this directory site is available only via Publisher Portal.
          "dfpNetworkCode": "A String", # Ad Manager network code for this directory site.
          "pubPaidPlacementAccepted": True or False, # Whether this directory site accepts publisher-paid tags.
          "programmaticPlacementAccepted": True or False, # Whether this directory site accepts programmatic placements.
          "dfpNetworkName": "A String", # Ad Manager network name for this directory site.
        },
      },
      "url": "A String", # URL of this directory site.
      "inpageTagFormats": [ # Tag types for regular placements.
          #
          # Acceptable values are:
          # - "STANDARD"
          # - "IFRAME_JAVASCRIPT_INPAGE"
          # - "INTERNAL_REDIRECT_INPAGE"
          # - "JAVASCRIPT_INPAGE"
        "A String",
      ],
      "interstitialTagFormats": [ # Tag types for interstitial placements.
          #
          # Acceptable values are:
          # - "IFRAME_JAVASCRIPT_INTERSTITIAL"
          # - "INTERNAL_REDIRECT_INTERSTITIAL"
          # - "JAVASCRIPT_INTERSTITIAL"
        "A String",
      ],
      "idDimensionValue": { # Represents a DimensionValue resource. # Dimension value for the ID of this directory site. This is a read-only, auto-generated field.
        "kind": "dfareporting#dimensionValue", # The kind of resource this is, in this case dfareporting#dimensionValue.
        "value": "A String", # The value of the dimension.
        "dimensionName": "A String", # The name of the dimension.
        "etag": "A String", # The eTag of this response for caching purposes.
        "matchType": "A String", # Determines how the 'value' field is matched when filtering. If not specified, defaults to EXACT. If set to WILDCARD_EXPRESSION, '*' is allowed as a placeholder for variable length character sequences, and it can be escaped with a backslash. Note, only paid search dimensions ('dfa:paidSearch*') allow a matchType other than EXACT.
        "id": "A String", # The ID associated with the value if available.
      },
      "id": "A String", # ID of this directory site. This is a read-only, auto-generated field.
    }
insert(profileId=*, body=None)
Inserts a new directory site.

Args:
  profileId: string, User profile ID associated with this request. (required)
  body: object, The request body.
    The object takes the form of:

{ # DirectorySites contains properties of a website from the Site Directory. Sites need to be added to an account via the Sites resource before they can be assigned to a placement.
    "kind": "dfareporting#directorySite", # Identifies what kind of resource this is. Value: the fixed string "dfareporting#directorySite".
    "name": "A String", # Name of this directory site.
    "settings": { # Directory Site Settings # Directory site settings.
      "interstitialPlacementAccepted": True or False, # Whether this site accepts interstitial ads.
      "activeViewOptOut": True or False, # Whether this directory site has disabled active view creatives.
      "instreamVideoPlacementAccepted": True or False, # Whether this site accepts in-stream video ads.
      "dfpSettings": { # Google Ad Manager Settings # Directory site Ad Manager settings.
        "publisherPortalOnly": True or False, # Whether this directory site is available only via Publisher Portal.
        "dfpNetworkCode": "A String", # Ad Manager network code for this directory site.
        "pubPaidPlacementAccepted": True or False, # Whether this directory site accepts publisher-paid tags.
        "programmaticPlacementAccepted": True or False, # Whether this directory site accepts programmatic placements.
        "dfpNetworkName": "A String", # Ad Manager network name for this directory site.
      },
    },
    "url": "A String", # URL of this directory site.
    "inpageTagFormats": [ # Tag types for regular placements.
        # 
        # Acceptable values are:
        # - "STANDARD"
        # - "IFRAME_JAVASCRIPT_INPAGE"
        # - "INTERNAL_REDIRECT_INPAGE"
        # - "JAVASCRIPT_INPAGE"
      "A String",
    ],
    "interstitialTagFormats": [ # Tag types for interstitial placements.
        # 
        # Acceptable values are:
        # - "IFRAME_JAVASCRIPT_INTERSTITIAL"
        # - "INTERNAL_REDIRECT_INTERSTITIAL"
        # - "JAVASCRIPT_INTERSTITIAL"
      "A String",
    ],
    "idDimensionValue": { # Represents a DimensionValue resource. # Dimension value for the ID of this directory site. This is a read-only, auto-generated field.
      "kind": "dfareporting#dimensionValue", # The kind of resource this is, in this case dfareporting#dimensionValue.
      "value": "A String", # The value of the dimension.
      "dimensionName": "A String", # The name of the dimension.
      "etag": "A String", # The eTag of this response for caching purposes.
      "matchType": "A String", # Determines how the 'value' field is matched when filtering. If not specified, defaults to EXACT. If set to WILDCARD_EXPRESSION, '*' is allowed as a placeholder for variable length character sequences, and it can be escaped with a backslash. Note, only paid search dimensions ('dfa:paidSearch*') allow a matchType other than EXACT.
      "id": "A String", # The ID associated with the value if available.
    },
    "id": "A String", # ID of this directory site. This is a read-only, auto-generated field.
  }


Returns:
  An object of the form:

    { # DirectorySites contains properties of a website from the Site Directory. Sites need to be added to an account via the Sites resource before they can be assigned to a placement.
      "kind": "dfareporting#directorySite", # Identifies what kind of resource this is. Value: the fixed string "dfareporting#directorySite".
      "name": "A String", # Name of this directory site.
      "settings": { # Directory Site Settings # Directory site settings.
        "interstitialPlacementAccepted": True or False, # Whether this site accepts interstitial ads.
        "activeViewOptOut": True or False, # Whether this directory site has disabled active view creatives.
        "instreamVideoPlacementAccepted": True or False, # Whether this site accepts in-stream video ads.
        "dfpSettings": { # Google Ad Manager Settings # Directory site Ad Manager settings.
          "publisherPortalOnly": True or False, # Whether this directory site is available only via Publisher Portal.
          "dfpNetworkCode": "A String", # Ad Manager network code for this directory site.
          "pubPaidPlacementAccepted": True or False, # Whether this directory site accepts publisher-paid tags.
          "programmaticPlacementAccepted": True or False, # Whether this directory site accepts programmatic placements.
          "dfpNetworkName": "A String", # Ad Manager network name for this directory site.
        },
      },
      "url": "A String", # URL of this directory site.
      "inpageTagFormats": [ # Tag types for regular placements.
          #
          # Acceptable values are:
          # - "STANDARD"
          # - "IFRAME_JAVASCRIPT_INPAGE"
          # - "INTERNAL_REDIRECT_INPAGE"
          # - "JAVASCRIPT_INPAGE"
        "A String",
      ],
      "interstitialTagFormats": [ # Tag types for interstitial placements.
          #
          # Acceptable values are:
          # - "IFRAME_JAVASCRIPT_INTERSTITIAL"
          # - "INTERNAL_REDIRECT_INTERSTITIAL"
          # - "JAVASCRIPT_INTERSTITIAL"
        "A String",
      ],
      "idDimensionValue": { # Represents a DimensionValue resource. # Dimension value for the ID of this directory site. This is a read-only, auto-generated field.
        "kind": "dfareporting#dimensionValue", # The kind of resource this is, in this case dfareporting#dimensionValue.
        "value": "A String", # The value of the dimension.
        "dimensionName": "A String", # The name of the dimension.
        "etag": "A String", # The eTag of this response for caching purposes.
        "matchType": "A String", # Determines how the 'value' field is matched when filtering. If not specified, defaults to EXACT. If set to WILDCARD_EXPRESSION, '*' is allowed as a placeholder for variable length character sequences, and it can be escaped with a backslash. Note, only paid search dimensions ('dfa:paidSearch*') allow a matchType other than EXACT.
        "id": "A String", # The ID associated with the value if available.
      },
      "id": "A String", # ID of this directory site. This is a read-only, auto-generated field.
    }
list(profileId=*, dfpNetworkCode=None, acceptsInStreamVideoPlacements=None, pageToken=None, acceptsPublisherPaidPlacements=None, sortOrder=None, acceptsInterstitialPlacements=None, maxResults=None, active=None, searchString=None, ids=None, sortField=None)
Retrieves a list of directory sites, possibly filtered. This method supports paging.

Args:
  profileId: string, User profile ID associated with this request. (required)
  dfpNetworkCode: string, Select only directory sites with this Ad Manager network code.
  acceptsInStreamVideoPlacements: boolean, This search filter is no longer supported and will have no effect on the results returned.
  pageToken: string, Value of the nextPageToken from the previous result page.
  acceptsPublisherPaidPlacements: boolean, Select only directory sites that accept publisher paid placements. This field can be left blank.
  sortOrder: string, Order of sorted results.
    Allowed values
      ASCENDING - 
      DESCENDING - 
  acceptsInterstitialPlacements: boolean, This search filter is no longer supported and will have no effect on the results returned.
  maxResults: integer, Maximum number of results to return.
  active: boolean, Select only active directory sites. Leave blank to retrieve both active and inactive directory sites.
  searchString: string, Allows searching for objects by name, ID or URL. Wildcards (*) are allowed. For example, "directory site*2015" will return objects with names like "directory site June 2015", "directory site April 2015", or simply "directory site 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "directory site" will match objects with name "my directory site", "directory site 2015" or simply, "directory site".
  ids: string, Select only directory sites with these IDs. (repeated)
  sortField: string, Field by which to sort the list.
    Allowed values
      ID - 
      NAME - 

Returns:
  An object of the form:

    { # Directory Site List Response
    "nextPageToken": "A String", # Pagination token to be used for the next list operation.
    "kind": "dfareporting#directorySitesListResponse", # Identifies what kind of resource this is. Value: the fixed string "dfareporting#directorySitesListResponse".
    "directorySites": [ # Directory site collection.
      { # DirectorySites contains properties of a website from the Site Directory. Sites need to be added to an account via the Sites resource before they can be assigned to a placement.
          "kind": "dfareporting#directorySite", # Identifies what kind of resource this is. Value: the fixed string "dfareporting#directorySite".
          "name": "A String", # Name of this directory site.
          "settings": { # Directory Site Settings # Directory site settings.
            "interstitialPlacementAccepted": True or False, # Whether this site accepts interstitial ads.
            "activeViewOptOut": True or False, # Whether this directory site has disabled active view creatives.
            "instreamVideoPlacementAccepted": True or False, # Whether this site accepts in-stream video ads.
            "dfpSettings": { # Google Ad Manager Settings # Directory site Ad Manager settings.
              "publisherPortalOnly": True or False, # Whether this directory site is available only via Publisher Portal.
              "dfpNetworkCode": "A String", # Ad Manager network code for this directory site.
              "pubPaidPlacementAccepted": True or False, # Whether this directory site accepts publisher-paid tags.
              "programmaticPlacementAccepted": True or False, # Whether this directory site accepts programmatic placements.
              "dfpNetworkName": "A String", # Ad Manager network name for this directory site.
            },
          },
          "url": "A String", # URL of this directory site.
          "inpageTagFormats": [ # Tag types for regular placements.
              #
              # Acceptable values are:
              # - "STANDARD"
              # - "IFRAME_JAVASCRIPT_INPAGE"
              # - "INTERNAL_REDIRECT_INPAGE"
              # - "JAVASCRIPT_INPAGE"
            "A String",
          ],
          "interstitialTagFormats": [ # Tag types for interstitial placements.
              #
              # Acceptable values are:
              # - "IFRAME_JAVASCRIPT_INTERSTITIAL"
              # - "INTERNAL_REDIRECT_INTERSTITIAL"
              # - "JAVASCRIPT_INTERSTITIAL"
            "A String",
          ],
          "idDimensionValue": { # Represents a DimensionValue resource. # Dimension value for the ID of this directory site. This is a read-only, auto-generated field.
            "kind": "dfareporting#dimensionValue", # The kind of resource this is, in this case dfareporting#dimensionValue.
            "value": "A String", # The value of the dimension.
            "dimensionName": "A String", # The name of the dimension.
            "etag": "A String", # The eTag of this response for caching purposes.
            "matchType": "A String", # Determines how the 'value' field is matched when filtering. If not specified, defaults to EXACT. If set to WILDCARD_EXPRESSION, '*' is allowed as a placeholder for variable length character sequences, and it can be escaped with a backslash. Note, only paid search dimensions ('dfa:paidSearch*') allow a matchType other than EXACT.
            "id": "A String", # The ID associated with the value if available.
          },
          "id": "A String", # ID of this directory site. This is a read-only, auto-generated field.
        },
    ],
  }
list_next(previous_request=*, previous_response=*)
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.