diff --git a/examples/promoted_tweet.py b/examples/promoted_tweet.py index 4d97b69..ec29806 100644 --- a/examples/promoted_tweet.py +++ b/examples/promoted_tweet.py @@ -19,7 +19,7 @@ line_item = account.line_items(None, campaign_ids=campaign.id).next() # create request for a simple nullcasted tweet -tweet1 = Tweet.create(account, 'There can be only one...') +tweet1 = Tweet.create(account, text='There can be only one...') # promote the tweet using our line item promoted_tweet = PromotedTweet(account) @@ -29,8 +29,8 @@ # create request for a nullcasted tweet with a website card website_card = WebsiteCard.all(account).next() -status = "Fine. There can be two. {card_url}".format(card_url=website_card.preview_url) -tweet2 = Tweet.create(account, status) +text = "Fine. There can be two. {card_url}".format(card_url=website_card.preview_url) +tweet2 = Tweet.create(account, text) # promote the tweet using our line item promoted_tweet = PromotedTweet(account) diff --git a/examples/tweet_preview.py b/examples/tweet_preview.py index ba9a7f2..90417f4 100644 --- a/examples/tweet_preview.py +++ b/examples/tweet_preview.py @@ -22,17 +22,17 @@ Tweet.preview(account, id=661845592138776576) # preview a new tweet -Tweet.preview(account, status='Hello @AdsAPI!') -Tweet.preview(account, status='Hello @AdsAPI!', media_ids=[634458428836962305, 634458428836962306]) +Tweet.preview(account, text='Hello @AdsAPI!') +Tweet.preview(account, text='Hello @AdsAPI!', media_ids=[634458428836962305, 634458428836962306]) # preview a new tweet with an embedded card website_card = WebsiteCard.all(account).next() -Tweet.preview(account, status='Hello @AdsAPI!', card_id=website_card.id) +Tweet.preview(account, text='Hello @AdsAPI!', card_id=website_card.id) # create a new null-casted tweet -Tweet.create(account, status='Hello from Python @AdsAPI!') -Tweet.create(account, status='Hello @AdsAPI!', media_ids=[634458428836962305, 634458428836962306]) +Tweet.create(account, text='Hello from Python @AdsAPI!') +Tweet.create(account, text='Hello @AdsAPI!', media_ids=[634458428836962305, 634458428836962306]) # create a new null-casted tweet with an embedded card website_card = WebsiteCard.all(account).next() -Tweet.create(account, status='Hello @AdsAPI! {link}'.format(link=website_card.preview_url)) +Tweet.create(account, text='Hello @AdsAPI! {link}'.format(link=website_card.preview_url)) diff --git a/twitter_ads/campaign.py b/twitter_ads/campaign.py index add2c18..13565a3 100644 --- a/twitter_ads/campaign.py +++ b/twitter_ads/campaign.py @@ -259,11 +259,11 @@ def preview(klass, account, **kwargs): return response.body['data'] @classmethod - def create(klass, account, status, **kwargs): + def create(klass, account, **kwargs): """ Creates a "Promoted-Only" Tweet using the specialized Ads API end point. """ - params = {'status': status} + params = {} params.update(kwargs) # handles array to string conversion for media IDs