Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

introduce PromotedTweet.attach() method #212

Conversation

smaeda-ks
Copy link
Contributor

@smaeda-ks smaeda-ks commented Jul 30, 2019

See APE-557

Deprecate .save() method and introduce new PromotedTweet.attach() class method instead. The naming of "save" was a bit confusing given its actual functionality.

This is a breaking change.
* I'll put a note about this change in https://github.com/twitterdev/twitter-python-ads-sdk/wiki/Release-Notes

before

Can only associate a given tweet_id per call:

promoted_tweet = PromotedTweet(account)
promoted_tweet.line_item_id = 'aaaa'  # a line_item_id
promoted_tweet.tweet_id = '111111111111111111'  # a tweet_id
promoted_tweet.save()

after

Can associate given tweet_ids (list, max 50 ids) at once:

# return Cursor object
response = PromotedTweet.attach(
    account,
    line_item_id='aaaa',
    tweet_ids=['111111111111111111', '222222222222222222' ... ]
)

@smaeda-ks smaeda-ks force-pushed the smaeda-ks/develop/update-promoted-tweet branch from bd67ac2 to d16e663 Compare July 30, 2019 11:18
@smaeda-ks smaeda-ks merged commit e0db0ca into xdevplatform:master Aug 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants