mirror of
https://github.com/status-im/PyGithub.git
synced 2026-08-31 10:51:14 +00:00
9.8 KiB
9.8 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
Emails
get_emails(): list of stringsadd_to_emails( email, ... )*remove_from_emails( email, ... )*
Followers
get_followers(): list ofNamedUser
Following
get_following(): list ofNamedUseradd_to_following( user )*remove_from_following( user )*has_in_following( user ):bool*
Orgs
get_orgs(): list ofOrganization
Repos
get_repos(): list ofRepository: see API fortypeparameterget_repo( name ):Repositorycreate_repo( ... ):Repository: see API for parameterscreate_fork( repo ):Repository
Watched
get_watched(): list ofRepositoryadd_to_watched( repo )*remove_from_watched( repo )*has_in_watched( repo ):bool*
Class Branch
- Attributes: see API
Class Commit
- Attributes: see API
Comments
get_comments(): list ofCommitCommentcreate_comment( ... ):CommitComment: see API for parameters
Class CommitComment
Class Download
- Attributes: see API
delete()
Class GitBlob
- Attributes: see API
Class GitCommit
- Attributes: see API
Class GitRef
Class GitTag
- Attributes: see API
Class GitTree
- Attributes: see API
Class Issue
Labels
get_labels(): list ofLabeladd_to_labels( label, ... )*set_labels( label, ... )*delete_labels()remove_from_labels( label )*
Comments
get_comments(): list ofIssueCommentget_comment( id ):IssueCommentcreate_comment( ... ):IssueComment: see API for parameters
Class IssueComment
Class Label
Class Milestone
Class NamedUser
- Attributes: see API
Followers
get_followers(): list ofNamedUser
Following
get_following(): list ofNamedUser
Orgs
get_orgs(): list ofOrganization
Repos
get_repos(): list ofRepository: see API fortypeparameterget_repo( name ):Repository
Watched
get_watched(): list ofRepository
Class Organization
Public members
get_public_members(): list ofNamedUseradd_to_public_members( user )*remove_from_public_members( user )*has_in_public_members( user ):bool*
Members
get_members(): list ofNamedUserremove_from_members( user )*has_in_members( user ):bool*
Repos
get_repos(): list ofRepository: see API fortypeparameterget_repo( name ):Repositorycreate_repo( ... ):Repository: see API for parameterscreate_fork( repo ):Repository
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 ofNamedUseradd_to_collaborators( user )*remove_from_collaborators( user )*has_in_collaborators( user ):bool*
Contributors
get_contributors(): list ofNamedUser
Watchers
get_watchers(): list ofNamedUser
Git refs
get_git_refs(): list ofGitRefget_git_ref( ref ):GitRefcreate_git_ref( ... ):GitRef: see API for parameters
Git commits
get_git_commit( sha ):GitCommitcreate_git_commit( ... ):GitCommit: see API for parameters
Git trees
get_git_tree( sha ):GitTreecreate_git_tree( ... ):GitTree: see API for parameters
Git blobs
get_git_blob( sha ):GitBlobcreate_git_blob( ... ):GitBlob: see API for parameters
Git tags
get_git_tag( sha ):GitTagcreate_git_tag( ... ):GitTag: see API for parameters
Labels
get_labels(): list ofLabelcreate_label( ... ):Label: see API for parametersget_label( id ):Label
Milestones
get_milestones( ... ): list ofMilestone: see API for parameterscreate_milestone( ... ):Milestone: see API for parametersget_milestone( number ):Milestone
Issues
get_issues( ... ): list ofIssue: see API for parameterscreate_issue( ... ):Issue: see API for parametersget_issue( id ):Issue
Downloads
Repository.get_downloads() list of Download
Repository.create_download( ... ): Download: see API
Repository.get_download( id ): Download
Comments
get_comments(): list ofCommitCommentget_comment( id ):CommitComment
Commits
get_commits( ... ): list ofCommit: see API for parametersget_commit( sha ):Commit
Tags
get_tags(): list ofTag
Branches
get_branches(): list ofBranch
Forks
get_forks(): list ofRepository
Teams
get_teams(): list ofTeam
Class Tag
- Attributes: see API
Class Team
Members
get_members(): list ofNamedUseradd_to_members( user )*remove_from_members( user )*has_in_members( user ):bool*
Repos
get_repos(): list ofRepositoryadd_to_repos( repo )*remove_from_repos( repo )*has_in_repos( repo ):bool*