twitter-lite
twitter-lite copied to clipboard
Support other Twitter APIs
This issue is meant to track support for these new Twitter APIs; #50 and #55 are subsumed under this issue. Because we already support GET, POST, and PUT requests to any subdomain of twitter.com
(see the Twitter
constructor, namely the subdomain
property), I'm not even sure that much has to be done for these new APIs besides some testing - with the exception of Filtered Streams, which I believe will require more work.
If anyone chooses to tackle one of these new APIs, please open a separate issue so we can track/discuss your progress there.
On a side note, you can see all the API endpoints at https://developer.twitter.com/en/docs/api-reference-index.
New Twitter APIs
- [ ] Filtered Stream - most important
- [ ] Ads
- [ ] Engagement
- [ ] Account Activity - please see #27 (the existing issue) for more info
one thing I don't know if it's related is that some of these endpoints doesn't have .json
at the end of the url, but now it's by default appending .json
to everything.
The .json appends are not present in the new version of the API - that was a partial holdover from back when the API used to support both XML and JSON, so it was time to clean that up as we looked at a full redesign.
I tried creating the client with putting version
as 'labs/2', and it appended .json, which was not required and gave an error.
When can we expect the support for Labs API?
I tried twitter-lite
with the ads api using
const twitter = new Twitter({
consumer_key,
consumer_secret,
access_token_key,
access_token_secret,
subdomain: "ads-api",
version: 9,
});
I was able to get scheduled tweets, but both creating a scheduled tweed and updating an existing one failed with errors that made no sense to me.