Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #11. This PR adds OAuth 2.0 user authentication, including automatic token refreshing and deprecation of OAuth 1.0a authentication methods.
To do:
FixDeprecate methods that rely on OAuth 1.0a (media methods). Unfortunately media methods don't support OAuth 2.0 authentication. When Twitter eventually adds V2 media endpoints, they might have a different API which means that both Twift's current media methods and new ones might coexist; I'll plan to mark the current method as deprecated in advance of this change.Add scope checks for methods. Most (all?) OAuth 2.0 endpoints have specific scopes that can use them. To save network trips, it might be nice to throw errors when an attempt is made to call a method with the wrong scope.Decided against this as it would just end up adding layers of misdirection between the library and Twitter's API; Twitter's errors should be enough to communicate insufficient scope errors.