UserKey: step 1

This commit is contained in:
Vincent Jacques
2012-03-01 17:45:41 +01:00
parent b53f96bafa
commit f02c938974
3 changed files with 41 additions and 6 deletions
+16 -1
View File
@@ -5,7 +5,17 @@ from GithubObject import *
Authorization = GithubObject(
"Authorization",
BaseUrl( lambda obj: "/authorizations/" + str( obj.id ) ),
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
),
Editable( [], [] ), ### @todo
Deletable(),
)
UserKey = GithubObject(
"UserKey",
BaseUrl( lambda obj: "/user/keys/" + str( obj.id ) ),
InternalSimpleAttributes(
### @todo
),
@@ -36,6 +46,11 @@ AuthenticatedUser = GithubObject(
ElementCreatable( [], [] ), ### @todo
### url = "/authorizations", ### @todo
),
ExternalListOfObjects( "keys", "key", UserKey,
ListGetable( [], [] ),
ElementGetable( [ "id" ], [] ),
ElementCreatable( [], [] ), ### @todo
),
)
NamedUser = GithubObject(