mirror of
https://github.com/status-im/PyGithub.git
synced 2026-09-01 11:21:16 +00:00
Authorizations: step 2
This commit is contained in:
+11
-2
@@ -62,7 +62,7 @@ Authorizations
|
||||
--------------
|
||||
* `get_authorizations()`: list of `Authorization`
|
||||
* `get_authorization( id )`: `Authorization`
|
||||
* `create_authorization()`: `Authorization`
|
||||
* `create_authorization( [scopes, note, note_url] )`: `Authorization`
|
||||
|
||||
Keys
|
||||
----
|
||||
@@ -119,10 +119,19 @@ Class `Authorization`
|
||||
|
||||
Attributes
|
||||
----------
|
||||
* `id`
|
||||
* `url`
|
||||
* `scopes`
|
||||
* `token`
|
||||
* `app`
|
||||
* `note`
|
||||
* `note_url`
|
||||
* `updated_at`
|
||||
* `created_at`
|
||||
|
||||
Modification
|
||||
------------
|
||||
* `edit()`
|
||||
* `edit( [scopes, add_scopes, remove_scopes, note, note_url] )`
|
||||
|
||||
Deletion
|
||||
--------
|
||||
|
||||
@@ -7,9 +7,10 @@ Authorization = GithubObject(
|
||||
"Authorization",
|
||||
BaseUrl( lambda obj: "/authorizations/" + str( obj.id ) ), ### @todo make the lambda return a tuple, and BaseUrl convert elements to strings and join them with "/"
|
||||
InternalSimpleAttributes(
|
||||
### @todo
|
||||
"id", "url", "scopes", "token", "app", "note", "note_url", "updated_at",
|
||||
"created_at",
|
||||
),
|
||||
Editable( [], [] ), ### @todo
|
||||
Editable( [], [ "scopes", "add_scopes", "remove_scopes", "note", "note_url" ] ),
|
||||
Deletable(),
|
||||
)
|
||||
|
||||
@@ -43,8 +44,8 @@ AuthenticatedUser = GithubObject(
|
||||
ExternalListOfObjects( "authorizations", "authorization", Authorization,
|
||||
ListGetable( [], [] ),
|
||||
ElementGetable( [ "id" ], [] ),
|
||||
ElementCreatable( [], [] ), ### @todo
|
||||
### url = "/authorizations", ### @todo
|
||||
ElementCreatable( [], [ "scopes", "note", "note_url" ] ),
|
||||
url = "/authorizations",
|
||||
),
|
||||
ExternalListOfObjects( "keys", "key", UserKey,
|
||||
ListGetable( [], [] ),
|
||||
|
||||
Reference in New Issue
Block a user