This part of the documentation covers the
Two authorization instances can be checked like so:
a1 == a2 a1 != a2
And is equivalent to:
a1.id == a2.id a1.id != a2.id
Details about the application (name, url)
datetime object representing when the authorization was created.
delete this authorization
Return an instance of
Unique id of the authorization
Note about the authorization
URL about the note
Number of requests before GitHub imposes a ratelimit.
Re-retrieve the information for this object and returns the refreshed instance.
Parameters: conditional (bool) – If True, then we will search for a stored header (‘Last-Modified’, or ‘ETag’) on the object and send that as described in the Conditional Requests section of the docs Returns: self
The reasoning for the return value is the following example:
repos = [r.refresh() for r in g.iter_repos('kennethreitz')]
Without the return value, that would be an array of
None‘s and you would otherwise have to do:
repos = [r for i in g.iter_repos('kennethreitz')] [r.refresh() for r in repos]
Which is really an anti-pattern.
Changed in version 0.5.
List of scopes this applies to
Return the json representing this object.
Returns the Authorization token
update(scopes=, add_scopes=, rm_scopes=, note=u'', note_url=u'')¶
Update this authorization.
- scopes (list) – (optional), replaces the authorization scopes with these
- add_scopes (list) – (optional), scopes to be added
- rm_scopes (list) – (optional), scopes to be removed
- note (str) – (optional), new note about authorization
- note_url (str) – (optional), new note URL about this authorization
datetime object representing when the authorization was updated.