mirror of
https://github.com/status-im/PyGithub.git
synced 2026-08-31 19:01:15 +00:00
Authorizations: step 1
This commit is contained in:
+5
-5
@@ -1,13 +1,13 @@
|
||||
API `/authorizations`
|
||||
=====================
|
||||
* GET: (TODO SOON)
|
||||
* POST: (TODO SOON)
|
||||
* GET: `AuthenticatedUser.get_authorizations`
|
||||
* POST: `AuthenticatedUser.create_authorization`
|
||||
|
||||
API `/authorizations/:id`
|
||||
=========================
|
||||
* GET: (TODO SOON)
|
||||
* PATCH: (TODO SOON)
|
||||
* DELETE: (TODO SOON)
|
||||
* GET: `AuthenticatedUser.get_authorization`
|
||||
* PATCH: `Authorization.edit`
|
||||
* DELETE: `Authorization.delete`
|
||||
|
||||
API `/events`
|
||||
=============
|
||||
|
||||
@@ -58,6 +58,12 @@ Emails
|
||||
* `remove_from_emails( email, ... )`
|
||||
* `email`: string
|
||||
|
||||
Authorizations
|
||||
--------------
|
||||
* `get_authorizations()`: list of `Authorization`
|
||||
* `get_authorization( id )`: `Authorization`
|
||||
* `create_authorization()`: `Authorization`
|
||||
|
||||
Followers
|
||||
---------
|
||||
* `get_followers()`: list of `NamedUser`
|
||||
@@ -102,6 +108,20 @@ Gists
|
||||
* `create_gist( public, files, [description] )`: `Gist`
|
||||
* `get_starred_gists()`: list of `Gist`
|
||||
|
||||
Class `Authorization`
|
||||
=====================
|
||||
|
||||
Attributes
|
||||
----------
|
||||
|
||||
Modification
|
||||
------------
|
||||
* `edit()`
|
||||
|
||||
Deletion
|
||||
--------
|
||||
* `delete()`
|
||||
|
||||
Class `Branch`
|
||||
==============
|
||||
|
||||
|
||||
@@ -3,6 +3,16 @@ import urllib
|
||||
|
||||
from GithubObject import *
|
||||
|
||||
Authorization = GithubObject(
|
||||
"Authorization",
|
||||
BaseUrl( lambda obj: "/authorizations/" + str( obj.id ) ),
|
||||
InternalSimpleAttributes(
|
||||
### @todo
|
||||
),
|
||||
Editable( [], [] ), ### @todo
|
||||
Deletable(),
|
||||
)
|
||||
|
||||
AuthenticatedUser = GithubObject(
|
||||
"AuthenticatedUser",
|
||||
BaseUrl( lambda obj: "/user" ),
|
||||
@@ -20,6 +30,12 @@ AuthenticatedUser = GithubObject(
|
||||
SeveralElementsAddable(),
|
||||
SeveralElementsRemovable()
|
||||
),
|
||||
ExternalListOfObjects( "authorizations", "authorization", Authorization,
|
||||
ListGetable( [], [] ),
|
||||
ElementGetable( [ "id" ], [] ),
|
||||
ElementCreatable( [], [] ), ### @todo
|
||||
### url = "/authorizations", ### @todo
|
||||
),
|
||||
)
|
||||
|
||||
NamedUser = GithubObject(
|
||||
|
||||
Reference in New Issue
Block a user