twitter_ads_v2.base module¶
-
class
twitter_ads_v2.base.
Base
[source]¶ Bases:
object
-
account_media
(endpoint_type, **kwargs)[source]¶ Account Media https://developer.twitter.com/en/docs/ads/creatives/api-reference/account-media
- Supported endpoint_type:
all, load, delete
- Args:
endpoint_type (
str
): An endpoint type.
-
accounts
(endpoint_type, **kwargs)[source]¶ Accounts https://developer.twitter.com/en/docs/ads/campaign-management/api-reference/accounts
- Supported endpoint_type:
all, load
- Args:
endpoint_type (
str
): An endpoint type. id (str
, optional): An Ads Account ID to retrieve. Required when endpoint_type is load.
-
active_entities
(endpoint_type, **kwargs)[source]¶ Active Entities https://developer.twitter.com/en/docs/ads/analytics/api-reference/active-entities
- Supported endpoint_type:
all (default)
- Args:
endpoint_type (
str
, optional): An endpoint type.
-
analytics_async_create_job
(endpoint_type, **kwargs)[source]¶ Asynchronous Analytics Create an asynchronous analytics job for the current account. https://developer.twitter.com/en/docs/ads/analytics/api-reference/asynchronous#post-stats-jobs-accounts-account-id
- Supported endpoint_type:
create (default)
- Args:
endpoint_type (
str
, optional): An endpoint type.
-
analytics_async_job_data
(endpoint_type='load', *, url)[source]¶ Returns the results of the specified async job data URL.
- Supported endpoint_type:
load
- Args:
endpoint_type (
str
): An endpoint type. url (str
): A job data URL to download.
-
analytics_async_jobs
(endpoint_type, **kwargs)[source]¶ Asynchronous Analytics Retrieve details for some or all asynchronous analytics jobs for the current account. https://developer.twitter.com/en/docs/ads/analytics/api-reference/asynchronous#get-stats-jobs-accounts-account-id Cancel an asynchronous analytics job for a given ads account. https://developer.twitter.com/en/docs/ads/analytics/api-reference/asynchronous#delete-stats-jobs-accounts-account-id-job-id
- Supported endpoint_type:
all, delete
- Args:
endpoint_type (
str
): An endpoint type.
-
analytics_sync_stats
(endpoint_type, **kwargs)[source]¶ Synchronous Analytics https://developer.twitter.com/en/docs/ads/analytics/api-reference/synchronous
- Supported endpoint_type:
all (default)
- Args:
endpoint_type (
str
, optional): An endpoint type.
-
authenticated_user_access
(endpoint_type, **kwargs)[source]¶ Authenticated User Access https://developer.twitter.com/en/docs/ads/campaign-management/api-reference/authenticated-user-access
- Supported endpoint_type:
all
- Args:
endpoint_type (
str
): An endpoint type.
-
bidding_rules
(endpoint_type, **kwargs)[source]¶ Bidding Rules https://developer.twitter.com/en/docs/ads/campaign-management/api-reference/bidding-rules
- Supported endpoint_type:
all
- Args:
endpoint_type (
str
): An endpoint type.
-
campaigns
(endpoint_type, *, data=None, **kwargs)[source]¶ Campaigns https://developer.twitter.com/en/docs/ads/campaign-management/api-reference/campaigns
- Supported endpoint_type:
all, load, create, batch, update, delete
- Args:
endpoint_type (
str
): An endpoint type. data (list
, optional): A JSON POST body data to send. Required when endpoint_type is batch.
-
cards_fetch
(endpoint_type, **kwargs)[source]¶ Cards Fetch https://developer.twitter.com/en/docs/ads/creatives/api-reference/cards-fetch
- Supported endpoint_type:
all, load
- Args:
endpoint_type (
str
, optional): An endpoint type.
-
content_categories
(endpoint_type, **kwargs)[source]¶ Content Categories https://developer.twitter.com/en/docs/ads/campaign-management/api-reference/content-categories
- Supported endpoint_type:
all
- Args:
endpoint_type (
str
): An endpoint type.
-
draft_tweets
(endpoint_type, **kwargs)[source]¶ Draft Tweets https://developer.twitter.com/en/docs/ads/creatives/api-reference/draft-tweets
- Supported endpoint_type:
all, load, create, update, delete
- Args:
endpoint_type (
str
): An endpoint type.
-
draft_tweets_preview
(endpoint_type='create', *, resource=None, draft_tweet_id)[source]¶ Draft Tweets Preview https://developer.twitter.com/en/docs/ads/creatives/api-reference/draft-tweets#post-accounts-account-id-draft-tweets-preview-draft-tweet-id
- Supported endpoint_type:
create (default)
- Args:
endpoint_type (
str
, optional): An endpoint type. draft_tweet_id (str
): A Draft Tweet ID to preview.
-
funding_instruments
(endpoint_type, **kwargs)[source]¶ Funding Instruments https://developer.twitter.com/en/docs/ads/campaign-management/api-reference/funding-instruments
- Supported endpoint_type:
all, load, create, update, delete
- Args:
endpoint_type (
str
): An endpoint type.
-
iab_categories
(endpoint_type, **kwargs)[source]¶ IAB Categories https://developer.twitter.com/en/docs/ads/campaign-management/api-reference/iab-categories
- Supported endpoint_type:
all
- Args:
endpoint_type (
str
): An endpoint type.
-
image_app_download_cards
(endpoint_type, **kwargs)[source]¶ Image App Download Cards https://developer.twitter.com/en/docs/ads/creatives/api-reference/image-app-download
- Supported endpoint_type:
all, load, create, update, delete
- Args:
endpoint_type (
str
, optional): An endpoint type.
-
image_conversation_cards
(endpoint_type, **kwargs)[source]¶ Image Conversation Cards https://developer.twitter.com/en/docs/ads/creatives/api-reference/image-conversation
- Supported endpoint_type:
all, load, create, update, delete
- Args:
endpoint_type (
str
, optional): An endpoint type.
-
image_direct_message_cards
(endpoint_type, **kwargs)[source]¶ Image Direct Message Cards https://developer.twitter.com/en/docs/ads/creatives/api-reference/image-direct-message
- Supported endpoint_type:
all, load, create, update, delete
- Args:
endpoint_type (
str
, optional): An endpoint type.
-
insights
(endpoint_type, **kwargs)[source]¶ Insights https://developer.twitter.com/en/docs/ads/audiences/api-reference/insights
- Supported endpoint_type:
all (default)
- Args:
endpoint_type (
str
, optional): An endpoint type.
-
insights_available_audiences
(endpoint_type, **kwargs)[source]¶ Insights (available_audiences) https://developer.twitter.com/en/docs/ads/audiences/api-reference/insights#get-insights-accounts-account-id-available-audiences
- Supported endpoint_type:
all (default)
- Args:
endpoint_type (
str
, optional): An endpoint type.
-
keyword_insights
(endpoint_type, **kwargs)[source]¶ Keyword Insights https://developer.twitter.com/en/docs/ads/audiences/api-reference/keyword-insights
- Supported endpoint_type:
all (default)
- Args:
endpoint_type (
str
, optional): An endpoint type.
-
line_item_apps
(endpoint_type, **kwargs)[source]¶ Line Item Apps https://developer.twitter.com/en/docs/ads/campaign-management/api-reference/line-item-apps
- Supported endpoint_type:
all, load, create, delete
- Args:
endpoint_type (
str
): An endpoint type.
-
line_item_placements
(endpoint_type, **kwargs)[source]¶ Line Item Placements https://developer.twitter.com/en/docs/ads/campaign-management/api-reference/line-item-placements
- Supported endpoint_type:
all
- Args:
endpoint_type (
str
): An endpoint type.
-
line_items
(endpoint_type, *, data=None, **kwargs)[source]¶ Line Items https://developer.twitter.com/en/docs/ads/campaign-management/api-reference/line-items
- Supported endpoint_type:
all, load, create, batch, update, delete
- Args:
endpoint_type (
str
): An endpoint type. data (list
, optional): A JSON POST body data to send. Required when endpoint_type is batch.
-
media_creatives
(endpoint_type, **kwargs)[source]¶ Media Creatives https://developer.twitter.com/en/docs/ads/campaign-management/api-reference/media-creatives
- Supported endpoint_type:
all, load, create, delete
- Args:
endpoint_type (
str
): An endpoint type.
-
media_library
(endpoint_type, **kwargs)[source]¶ Media Library https://developer.twitter.com/en/docs/ads/creatives/api-reference/media-library
- Supported endpoint_type:
all, load, create, update, delete
- Args:
endpoint_type (
str
, optional): An endpoint type.
-
poll_cards
(endpoint_type, **kwargs)[source]¶ Poll Cards https://developer.twitter.com/en/docs/ads/creatives/api-reference/poll
- Supported endpoint_type:
all, load, create, delete
- Args:
endpoint_type (
str
, optional): An endpoint type.
-
preroll_call_to_actions
(endpoint_type, **kwargs)[source]¶ Preroll Call To Actions https://developer.twitter.com/en/docs/ads/creatives/api-reference/preroll-call-to-actions
- Supported endpoint_type:
all, load, create, update, delete
- Args:
endpoint_type (
str
, optional): An endpoint type.
-
promotable_users
(endpoint_type, **kwargs)[source]¶ Promotable Users https://developer.twitter.com/en/docs/ads/campaign-management/api-reference/promotable-users
- Supported endpoint_type:
all, load
- Args:
endpoint_type (
str
): An endpoint type.
-
promoted_accounts
(endpoint_type, **kwargs)[source]¶ Promoted Accounts https://developer.twitter.com/en/docs/ads/campaign-management/api-reference/promoted-accounts
- Supported endpoint_type:
all, load, create, delete
- Args:
endpoint_type (
str
): An endpoint type.
-
promoted_tweets
(endpoint_type, **kwargs)[source]¶ Promoted Tweets https://developer.twitter.com/en/docs/ads/campaign-management/api-reference/promoted-tweets
- Supported endpoint_type:
all, load, create, delete
- Args:
endpoint_type (
str
): An endpoint type.
-
reach_estimate
(endpoint_type, **kwargs)[source]¶ Reach Estimate https://developer.twitter.com/en/docs/ads/campaign-management/api-reference/reach-estimate
- Supported endpoint_type:
all
- Args:
endpoint_type (
str
, optional): An endpoint type.
-
reach_frequency_campaigns
(endpoint_type, **kwargs)[source]¶ Reach and Average Frequency (campaigns) https://developer.twitter.com/en/docs/ads/analytics/api-reference/reach#get-stats-accounts-account-id-reach-campaigns
- Supported endpoint_type:
all (default)
- Args:
endpoint_type (
str
, optional): An endpoint type.
-
reach_frequency_funding_instruments
(endpoint_type, **kwargs)[source]¶ Reach and Average Frequency (funding_instruments) https://developer.twitter.com/en/docs/ads/analytics/api-reference/reach#get-stats-accounts-account-id-reach-funding-instruments
- Supported endpoint_type:
all (default)
- Args:
endpoint_type (
str
, optional): An endpoint type.
-
scheduled_promoted_tweets
(endpoint_type, **kwargs)[source]¶ Scheduled Promoted Tweets https://developer.twitter.com/en/docs/ads/campaign-management/api-reference/scheduled-promoted-tweets
- Supported endpoint_type:
all, load, create, delete
- Args:
endpoint_type (
str
): An endpoint type.
-
scheduled_tweets
(endpoint_type, **kwargs)[source]¶ Scheduled Tweets https://developer.twitter.com/en/docs/ads/creatives/api-reference/scheduled-tweets
- Supported endpoint_type:
all, load, create, update, delete
- Args:
endpoint_type (
str
): An endpoint type.
-
tailored_audience_permissions
(endpoint_type, **kwargs)[source]¶ Tailored Audience Permissions https://developer.twitter.com/en/docs/ads/audiences/api-reference/tailored-audience-permissions
- Supported endpoint_type:
all, create, delete
- Args:
endpoint_type (
str
): An endpoint type.
-
tailored_audiences
(endpoint_type, **kwargs)[source]¶ Tailored Audiences https://developer.twitter.com/en/docs/ads/audiences/api-reference/tailored-audiences
- Supported endpoint_type:
all, load, create, delete
- Args:
endpoint_type (
str
): An endpoint type.
-
tailored_audiences_users
(endpoint_type='create', *, tailored_audience_id, data=[])[source]¶ Tailored Audiences Users https://developer.twitter.com/en/docs/ads/audiences/api-reference/audience
- Supported endpoint_type:
create
- Args:
endpoint_type (
str
): An endpoint type. tailored_audience_id (str
): A Tailored Audience ID to update. data (list
): A JSON POST body data to send.
-
targeting_criteria
(endpoint_type, **kwargs)[source]¶ Targeting Criteria https://developer.twitter.com/en/docs/ads/campaign-management/api-reference/targeting-criteria
- Supported endpoint_type:
all, load, create, delete
- Args:
endpoint_type (
str
): An endpoint type.
-
targeting_suggestions
(endpoint_type, **kwargs)[source]¶ Targeting Suggestions https://developer.twitter.com/en/docs/ads/campaign-management/api-reference/targeting-suggestions
- Supported endpoint_type:
all
- Args:
endpoint_type (
str
): An endpoint type.
-
tax_settings
(endpoint_type, **kwargs)[source]¶ Tax Settings https://developer.twitter.com/en/docs/ads/campaign-management/api-reference/tax-settings
- Supported endpoint_type:
all, update
- Args:
endpoint_type (
str
): An endpoint type.
-
tweet_previews
(endpoint_type, **kwargs)[source]¶ Tweet Previews https://developer.twitter.com/en/docs/ads/creatives/api-reference/tweet-previews
- Supported endpoint_type:
all
- Args:
endpoint_type (
str
, optional): An endpoint type.
-
tweets
(endpoint_type, **kwargs)[source]¶ Tweets https://developer.twitter.com/en/docs/ads/creatives/api-reference/tweets
- Supported endpoint_type:
all, create
- Args:
endpoint_type (
str
): An endpoint type.
-
user_settings
(endpoint_type, **kwargs)[source]¶ User Settings https://developer.twitter.com/en/docs/ads/campaign-management/api-reference/user-settings
- Supported endpoint_type:
load, update
- Args:
endpoint_type (
str
): An endpoint type.
-
video_app_download_cards
(endpoint_type, **kwargs)[source]¶ Video App Download Cards https://developer.twitter.com/en/docs/ads/creatives/api-reference/video-app-download
- Supported endpoint_type:
all, load, create, update, delete
- Args:
endpoint_type (
str
, optional): An endpoint type.
-
video_conversation_cards
(endpoint_type, **kwargs)[source]¶ Video Conversation Cards https://developer.twitter.com/en/docs/ads/creatives/api-reference/video-conversation
- Supported endpoint_type:
all, load, create, update, delete
- Args:
endpoint_type (
str
, optional): An endpoint type.
-
video_direct_message_cards
(endpoint_type, **kwargs)[source]¶ Video Direct Message Cards https://developer.twitter.com/en/docs/ads/creatives/api-reference/video-direct-message
- Supported endpoint_type:
all, load, create, update, delete
- Args:
endpoint_type (
str
, optional): An endpoint type.
-
video_website_cards
(endpoint_type, **kwargs)[source]¶ Video Website Cards https://developer.twitter.com/en/docs/ads/creatives/api-reference/video-website
- Supported endpoint_type:
all, load, create, update, delete
- Args:
endpoint_type (
str
, optional): An endpoint type.
-
website_cards
(endpoint_type, **kwargs)[source]¶ Website Cards https://developer.twitter.com/en/docs/ads/creatives/api-reference/website
- Supported endpoint_type:
all, load, create, update, delete
- Args:
endpoint_type (
str
, optional): An endpoint type.
-