GithubObject.edit => restore testEditAuthenticatedUser

This commit is contained in:
Vincent Jacques
2012-05-03 22:29:24 +01:00
parent 68329733db
commit 2f536fd95d
21 changed files with 590 additions and 124 deletions
+19 -1
View File
@@ -84,7 +84,25 @@ class Authorization( object ):
pass
def edit( self, scopes = None, add_scopes = None, remove_scopes = None, note = None, note_url = None ):
pass
post_parameters = {
}
if scopes is not None:
post_parameters[ "scopes" ] = scopes
if add_scopes is not None:
post_parameters[ "add_scopes" ] = add_scopes
if remove_scopes is not None:
post_parameters[ "remove_scopes" ] = remove_scopes
if note is not None:
post_parameters[ "note" ] = note
if note_url is not None:
post_parameters[ "note_url" ] = note_url
result = self.__github._dataRequest(
"PATCH",
"https://api.github.com/user",
None,
post_parameters
)
self.__useAttributes( result )
def __useAttributes( self, attributes ):
if "app" in attributes: