# Campaign Manager 360 API . directorySites

## Instance Methods

Close httplib2 connections.

Gets one directory site by ID.

Inserts a new directory site.

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

Retrieves the next page of results.

### Method Details

`close()`

    Close httplib2 connections.

`get(profileId, id, x__xgafv=None)`

    Gets one directory site by ID.

    Args:
      profileId: string, User profile ID associated with this request. (required)
      id: string, Directory site ID. (required)
      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    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.
      "id": "A String", # ID of this directory site. This is a read-only, auto-generated field.
      "idDimensionValue": { # Represents a DimensionValue resource. # Dimension value for the ID of this directory site. This is a read-only, auto-generated field.
        "dimensionName": "A String", # The name of the dimension.
        "etag": "A String", # The eTag of this response for caching purposes.
        "id": "A String", # The ID associated with the value if available.
        "kind": "A String", # The kind of resource this is, in this case dfareporting#dimensionValue.
        "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.
        "value": "A String", # The value of the dimension.
      },
      "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",
      ],
      "kind": "A String", # 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.
        "activeViewOptOut": True or False, # Whether this directory site has disabled active view creatives.
        "dfpSettings": { # Google Ad Manager Settings # Directory site Ad Manager settings.
          "dfpNetworkCode": "A String", # Ad Manager network code for this directory site.
          "dfpNetworkName": "A String", # Ad Manager network name for this directory site.
          "programmaticPlacementAccepted": True or False, # Whether this directory site accepts programmatic placements.
          "pubPaidPlacementAccepted": True or False, # Whether this directory site accepts publisher-paid tags.
          "publisherPortalOnly": True or False, # Whether this directory site is available only via Publisher Portal.
        },
        "instreamVideoPlacementAccepted": True or False, # Whether this site accepts in-stream video ads.
        "interstitialPlacementAccepted": True or False, # Whether this site accepts interstitial ads.
      },
      "url": "A String", # URL of this directory site.
    }

