-
Notifications
You must be signed in to change notification settings - Fork 71
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
Tailored Audience for v4 #180
Tailored Audience for v4 #180
Conversation
@jbabichjapan |
Thanks so much for this - @tushdante will be reviewing this and also has been preparing the rest of the support for v4 - I think it would be good to align the checkin so that the other functionality doesn't break when we upgrade the API_VERSION from 3 to 4 |
# @since 4.0 | ||
# | ||
# @return [TailoredAudience] The newly created tailored audience instance. | ||
def create_instance(account, name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that v4 will no longer support TON based audiences, I'd suggest removing this method in favor of editing the existing create
method instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a concern. The signatures of these two methods are totally different.
create(account, file_path, name, list_type)
create_instance(account, name)
If I made a method like create(account, name)
, the backward compatibility would be broken. Is this OK with you? If so, I would simply drop the current create
method and rename create_instance
to create
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point! I think it should be fine to just drop the current create
method and rename the create_instance
to create
, given that the current create
method will no longer be supported as of v4.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tushdante Thank you for your comment. I understand. I will modify the code as you mentioned.
# @since 4.0 | ||
# | ||
# @return success_count, total_count | ||
def users(params) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add @param params [JSON object] A hash containing the list of users to be added/removed/updated
as a comment to describe the input format
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tushdante
Thank you for your comment. I will add it.
lib/twitter-ads/client.rb
Outdated
@@ -3,7 +3,7 @@ | |||
|
|||
module TwitterAds | |||
|
|||
API_VERSION = '3'.freeze | |||
API_VERSION = '4'.freeze |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets leave this as 3
for now, given that this change will break all deprecated endpoints. We'll make the change once all the other v4 changes have been merged.
Left a couple comments @esakai ! Let me know if there's any additional questions. The changes should be simple enough and once we've merged this PR we can make the change to v4. |
How's this PR going? |
I have already implemented all parts I was requested to change. I am waiting for @tushdante 's review. |
It seems the code conflicts with master. |
6f46aec
to
9b0ffd1
Compare
Thank you for your notice. There is one more suggestion. |
I think so too. The document for the API is no longer available, too. I can't decide the scope of this PR (Maybe @jbabichjapan or @tushdante - gem maintainers can), but just in my opinion both of the way (below) are ok.
To maintainers, what do you think? |
@treby @esakai Thanks. As you noticed, some of the old Audience endpoints are no longer work in v5 and there are even more lines to be removed. We will take care that part in another PR, so let's freeze this PR for now and merge it as it's been a while since created last year. Though, thank you for your patience :) cc: @tushdante |
@esakai I think this PR is ready to merge (Perhaps you need to follow master branch :) ). |
The current create method will no longer be supported as of v4.
005ca25
to
a5bff88
Compare
@treby |
I think that this pull request should be merged because all the problems are solved now. I am wondering why this pull request is still open. |
What is the |
* Support for media library, media creative and account media endpoints (#185) * Bump version to v4 (#186) * make error handling image be shown (#177) * update twitter-ads version to 4.0.1 (#187) * Fix Rubocop Rules (#189) * update twitter-ads version to 4.0.1 * update rubocop.yml and tailored_audience.rb * Update to v5 (#191) * Added support for MEDIA_CREATIVE stats * added support for card_uris * updated example for v5 * updated TC line_item_id to line_item_ids * added support for with_draft * remove preview_url from all cards endpoints * Tailored Audience for v4 (#180) * Add a comment to TailoredAudience.users * Rename create_instance to create The current create method will no longer be supported as of v4. * Delele unused methods * Add (start|end)_time property to LineItem class #178 (#193) * Remove TONUpload class (#192) * Update SDK to support Ruby 2.3+ (#190) * Remove CI guards * Start upgrade to min 2.3. Rubocop auto fixes * Disable and update a handful of Rubocop warnings Disabled Linting warnings on using Void and URI:Escape * Update copyright * Test ruby 2.3+ on Travis CI * Add Ruby 2.6 to build matrix and correct copyright lint * Minor fix to copyright * Add rubocop as separate step to display errors * Make rubocop verbose to help debugging * Remove erroneous newline * Fix merge conflicts * Revert "Remove CI guards" This reverts commit 85db938. * Update supported Ruby versions and bump license year * Update LICENSE * Fix merge conflicts * Add ActiveEntities support (#195) * Add ActiveEntities support * Update style * Add new preview endpoint support (#194) * Minor bug fixes (#197) * Fix promoted_tweet example * Fix TypeError > no implicit conversion of nil into Hash (TypeError) when with_deleted is false * Improve Travis CI Tests (#196) * Update .travis.yml * Update README We no longer test JRuby since #133 * Set min version to 2.4 * Allow bundler 2 * Update .rubocop.yml * Update twitter-ads version to 5.1.0 (#198) * [docs] updating v5.1.0 documentation
* Add a comment to TailoredAudience.users * Rename create_instance to create The current create method will no longer be supported as of v4. * Delele unused methods
This is an implementation for Twitter Ads API v4 endpoints for tailored audiences.
Tests are not available yet.