Web Content Publisher API . organizations . publications . ctas

Instance Methods

close()

Close httplib2 connections.

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

Creates a CTA.

get(name, x__xgafv=None)

Gets a CTA.

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

Lists CTAs.

list_next()

Retrieves the next page of results.

Method Details

close()
Close httplib2 connections.
create(parent, body=None, ctaId=None, x__xgafv=None)
Creates a CTA.

Args:
  parent: string, Required. The parent publication resource where this CTA will be created. Format: `organizations/{organization}/publications/{publication}`. (required)
  body: object, The request body.
    The object takes the form of:

{ # Represents a Call-To-Action (CTA) configuration for a publication.
  "displayName": "A String", # Required. The user-visible display name of the CTA.
  "name": "A String", # Identifier. The resource name of the Cta. Format: organizations/{organization}/publications/{publication}/ctas/{cta}
  "newsletterConfig": { # Configuration for newsletter signup calls-to-action (CTAs). # Optional. Configuration specific to newsletter signup CTAs. Only populated if type is `NEWSLETTER_SIGNUP`.
    "customConsentText": "A String", # Optional. Custom consent or disclosure text shown to the user.
    "customMessage": "A String", # Optional. A custom message displayed to the user in the signup prompt.
    "nameRequired": True or False, # Optional. Whether the user is required to provide their name to sign up.
    "title": "A String", # Required. The title of the newsletter signup prompt.
  },
  "state": "A String", # Output only. The current state of this CTA.
  "type": "A String", # Required. The type of this CTA.
}

  ctaId: string, Optional. The unique identifier of the CTA to create. If not specified, the server will generate a random CTA ID.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Represents a Call-To-Action (CTA) configuration for a publication.
  "displayName": "A String", # Required. The user-visible display name of the CTA.
  "name": "A String", # Identifier. The resource name of the Cta. Format: organizations/{organization}/publications/{publication}/ctas/{cta}
  "newsletterConfig": { # Configuration for newsletter signup calls-to-action (CTAs). # Optional. Configuration specific to newsletter signup CTAs. Only populated if type is `NEWSLETTER_SIGNUP`.
    "customConsentText": "A String", # Optional. Custom consent or disclosure text shown to the user.
    "customMessage": "A String", # Optional. A custom message displayed to the user in the signup prompt.
    "nameRequired": True or False, # Optional. Whether the user is required to provide their name to sign up.
    "title": "A String", # Required. The title of the newsletter signup prompt.
  },
  "state": "A String", # Output only. The current state of this CTA.
  "type": "A String", # Required. The type of this CTA.
}
get(name, x__xgafv=None)
Gets a CTA.

Args:
  name: string, Required. The resource name of the CTA to retrieve. Format: `organizations/{organization}/publications/{publication}/ctas/{cta}`. (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Represents a Call-To-Action (CTA) configuration for a publication.
  "displayName": "A String", # Required. The user-visible display name of the CTA.
  "name": "A String", # Identifier. The resource name of the Cta. Format: organizations/{organization}/publications/{publication}/ctas/{cta}
  "newsletterConfig": { # Configuration for newsletter signup calls-to-action (CTAs). # Optional. Configuration specific to newsletter signup CTAs. Only populated if type is `NEWSLETTER_SIGNUP`.
    "customConsentText": "A String", # Optional. Custom consent or disclosure text shown to the user.
    "customMessage": "A String", # Optional. A custom message displayed to the user in the signup prompt.
    "nameRequired": True or False, # Optional. Whether the user is required to provide their name to sign up.
    "title": "A String", # Required. The title of the newsletter signup prompt.
  },
  "state": "A String", # Output only. The current state of this CTA.
  "type": "A String", # Required. The type of this CTA.
}
list(parent, pageSize=None, pageToken=None, x__xgafv=None)
Lists CTAs.

Args:
  parent: string, Required. The parent publication resource whose CTAs to list. Format: `organizations/{organization}/publications/{publication}`. (required)
  pageSize: integer, Optional. The maximum number of CTAs to return. The service may return fewer than this value. If unspecified, at most 50 CTAs will be returned.
  pageToken: string, Optional. A page token, received from a previous `ListCtas` call, to retrieve the next page.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Response message for `ListCtas`.
  "ctas": [ # Output only. The list of CTAs.
    { # Represents a Call-To-Action (CTA) configuration for a publication.
      "displayName": "A String", # Required. The user-visible display name of the CTA.
      "name": "A String", # Identifier. The resource name of the Cta. Format: organizations/{organization}/publications/{publication}/ctas/{cta}
      "newsletterConfig": { # Configuration for newsletter signup calls-to-action (CTAs). # Optional. Configuration specific to newsletter signup CTAs. Only populated if type is `NEWSLETTER_SIGNUP`.
        "customConsentText": "A String", # Optional. Custom consent or disclosure text shown to the user.
        "customMessage": "A String", # Optional. A custom message displayed to the user in the signup prompt.
        "nameRequired": True or False, # Optional. Whether the user is required to provide their name to sign up.
        "title": "A String", # Required. The title of the newsletter signup prompt.
      },
      "state": "A String", # Output only. The current state of this CTA.
      "type": "A String", # Required. The type of this CTA.
    },
  ],
  "nextPageToken": "A String", # Output only. A token to retrieve the next page of results, or empty if there are no more 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.