`insert(profileId, body=None, x__xgafv=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.
      "id": "A String", # ID of this directory site. This is a read-only, auto-generated field.
      "idDimensionValue": { # Represents a DimensionValue resource. # Dimension value for the ID of this directory site. This is a read-only, auto-generated field.
        "dimensionName": "A String", # The name of the dimension.
        "etag": "A String", # The eTag of this response for caching purposes.
        "id": "A String", # The ID associated with the value if available.
        "kind": "A String", # The kind of resource this is, in this case dfareporting#dimensionValue.
        "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.
        "value": "A String", # The value of the dimension.
      },
      "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",
      ],
      "kind": "A String", # 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.
        "activeViewOptOut": True or False, # Whether this directory site has disabled active view creatives.
        "dfpSettings": { # Google Ad Manager Settings # Directory site Ad Manager settings.
          "dfpNetworkCode": "A String", # Ad Manager network code for this directory site.
          "dfpNetworkName": "A String", # Ad Manager network name for this directory site.
          "programmaticPlacementAccepted": True or False, # Whether this directory site accepts programmatic placements.
          "pubPaidPlacementAccepted": True or False, # Whether this directory site accepts publisher-paid tags.
          "publisherPortalOnly": True or False, # Whether this directory site is available only via Publisher Portal.
        },
        "instreamVideoPlacementAccepted": True or False, # Whether this site accepts in-stream video ads.
        "interstitialPlacementAccepted": True or False, # Whether this site accepts interstitial ads.
      },
      "url": "A String", # URL of this directory site.
    }

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

    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.
      "id": "A String", # ID of this directory site. This is a read-only, auto-generated field.
      "idDimensionValue": { # Represents a DimensionValue resource. # Dimension value for the ID of this directory site. This is a read-only, auto-generated field.
        "dimensionName": "A String", # The name of the dimension.
        "etag": "A String", # The eTag of this response for caching purposes.
        "id": "A String", # The ID associated with the value if available.
        "kind": "A String", # The kind of resource this is, in this case dfareporting#dimensionValue.
        "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.
        "value": "A String", # The value of the dimension.
      },
      "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",
      ],
      "kind": "A String", # 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.
        "activeViewOptOut": True or False, # Whether this directory site has disabled active view creatives.
        "dfpSettings": { # Google Ad Manager Settings # Directory site Ad Manager settings.
          "dfpNetworkCode": "A String", # Ad Manager network code for this directory site.
          "dfpNetworkName": "A String", # Ad Manager network name for this directory site.
          "programmaticPlacementAccepted": True or False, # Whether this directory site accepts programmatic placements.
          "pubPaidPlacementAccepted": True or False, # Whether this directory site accepts publisher-paid tags.
          "publisherPortalOnly": True or False, # Whether this directory site is available only via Publisher Portal.
        },
        "instreamVideoPlacementAccepted": True or False, # Whether this site accepts in-stream video ads.
        "interstitialPlacementAccepted": True or False, # Whether this site accepts interstitial ads.
      },
      "url": "A String", # URL of this directory site.
    }

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

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

    Args:
      profileId: string, User profile ID associated with this request. (required)
      acceptsInStreamVideoPlacements: boolean, This search filter is no longer supported and will have no effect on the results returned.
      acceptsInterstitialPlacements: boolean, This search filter is no longer supported and will have no effect on the results returned.
      acceptsPublisherPaidPlacements: boolean, Select only directory sites that accept publisher paid placements. This field can be left blank.
      active: boolean, Select only active directory sites. Leave blank to retrieve both active and inactive directory sites.
      dfpNetworkCode: string, Select only directory sites with this Ad Manager network code.
      ids: string, Select only directory sites with these IDs. (repeated)
      maxResults: integer, Maximum number of results to return.
      pageToken: string, Value of the nextPageToken from the previous result page.
      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".
      sortField: string, Field by which to sort the list.
        Allowed values
          ID -
          NAME -
      sortOrder: string, Order of sorted results.
        Allowed values
          ASCENDING -
          DESCENDING -
      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # Directory Site List Response
      "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.
          "id": "A String", # ID of this directory site. This is a read-only, auto-generated field.
          "idDimensionValue": { # Represents a DimensionValue resource. # Dimension value for the ID of this directory site. This is a read-only, auto-generated field.
            "dimensionName": "A String", # The name of the dimension.
            "etag": "A String", # The eTag of this response for caching purposes.
            "id": "A String", # The ID associated with the value if available.
            "kind": "A String", # The kind of resource this is, in this case dfareporting#dimensionValue.
            "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.
            "value": "A String", # The value of the dimension.
          },
          "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",
          ],
          "kind": "A String", # 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.
            "activeViewOptOut": True or False, # Whether this directory site has disabled active view creatives.
            "dfpSettings": { # Google Ad Manager Settings # Directory site Ad Manager settings.
              "dfpNetworkCode": "A String", # Ad Manager network code for this directory site.
              "dfpNetworkName": "A String", # Ad Manager network name for this directory site.
              "programmaticPlacementAccepted": True or False, # Whether this directory site accepts programmatic placements.
              "pubPaidPlacementAccepted": True or False, # Whether this directory site accepts publisher-paid tags.
              "publisherPortalOnly": True or False, # Whether this directory site is available only via Publisher Portal.
            },
            "instreamVideoPlacementAccepted": True or False, # Whether this site accepts in-stream video ads.
            "interstitialPlacementAccepted": True or False, # Whether this site accepts interstitial ads.
          },
          "url": "A String", # URL of this directory site.
        },
      ],
      "kind": "A String", # Identifies what kind of resource this is. Value: the fixed string "dfareporting#directorySitesListResponse".
      "nextPageToken": "A String", # Pagination token to be used for the next list operation.
    }

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