mirror of
https://github.com/status-im/PyGithub.git
synced 2026-08-31 10:51:14 +00:00
3.4 KiB
3.4 KiB
You don't normaly create instances of any class but Github.
You obtain instances through calls to get_ and create_ methods.
In this documentation:
loginis a string containing a user's or organization's loginuseris an instance ofAuthenticatedUserorNamedUsernameis a string containing the name of a repositoryrepois an instance ofRepository
Class Github
- Constructed from user's login and password
get_user():AuthenticatedUserget_user( login ):NamedUserget_organization( login ):Organization
Class AuthenticatedUser
Repositories
get_repos(): list ofRepository: see API fortypeparameterget_repo( name ):Repositorycreate_repo( ... ):Repository: see API for parameterscreate_fork( repo ):Repository
Watching
get_watched(): list ofRepositoryhas_in_watched( repo ):booladd_to_watched( repo )remove_from_watched( repo )
Organizations
get_orgs(): list ofOrganization
Following
get_followers(): list ofNamedUserget_following(): list ofNamedUserhas_in_following( user ):booladd_to_following( user )remove_from_following( user )
Class NamedUser
- Attributes: see API
Repositories
get_repos(): list ofRepository: see API fortypeparameterget_repo( name ):Repository
Watching
get_watched(): list ofRepository
Organizations
get_orgs(): list ofOrganization
Following
get_followers(): list ofNamedUserget_following(): list ofNamedUser
Class Organization
Repositories
get_repos(): list ofRepository: see API fortypeparameterget_repo( name ):Repositorycreate_repo( ... ):Repository: see API for parameterscreate_fork( repo ):Repository
Members
get_members(): list ofNamedUserhas_in_members( user ):boolremove_from_members( user )get_public_members(): list ofNamedUserhas_in_public_members( user ):booladd_to_public_members( user )remove_from_public_members( user )
Class Repository
Collaborators
get_collaborators(): list ofNamedUserhas_in_collaborators( user ):booladd_to_collaborators( user )remove_from_collaborators( user )
Contributors
get_contributors(): list ofNamedUser
Watching
get_watchers(): list ofNamedUser
Forks
get_forks(): list ofRepository