Description
Hi,
According to the github documentation, the API return on /user
is different when the user is authenticated through OAuth without the user
scope from when it is authenticated with the user
scope.
https://developer.github.com/v3/users/#get-the-authenticated-user
But the library seems to handle only users with the user
scope.
When the user
scope is not used, the api returns fewer fields: for instance, the disk_usage
field is not returned, and when trying to load the return into an AuthenticatedUser
here:
Lines 1004 to 1019 in bf44c16
I get the following error:
IncompleteResponse: None The library was expecting more data in the response (KeyError('disk_usage',)). Either GitHub modified it's response body, or your token is not properly scoped to retrieve this information.
I think this function should not always try to load the result into an AuthenticatedUser
, but first check the fields of the API's response and try to load a User
if some fields are missing.
Because of this behavior, we have to keep using the version 1.0.0a4 and cannot upgrade to version 1.0.1
If you think this is a valid issue, I can work on a pull request to fix it.
Thanks