Closed allerter closed 3 years ago
@johnwmillr, this PR is ready to be merged.
The OAuth2 can't really be tested since it requires user input. But we could use a mock request just to test that it returns the correct result.
I added the tests for the OAuth2
class and the utils
functions. But now the tests require three more env vars: GENIUS_CLIENT_ID
, GENIUS_CLIENT_SECRET
, GENIUS_REDIRECT_URI
.
@Allerter, I'm not sure why the commits from your PRs have been getting squashed, but I just now turned off the "Allow merge commits" option for this repository. Hopefully that resolves the issue.
This PR completes the support of LyricsGenius of all the API endpoints available. I've also added the OAuth2 class with its docs, examples, and tests. I double if anyone will be using the endpoints that require a user access token, but it's nice to have them available just in case. I also added some text to
contributing.rst
so that users who want to contribute can check the styling of their code before opening their PR. I think it's also important to note that I renamed all instances ofGENIUS_CLIENT_ACCESS_TOKEN
TOGENIUS_ACCESS_TOKEN
to avoid confusion since client access token is just one of the two kinds of tokens available: client access tokens and user tokens. The tests will also need a user token will all permissions token to be able to test the methods that are already implemented and the new ones that require a user access token with sufficient permission.