redouane59 / twittered

Twitter API client for Java developers
Apache License 2.0
235 stars 64 forks source link

Does v1.1 Premium APIs work seamlessly with v2 methods? #364

Open sriharigr-threado opened 2 years ago

sriharigr-threado commented 2 years ago

Hey, first of all thanks for building the client.

I am a bit new to this and have a question related to v1.1 and v2. We have bought premium v1.1 API. We intend to use 30 days search tweets API. When I invoke, searchTweets() of your client, v2 API is being invoked. And the function which invokes v1.1 search API is deprecated. Does v2 return premium API response itself or how does it work? Can you please explain?

Thanks :)

redouane59 commented 2 years ago

Hey, I'm currently in holiday without laptop. You can check the javadoc which should give the called URL but to me, there are two endpoints V2 and two methods. One for 7 days tweets and an other one for all tweets (the method should be called searchAllTweets()). If you use the second method, it will call the premium endpoint.

sriharigr-threado commented 2 years ago

Hey. Actually both of the V2 endpoints are completely inconvenient. search/recent only returns 7 days. And search/all is only for Academic Research projects. We are unfortunately forced to use deprecated methods which are using v1.1 for now. Very disappointed. Thanks for your quick response though. Have a good holiday :)

redouane59 commented 2 years ago

Ah yes, you're right. Maybe the deprecated tag is not correct because twitter didn't replace it yet with a V2 equivalent. But it's not forbidden to use a deprecated method so waiting for someone new, you can still call it :)

redouane59 commented 2 years ago

Hey,

I just came back from holiday, can you confirm to me that the deprecated method is working fine and that you don't face any other problem that the deprecated warning ?

sriharigr-threado commented 2 years ago

Hey @redouane59 Yes, I have gone ahead with the deprecated method and didn't face any other issue. Any plans to include Activity v1.1 related support? At least to add webhook, add subscription, delete subscription. The authentication part in these APIs is a bit tricky. Thanks though :)

redouane59 commented 2 years ago

Currently I only implement new v2 endpoints during my spare time, but if you have some availability, feel free to submit pull requests which implement what you need :)

sriharigr-threado commented 2 years ago

Hey @redouane59, Sounds cool. Will try doing it. Thank you :)