-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add ads api support [WIP] #687
Conversation
This reverts commit 29207af.
caching is also possible, but if you do choose to add it, it is highly recommended to also add `bundle update` in a `before_script` section
use --retry and --jobs to bundle install faster
Closes sferik#614 Closes sferik#615
Closes sferik#520.
Updated documentation to note that the text of a status must begin with an @-mention when replying to statuses other than those originally posted by the authenticated user.
in_reply_to_status rules clarification
@thomas-holmes do you want help with this? |
Documentation sample for segmentation shows no 'id' key being present in the response. I've added it into the fixture data because I assume this is an error in twitter's documentation. I cannot currently query stats (don't know why) so I can't double check at the moment.
Unfortunately this hides the (fairly important) rate-limiting information that is contained in the response headers.
So I just added all of the stats endpoints though I have a few pending issues.
|
So I've somewhat tracked down the issue: It seems that httprb/http versions >= 8.0 change something in the way query parameters are encoded which causes a mismatch during oauth signing and validation. The specific case I've tracked down is colons in date strings. If you supply a string with colons the signature gets generated (with colons being encoded as According to twitter's oauth documentation colons do not need to be encoded so perhaps the oauth library is incorrect? @sferik Any intuition as to who which library is "responsible" for this problem? |
A simple interim fix seems be to just roll the http dependency back to |
I would open an issue with the It looks like |
Issue with escaping colon fixed in |
Also expose `#rate_limit` method on Twitter::Stats. I'm not really happy with this method of accomplishing this but it seems good enough for now. It seems fairly important to have the rate limit information available while making requests to the twitter API so I'm sticking the Twitter::RateLimit object for the request that generated it into each created Twitter::Stats. Perhaps further consideration will indicate that it's not necessary until the rate limit is reached.
0.8.14 Contains a fix with the encoding/normalization of query parameters that is necessary for oauth signatures to work correctly.
The code used to work but some change (I think twitter) converted working requests into failed requests. Apparently Content-Type of multipart/form-data causes uploads to get rejected as 400 Bad Request. Setting the content type to 'text/comma-separated-values' allows the upload to work. However, this definitely needs more love. I think the hack I put in is pretty terrible and mostly dupes the code but I don't have time to figure out a more concise method.
0c18bf5
to
925baa2
Compare
@thomas-holmes Based on the discussion in #671, we've decided it makes more sense to point to Twitter's SDK. Undoubtedly your work here reflects a considerable amount of effort and while we aren't going to merge this in right now, I'd be remiss if I didn't thank you for opening this pull request and bringing this very close to the finish line. Thanks for contributing! 💯 |
Accounts
Campaigns
Line Items
Promoted Accounts
Promotable Users
Promoted Tweets
Funding Instruments
Targeting Suggestions
Reach Estimate
Targeting Criteria
Tailored Audiences
Tweet!
Mobile App Cards
Mobile App (Image) Cards
Lead Gen Cards
Website Cards
App Events
Web Events
Scoped Timeline
Bidding Rules
Card Stats
Campaign Stats
Funding Instrument Stats
Line Item Stats
Promoted Account Stats
Promoted Tweets Stats
Account Stats