mirror of
https://github.com/status-im/PyGithub.git
synced 2026-09-01 11:21:16 +00:00
Fix code generation and tests after reorganization
This commit is contained in:
+11
-11
@@ -1,9 +1,9 @@
|
||||
from Requester import Requester
|
||||
import GithubObjects.AuthenticatedUser
|
||||
import GithubObjects.NamedUser
|
||||
import GithubObjects.Organization
|
||||
import GithubObjects.Gist
|
||||
import GithubObjects.PaginatedList
|
||||
import AuthenticatedUser
|
||||
import NamedUser
|
||||
import Organization
|
||||
import Gist
|
||||
import PaginatedList
|
||||
|
||||
class Github:
|
||||
def __init__( self, login, password ):
|
||||
@@ -15,32 +15,32 @@ class Github:
|
||||
"url": "https://api.github.com/user", # @todo Erf, this url is replaced by /users/login when __complete is called...
|
||||
# "login": self.__login # @todo ?
|
||||
}
|
||||
return GithubObjects.AuthenticatedUser.AuthenticatedUser( self.__requester, attributes, lazy = True )
|
||||
return AuthenticatedUser.AuthenticatedUser( self.__requester, attributes, lazy = True )
|
||||
else:
|
||||
attributes = {
|
||||
"url": "https://api.github.com/users/" + login,
|
||||
"login": login,
|
||||
}
|
||||
return GithubObjects.NamedUser.NamedUser( self.__requester, attributes, lazy = False )
|
||||
return NamedUser.NamedUser( self.__requester, attributes, lazy = False )
|
||||
|
||||
def get_organization( self, login ):
|
||||
attributes = {
|
||||
"url": "https://api.github.com/orgs/" + login,
|
||||
"login": login,
|
||||
}
|
||||
return GithubObjects.Organization.Organization( self.__requester, attributes, lazy = False )
|
||||
return Organization.Organization( self.__requester, attributes, lazy = False )
|
||||
|
||||
def get_gist( self, id ):
|
||||
attributes = {
|
||||
"url": "https://api.github.com/gists/" + str( id ),
|
||||
"id": id,
|
||||
}
|
||||
return GithubObjects.Gist.Gist( self.__requester, attributes, lazy = False )
|
||||
return Gist.Gist( self.__requester, attributes, lazy = False )
|
||||
|
||||
def get_gists( self ):
|
||||
status, headers, data = self.__requester.request( "GET", "https://api.github.com/gists/public", None, None )
|
||||
return GithubObjects.PaginatedList.PaginatedList(
|
||||
GithubObjects.Gist.Gist,
|
||||
return PaginatedList.PaginatedList(
|
||||
Gist.Gist,
|
||||
self.__requester,
|
||||
headers,
|
||||
data
|
||||
|
||||
Reference in New Issue
Block a user