Skip to content
This repository has been archived by the owner on Mar 11, 2023. It is now read-only.

Support for full-archive / academic research track endpoints #368

Closed
wants to merge 9 commits into from

Conversation

TheConner
Copy link

@TheConner TheConner commented Feb 23, 2021

Decouples Client from OAuthClient in order to support bearer-token authentication. Thus, we can use Bearer-token authentication for endpoints like this one

  • This adds REST support for the aforementioned full archive support endpoint
  • This also adds support for oauth 2.0 bearer token authentication. Note that bearer token derivation is not added, just using a bearer token that is passed

Related to #366

- Modification of configurations to take a `TWITTER_BEARER_TOKEN` env variable or a `twitter.bearer.token` configuration value
- Introduced a BearerTokenClient that can integrate with the rest of Twitter4s
…hentication

This refactor adds bearer token support, along with refatoring existing "Client" code to be decoupled from OAuthClient
- Change boolean back to false (Client)
- Convert Configurations to use Options over setting things to null
- Logic for restclient to create a client based on authmode
- Build in entities for full-text search responses as they are not compatible with existing Tweet entities
- Fix TwitterSearchAllParamaters to use the correct name for query
- Lose my will to live trying to debug the network response unmarshalling by this library
@TheConner
Copy link
Author

Build failed 😕 we are having a classic scenario of "it works on my machine" ... I'll investigate

@TheConner TheConner changed the title PR: Support for full-archive / academic research track endpoints Support for full-archive / academic research track endpoints Feb 25, 2021
- Make RestClient take in a v1 or v2 client that must be defined externally
- Fix config test case that I changed
- Undo config change that I made
- Change TwitterRestClient to derive clients itself, not be dependent on authmode
- Remove oauthmode, was an anti-pattern I introduced
@DanielaSfregola
Copy link
Owner

DanielaSfregola commented Mar 3, 2021

Thanks for updating the PR - unfortunately there are still some stylistic issues to solve - for example the use of .get and some code duplication in the authentication clients

I'll see if I can polish it off this weekend :)

{ you can follow my progress on this branch: https://github.com/DanielaSfregola/twitter4s/tree/368_followup }

@TheConner
Copy link
Author

Sounds good to me. Let me know if there's anything else I can do, for now I'm adding some extra features to the new endpoint which I needed for my research, so after you're done your changes I can probably integrate the additional endpoint functionality in. Or, alternatively, that may be another PR 😉

@DanielaSfregola
Copy link
Owner

Closing this in favour of the follow up I am started -- see https://github.com/DanielaSfregola/twitter4s/tree/368_followup

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants