-
Notifications
You must be signed in to change notification settings - Fork 100
Support for full-archive / academic research track endpoints #366
Comments
Hi @TheConner, Unfortunately, we do not support any v2 endpoint yet (simply due to lack of time) - but this shouldn't be too hard to do if you want to give it a try! PRs are always welcome -- ( and happy to advise/support you in the process). The authentication seems to be the same, although it seems like you need a token that is approved for Academic Research (which I do not have, but I am going to assume you do)...so that is something that you shouldn't worry about. My suggestion is to create a new trait for the Rest client (similar to any of the ones listed here) in which you define the shape of your endpoint and the params to pass to it. Cheers, |
Hi @DanielaSfregola
Thank you for the guidance! I'm new to the Scala way of doing things, so I may be missing out on some things that are just common sense to more seasoned Scala developers. Regards, Edit: I think I found some answers to my bearer authentication issues in issue #237 - going to investigate the changes there :) |
Thanks for helping with the library! Do not worry if you are new to Scala, I will help you with that ;) |
Also, you do not need to have a PR ready to ask for help - if you get stuck just ping me a branch and I can advise/help :) |
Added a bearer token client in my fork - moving on to integrating it with full archive search. I looked through the tests and I couldn't find any for |
A question: with this new BearerTokenClient, I think it can be used in RestClient; however, it looks like that main rest client based off of |
We do not have tests just for the Decoupling
|
Update: there is a bug in my initial implementation, although figuring out why this is happening is a tad cryptic. Oddly enough all the tests pass, but when I use twitter4s within my application I get
Continuing to investigate... |
Something to do with JSON support when initializing the RestClient.... (I did a quick look at the code - just looking, didn't check it out -- and didn't see anything obvious) |
It was due to a dependency issue, my application uses a different scala version (Apache spark is behind a few versions) so I had to build twitter4s for a different scala version & some of the dependency changes I made on my end didn't work. Also, building twitter4s as a jar and importing that jar in meant that I had to manually include dependencies Anywho, after that and some other dependency pains I managed to fix the issues in my implementation, so now I'm sucessfully using twitter4s using bearer-token auth with the full-archive search endpoint! PR is made, let me know if there's any changes you would like me to make to it :) |
Hello 😃 this library has been great to use, it's been incredibly useful with the research work I have been doing.
Currently, if my understanding is correct this only supports the "standard" search endpoints
search/tweets.json
After doing some digging I've found that this endpoint won't offer the amount of data needed for the research I'm doing, thus I would need something like this endpoint for full-archive search which seems to only be offered under the v2 of the twitter API,
/2/tweets/search/all
(which is only for the academic research product track, interestingly)I'm not sure if that is something this project supports, in the case that it's not supported yet I'm assuming there's a fair amount of technical debt in order to make this library compatible?
Since most of my research work depends on this Scala library, I'd be happy to contribute if need be :)
The text was updated successfully, but these errors were encountered: