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:
@@ -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