mirror of
https://github.com/status-im/PyGithub.git
synced 2026-08-31 19:01:15 +00:00
9.5 KiB
9.5 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 )
Emails
get_emails()list of stringsadd_to_emails( email, ... )remove_from_emails( email, ... )
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 )
Teams
get_teams(): list ofTeamcreate_team( ... ):Team: see API for parameters
Class Repository
- Attributes: see API
edit( ... ): see API for parametersget_languages(): dictionary of strings to integers
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
Git objects
get_git_refs(): list ofGitRefget_git_ref( ref ):GitRefcreate_git_ref( ... ):GitRef: see API for parametersget_git_blob( sha ):GitBlobcreate_git_blob( ... ):GitBlob: see API for parametersget_git_commit( sha ):GitCommitcreate_git_commit( ... ):GitCommit: see API for parametersget_git_tree( sha ):GitTreecreate_git_tree( ... ):GitTree: see API for parametersget_git_tag( sha ):GitTagcreate_git_tag( ... ):GitTag: see API for parameters
Tags, branches, commits
get_tags(): list ofTagget_branches(): list ofBranchget_commits( ... ): list ofCommit: see API for parametersget_commit( sha ):Commitget_comments(): list ofCommitCommentget_comment( id ):CommitComment
Teams
get_teams(): list ofTeam
Issues and milestones
get_labels(): list ofLabelcreate_label( ... ):Label: see API for parametersget_label( id ):Labelget_issues( ... ): list ofIssue: see API for parameterscreate_issue( ... ):Issue: see API for parametersget_issue( id ):Issueget_milestones( ... ): list ofMilestone: see API for parameterscreate_milestone( ... ):Milestone: see API for parametersget_milestone( number ):Milestone
Downloads
Repository.get_downloads() list of Download
Repository.create_download( ... ): Download: see API
Repository.get_download( id ): Download
Class Tag
- Attributes: see API
Class Branch
- Attributes: see API
Class Commit
- Attributes: see API
get_comments(): list ofCommitCommentcreate_comment( ... ):CommitComment: see API for parameters
Class CommitComment
Class Download
- Attributes: see API
delete()
Class Label
Class Issue
- Attributes: see API
edit( ... ): see API for parametersget_labels(): list ofLabeladd_to_labels( label, ... )set_labels( label, ... )delete_labels()remove_from_labels( label )get_comments(): list ofIssueCommentcreate_comment( ... ):IssueComment: see API for parametersget_comment( id ):IssueComment
Class IssueComment
Class Milestone
Class Team
Members
get_members(): list ofNamedUserhas_in_members( user ):booladd_to_members( user )remove_from_members( user )
Repositories
get_repos(): list ofRepositoryhas_in_repos( user ):booladd_to_repos( user )remove_from_repos( user )
Class GitRef
Class GitBlob
- Attributes: see API
Class GitCommit
- Attributes: see API
Class GitTree
- Attributes: see API
Class GitTag
- Attributes: see API