desc
stringlengths
3
26.7k
decl
stringlengths
11
7.89k
bodies
stringlengths
8
553k
':type: string'
@property def statuses_url(self):
self._completeIfNotSet(self._statuses_url) return self._statuses_url.value
':type: string'
@property def subscribers_url(self):
self._completeIfNotSet(self._subscribers_url) return self._subscribers_url.value
':type: string'
@property def subscription_url(self):
self._completeIfNotSet(self._subscription_url) return self._subscription_url.value
':type: string'
@property def svn_url(self):
self._completeIfNotSet(self._svn_url) return self._svn_url.value
':type: string'
@property def tags_url(self):
self._completeIfNotSet(self._tags_url) return self._tags_url.value
':type: string'
@property def teams_url(self):
self._completeIfNotSet(self._teams_url) return self._teams_url.value
':type: string'
@property def trees_url(self):
self._completeIfNotSet(self._trees_url) return self._trees_url.value
':type: datetime.datetime'
@property def updated_at(self):
self._completeIfNotSet(self._updated_at) return self._updated_at.value
':type: string'
@property def url(self):
self._completeIfNotSet(self._url) return self._url.value
':type: integer'
@property def watchers(self):
self._completeIfNotSet(self._watchers) return self._watchers.value
':type: integer'
@property def watchers_count(self):
self._completeIfNotSet(self._watchers_count) return self._watchers_count.value
':calls: `PUT /repos/:owner/:repo/collaborators/:user <http://developer.github.com/v3/repos/collaborators>`_ :param collaborator: string or :class:`github.NamedUser.NamedUser` :rtype: None'
def add_to_collaborators(self, collaborator):
assert (isinstance(collaborator, github.NamedUser.NamedUser) or isinstance(collaborator, (str, unicode))), collaborator if isinstance(collaborator, github.NamedUser.NamedUser): collaborator = collaborator._identity (headers, data) = self._requester.requestJsonAndCheck('PUT', ((self.url + '/collabora...
':calls: `GET /repos/:owner/:repo/compare/:base...:head <http://developer.github.com/v3/repos/commits>`_ :param base: string :param head: string :rtype: :class:`github.Comparison.Comparison`'
def compare(self, base, head):
assert isinstance(base, (str, unicode)), base assert isinstance(head, (str, unicode)), head (headers, data) = self._requester.requestJsonAndCheck('GET', ((((self.url + '/compare/') + base) + '...') + head)) return github.Comparison.Comparison(self._requester, headers, data, completed=True)
':calls: `POST /repos/:owner/:repo/git/blobs <http://developer.github.com/v3/git/blobs>`_ :param content: string :param encoding: string :rtype: :class:`github.GitBlob.GitBlob`'
def create_git_blob(self, content, encoding):
assert isinstance(content, (str, unicode)), content assert isinstance(encoding, (str, unicode)), encoding post_parameters = {'content': content, 'encoding': encoding} (headers, data) = self._requester.requestJsonAndCheck('POST', (self.url + '/git/blobs'), input=post_parameters) return github.GitBlob...
':calls: `POST /repos/:owner/:repo/git/commits <http://developer.github.com/v3/git/commits>`_ :param message: string :param tree: :class:`github.GitTree.GitTree` :param parents: list of :class:`github.GitCommit.GitCommit` :param author: :class:`github.InputGitAuthor.InputGitAuthor` :param committer: :class:`github.Inpu...
def create_git_commit(self, message, tree, parents, author=github.GithubObject.NotSet, committer=github.GithubObject.NotSet):
assert isinstance(message, (str, unicode)), message assert isinstance(tree, github.GitTree.GitTree), tree assert all((isinstance(element, github.GitCommit.GitCommit) for element in parents)), parents assert ((author is github.GithubObject.NotSet) or isinstance(author, github.InputGitAuthor)), author ...
':calls: `POST /repos/:owner/:repo/git/refs <http://developer.github.com/v3/git/refs>`_ :param ref: string :param sha: string :rtype: :class:`github.GitRef.GitRef`'
def create_git_ref(self, ref, sha):
assert isinstance(ref, (str, unicode)), ref assert isinstance(sha, (str, unicode)), sha post_parameters = {'ref': ref, 'sha': sha} (headers, data) = self._requester.requestJsonAndCheck('POST', (self.url + '/git/refs'), input=post_parameters) return github.GitRef.GitRef(self._requester, headers, data...
':calls: `POST /repos/:owner/:repo/git/tags <http://developer.github.com/v3/git/tags>`_ :param tag: string :param message: string :param object: string :param type: string :param tagger: :class:`github.InputGitAuthor.InputGitAuthor` :rtype: :class:`github.GitTag.GitTag`'
def create_git_tag(self, tag, message, object, type, tagger=github.GithubObject.NotSet):
assert isinstance(tag, (str, unicode)), tag assert isinstance(message, (str, unicode)), message assert isinstance(object, (str, unicode)), object assert isinstance(type, (str, unicode)), type assert ((tagger is github.GithubObject.NotSet) or isinstance(tagger, github.InputGitAuthor)), tagger pos...
':calls: `POST /repos/:owner/:repo/git/trees <http://developer.github.com/v3/git/trees>`_ :param tree: list of :class:`github.InputGitTreeElement.InputGitTreeElement` :param base_tree: :class:`github.GitTree.GitTree` :rtype: :class:`github.GitTree.GitTree`'
def create_git_tree(self, tree, base_tree=github.GithubObject.NotSet):
assert all((isinstance(element, github.InputGitTreeElement) for element in tree)), tree assert ((base_tree is github.GithubObject.NotSet) or isinstance(base_tree, github.GitTree.GitTree)), base_tree post_parameters = {'tree': [element._identity for element in tree]} if (base_tree is not github.GithubObj...
':calls: `POST /repos/:owner/:repo/hooks <http://developer.github.com/v3/repos/hooks>`_ :param name: string :param config: dict :param events: list of string :param active: bool :rtype: :class:`github.Hook.Hook`'
def create_hook(self, name, config, events=github.GithubObject.NotSet, active=github.GithubObject.NotSet):
assert isinstance(name, (str, unicode)), name assert isinstance(config, dict), config assert ((events is github.GithubObject.NotSet) or all((isinstance(element, (str, unicode)) for element in events))), events assert ((active is github.GithubObject.NotSet) or isinstance(active, bool)), active post_p...
':calls: `POST /repos/:owner/:repo/issues <http://developer.github.com/v3/issues>`_ :param title: string :param body: string :param assignee: string or :class:`github.NamedUser.NamedUser` :param milestone: :class:`github.Milestone.Milestone` :param labels: list of :class:`github.Label.Label` :rtype: :class:`github.Issu...
def create_issue(self, title, body=github.GithubObject.NotSet, assignee=github.GithubObject.NotSet, milestone=github.GithubObject.NotSet, labels=github.GithubObject.NotSet):
assert isinstance(title, (str, unicode)), title assert ((body is github.GithubObject.NotSet) or isinstance(body, (str, unicode))), body assert ((assignee is github.GithubObject.NotSet) or isinstance(assignee, github.NamedUser.NamedUser) or isinstance(assignee, (str, unicode))), assignee assert ((milesto...
':calls: `POST /repos/:owner/:repo/keys <http://developer.github.com/v3/repos/keys>`_ :param title: string :param key: string :rtype: :class:`github.RepositoryKey.RepositoryKey`'
def create_key(self, title, key):
assert isinstance(title, (str, unicode)), title assert isinstance(key, (str, unicode)), key post_parameters = {'title': title, 'key': key} (headers, data) = self._requester.requestJsonAndCheck('POST', (self.url + '/keys'), input=post_parameters) return github.RepositoryKey.RepositoryKey(self._reques...
':calls: `POST /repos/:owner/:repo/labels <http://developer.github.com/v3/issues/labels>`_ :param name: string :param color: string :rtype: :class:`github.Label.Label`'
def create_label(self, name, color):
assert isinstance(name, (str, unicode)), name assert isinstance(color, (str, unicode)), color post_parameters = {'name': name, 'color': color} (headers, data) = self._requester.requestJsonAndCheck('POST', (self.url + '/labels'), input=post_parameters) return github.Label.Label(self._requester, heade...
':calls: `POST /repos/:owner/:repo/milestones <http://developer.github.com/v3/issues/milestones>`_ :param title: string :param state: string :param description: string :param due_on: date :rtype: :class:`github.Milestone.Milestone`'
def create_milestone(self, title, state=github.GithubObject.NotSet, description=github.GithubObject.NotSet, due_on=github.GithubObject.NotSet):
assert isinstance(title, (str, unicode)), title assert ((state is github.GithubObject.NotSet) or isinstance(state, (str, unicode))), state assert ((description is github.GithubObject.NotSet) or isinstance(description, (str, unicode))), description assert ((due_on is github.GithubObject.NotSet) or isinst...
':calls: `POST /repos/:owner/:repo/pulls <http://developer.github.com/v3/pulls>`_ :param title: string :param body: string :param issue: :class:`github.Issue.Issue` :param base: string :param head: string :rtype: :class:`github.PullRequest.PullRequest`'
def create_pull(self, *args, **kwds):
if ((len(args) + len(kwds)) == 4): return self.__create_pull_1(*args, **kwds) else: return self.__create_pull_2(*args, **kwds)
':calls: `DELETE /repos/:owner/:repo <http://developer.github.com/v3/repos>`_ :rtype: None'
def delete(self):
(headers, data) = self._requester.requestJsonAndCheck('DELETE', self.url)
':calls: `PATCH /repos/:owner/:repo <http://developer.github.com/v3/repos>`_ :param name: string :param description: string :param homepage: string :param private: bool :param has_issues: bool :param has_wiki: bool :param has_downloads: bool :param default_branch: string :rtype: None'
def edit(self, name, description=github.GithubObject.NotSet, homepage=github.GithubObject.NotSet, private=github.GithubObject.NotSet, has_issues=github.GithubObject.NotSet, has_wiki=github.GithubObject.NotSet, has_downloads=github.GithubObject.NotSet, default_branch=github.GithubObject.NotSet):
assert isinstance(name, (str, unicode)), name assert ((description is github.GithubObject.NotSet) or isinstance(description, (str, unicode))), description assert ((homepage is github.GithubObject.NotSet) or isinstance(homepage, (str, unicode))), homepage assert ((private is github.GithubObject.NotSet) o...
':calls: `GET /repos/:owner/:repo/:archive_format/:ref <http://developer.github.com/v3/repos/contents>`_ :param archive_format: string :param ref: string :rtype: string'
def get_archive_link(self, archive_format, ref=github.GithubObject.NotSet):
assert isinstance(archive_format, (str, unicode)), archive_format assert ((ref is github.GithubObject.NotSet) or isinstance(ref, (str, unicode))), ref url = ((self.url + '/') + archive_format) if (ref is not github.GithubObject.NotSet): url += ('/' + ref) (headers, data) = self._requester.re...
':calls: `GET /repos/:owner/:repo/assignees <http://developer.github.com/v3/issues/assignees>`_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser`'
def get_assignees(self):
return github.PaginatedList.PaginatedList(github.NamedUser.NamedUser, self._requester, (self.url + '/assignees'), None)
':calls: `GET /repos/:owner/:repo/branches/:branch <http://developer.github.com/v3/repos>`_ :param branch: string :rtype: :class:`github.Branch.Branch`'
def get_branch(self, branch):
assert isinstance(branch, (str, unicode)), branch (headers, data) = self._requester.requestJsonAndCheck('GET', ((self.url + '/branches/') + branch)) return github.Branch.Branch(self._requester, headers, data, completed=True)
':calls: `GET /repos/:owner/:repo/branches <http://developer.github.com/v3/repos>`_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Branch.Branch`'
def get_branches(self):
return github.PaginatedList.PaginatedList(github.Branch.Branch, self._requester, (self.url + '/branches'), None)
':calls: `GET /repos/:owner/:repo/collaborators <http://developer.github.com/v3/repos/collaborators>`_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser`'
def get_collaborators(self):
return github.PaginatedList.PaginatedList(github.NamedUser.NamedUser, self._requester, (self.url + '/collaborators'), None)
':calls: `GET /repos/:owner/:repo/comments/:id <http://developer.github.com/v3/repos/comments>`_ :param id: integer :rtype: :class:`github.CommitComment.CommitComment`'
def get_comment(self, id):
assert isinstance(id, (int, long)), id (headers, data) = self._requester.requestJsonAndCheck('GET', ((self.url + '/comments/') + str(id))) return github.CommitComment.CommitComment(self._requester, headers, data, completed=True)
':calls: `GET /repos/:owner/:repo/comments <http://developer.github.com/v3/repos/comments>`_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.CommitComment.CommitComment`'
def get_comments(self):
return github.PaginatedList.PaginatedList(github.CommitComment.CommitComment, self._requester, (self.url + '/comments'), None)
':calls: `GET /repos/:owner/:repo/commits/:sha <http://developer.github.com/v3/repos/commits>`_ :param sha: string :rtype: :class:`github.Commit.Commit`'
def get_commit(self, sha):
assert isinstance(sha, (str, unicode)), sha (headers, data) = self._requester.requestJsonAndCheck('GET', ((self.url + '/commits/') + sha)) return github.Commit.Commit(self._requester, headers, data, completed=True)
':calls: `GET /repos/:owner/:repo/commits <http://developer.github.com/v3/repos/commits>`_ :param sha: string :param path: string :param since: datetime.datetime :param until: datetime.datetime :param author: string or :class:`github.NamedUser.NamedUser` or :class:`github.AuthenticatedUser.AuthenticatedUser` :rtype: :c...
def get_commits(self, sha=github.GithubObject.NotSet, path=github.GithubObject.NotSet, since=github.GithubObject.NotSet, until=github.GithubObject.NotSet, author=github.GithubObject.NotSet):
assert ((sha is github.GithubObject.NotSet) or isinstance(sha, (str, unicode))), sha assert ((path is github.GithubObject.NotSet) or isinstance(path, (str, unicode))), path assert ((since is github.GithubObject.NotSet) or isinstance(since, datetime.datetime)), since assert ((until is github.GithubObject...
':calls: `GET /repos/:owner/:repo/contents/:path <http://developer.github.com/v3/repos/contents>`_ :param path: string :param ref: string :rtype: :class:`github.ContentFile.ContentFile`'
def get_contents(self, path, ref=github.GithubObject.NotSet):
return self.get_file_contents(path, ref)
':calls: `GET /repos/:owner/:repo/contents/:path <http://developer.github.com/v3/repos/contents>`_ :param path: string :param ref: string :rtype: :class:`github.ContentFile.ContentFile`'
def get_file_contents(self, path, ref=github.GithubObject.NotSet):
assert isinstance(path, (str, unicode)), path assert ((ref is github.GithubObject.NotSet) or isinstance(ref, (str, unicode))), ref url_parameters = dict() if (ref is not github.GithubObject.NotSet): url_parameters['ref'] = ref (headers, data) = self._requester.requestJsonAndCheck('GET', ((se...
':calls: `GET /repos/:owner/:repo/contents/:path <http://developer.github.com/v3/repos/contents>`_ :param path: string :param ref: string :rtype: list of :class:`github.ContentFile.ContentFile`'
def get_dir_contents(self, path, ref=github.GithubObject.NotSet):
assert isinstance(path, (str, unicode)), path assert ((ref is github.GithubObject.NotSet) or isinstance(ref, (str, unicode))), ref url_parameters = dict() if (ref is not github.GithubObject.NotSet): url_parameters['ref'] = ref (headers, data) = self._requester.requestJsonAndCheck('GET', ((se...
':calls: `GET /repos/:owner/:repo/contributors <http://developer.github.com/v3/repos>`_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser`'
def get_contributors(self):
return github.PaginatedList.PaginatedList(github.NamedUser.NamedUser, self._requester, (self.url + '/contributors'), None)
':calls: `GET /repos/:owner/:repo/downloads/:id <http://developer.github.com/v3/repos/downloads>`_ :param id: integer :rtype: :class:`github.Download.Download`'
def get_download(self, id):
assert isinstance(id, (int, long)), id (headers, data) = self._requester.requestJsonAndCheck('GET', ((self.url + '/downloads/') + str(id))) return github.Download.Download(self._requester, headers, data, completed=True)
':calls: `GET /repos/:owner/:repo/downloads <http://developer.github.com/v3/repos/downloads>`_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Download.Download`'
def get_downloads(self):
return github.PaginatedList.PaginatedList(github.Download.Download, self._requester, (self.url + '/downloads'), None)
':calls: `GET /repos/:owner/:repo/events <http://developer.github.com/v3/activity/events>`_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Event.Event`'
def get_events(self):
return github.PaginatedList.PaginatedList(github.Event.Event, self._requester, (self.url + '/events'), None)
':calls: `GET /repos/:owner/:repo/forks <http://developer.github.com/v3/repos/forks>`_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Repository.Repository`'
def get_forks(self):
return github.PaginatedList.PaginatedList(Repository, self._requester, (self.url + '/forks'), None)
':calls: `GET /repos/:owner/:repo/git/blobs/:sha <http://developer.github.com/v3/git/blobs>`_ :param sha: string :rtype: :class:`github.GitBlob.GitBlob`'
def get_git_blob(self, sha):
assert isinstance(sha, (str, unicode)), sha (headers, data) = self._requester.requestJsonAndCheck('GET', ((self.url + '/git/blobs/') + sha)) return github.GitBlob.GitBlob(self._requester, headers, data, completed=True)
':calls: `GET /repos/:owner/:repo/git/commits/:sha <http://developer.github.com/v3/git/commits>`_ :param sha: string :rtype: :class:`github.GitCommit.GitCommit`'
def get_git_commit(self, sha):
assert isinstance(sha, (str, unicode)), sha (headers, data) = self._requester.requestJsonAndCheck('GET', ((self.url + '/git/commits/') + sha)) return github.GitCommit.GitCommit(self._requester, headers, data, completed=True)
':calls: `GET /repos/:owner/:repo/git/refs/:ref <http://developer.github.com/v3/git/refs>`_ :param ref: string :rtype: :class:`github.GitRef.GitRef`'
def get_git_ref(self, ref):
prefix = '/git/refs/' if (not self._requester.FIX_REPO_GET_GIT_REF): prefix = '/git/' assert isinstance(ref, (str, unicode)), ref (headers, data) = self._requester.requestJsonAndCheck('GET', ((self.url + prefix) + ref)) return github.GitRef.GitRef(self._requester, headers, data, completed=Tr...
':calls: `GET /repos/:owner/:repo/git/refs <http://developer.github.com/v3/git/refs>`_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.GitRef.GitRef`'
def get_git_refs(self):
return github.PaginatedList.PaginatedList(github.GitRef.GitRef, self._requester, (self.url + '/git/refs'), None)
':calls: `GET /repos/:owner/:repo/git/tags/:sha <http://developer.github.com/v3/git/tags>`_ :param sha: string :rtype: :class:`github.GitTag.GitTag`'
def get_git_tag(self, sha):
assert isinstance(sha, (str, unicode)), sha (headers, data) = self._requester.requestJsonAndCheck('GET', ((self.url + '/git/tags/') + sha)) return github.GitTag.GitTag(self._requester, headers, data, completed=True)
':calls: `GET /repos/:owner/:repo/git/trees/:sha <http://developer.github.com/v3/git/trees>`_ :param sha: string :param recursive: bool :rtype: :class:`github.GitTree.GitTree`'
def get_git_tree(self, sha, recursive=github.GithubObject.NotSet):
assert isinstance(sha, (str, unicode)), sha assert ((recursive is github.GithubObject.NotSet) or isinstance(recursive, bool)), recursive url_parameters = dict() if (recursive is not github.GithubObject.NotSet): url_parameters['recursive'] = recursive (headers, data) = self._requester.request...
':calls: `GET /repos/:owner/:repo/hooks/:id <http://developer.github.com/v3/repos/hooks>`_ :param id: integer :rtype: :class:`github.Hook.Hook`'
def get_hook(self, id):
assert isinstance(id, (int, long)), id (headers, data) = self._requester.requestJsonAndCheck('GET', ((self.url + '/hooks/') + str(id))) return github.Hook.Hook(self._requester, headers, data, completed=True)
':calls: `GET /repos/:owner/:repo/hooks <http://developer.github.com/v3/repos/hooks>`_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Hook.Hook`'
def get_hooks(self):
return github.PaginatedList.PaginatedList(github.Hook.Hook, self._requester, (self.url + '/hooks'), None)
':calls: `GET /repos/:owner/:repo/issues/:number <http://developer.github.com/v3/issues>`_ :param number: integer :rtype: :class:`github.Issue.Issue`'
def get_issue(self, number):
assert isinstance(number, (int, long)), number (headers, data) = self._requester.requestJsonAndCheck('GET', ((self.url + '/issues/') + str(number))) return github.Issue.Issue(self._requester, headers, data, completed=True)
':calls: `GET /repos/:owner/:repo/issues <http://developer.github.com/v3/issues>`_ :param milestone: :class:`github.Milestone.Milestone` or "none" or "*" :param state: string :param assignee: string or :class:`github.NamedUser.NamedUser` or "none" or "*" :param mentioned: :class:`github.NamedUser.NamedUser` :param labe...
def get_issues(self, milestone=github.GithubObject.NotSet, state=github.GithubObject.NotSet, assignee=github.GithubObject.NotSet, mentioned=github.GithubObject.NotSet, labels=github.GithubObject.NotSet, sort=github.GithubObject.NotSet, direction=github.GithubObject.NotSet, since=github.GithubObject.NotSet, creator=gith...
assert ((milestone is github.GithubObject.NotSet) or (milestone == '*') or (milestone == 'none') or isinstance(milestone, github.Milestone.Milestone)), milestone assert ((state is github.GithubObject.NotSet) or isinstance(state, (str, unicode))), state assert ((assignee is github.GithubObject.NotSet) or isi...
':calls: `GET /repos/:owner/:repo/issues/comments <http://developer.github.com/v3/issues/comments>`_ :param sort: string :param direction: string :param since: datetime.datetime :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.IssueComment.IssueComment`'
def get_issues_comments(self, sort=github.GithubObject.NotSet, direction=github.GithubObject.NotSet, since=github.GithubObject.NotSet):
assert ((sort is github.GithubObject.NotSet) or isinstance(sort, (str, unicode))), sort assert ((direction is github.GithubObject.NotSet) or isinstance(direction, (str, unicode))), direction assert ((since is github.GithubObject.NotSet) or isinstance(since, datetime.datetime)), since url_parameters = di...
':calls: `GET /repos/:owner/:repo/issues/events/:id <http://developer.github.com/v3/issues/events>`_ :param id: integer :rtype: :class:`github.IssueEvent.IssueEvent`'
def get_issues_event(self, id):
assert isinstance(id, (int, long)), id (headers, data) = self._requester.requestJsonAndCheck('GET', ((self.url + '/issues/events/') + str(id))) return github.IssueEvent.IssueEvent(self._requester, headers, data, completed=True)
':calls: `GET /repos/:owner/:repo/issues/events <http://developer.github.com/v3/issues/events>`_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.IssueEvent.IssueEvent`'
def get_issues_events(self):
return github.PaginatedList.PaginatedList(github.IssueEvent.IssueEvent, self._requester, (self.url + '/issues/events'), None)
':calls: `GET /repos/:owner/:repo/keys/:id <http://developer.github.com/v3/repos/keys>`_ :param id: integer :rtype: :class:`github.RepositoryKey.RepositoryKey`'
def get_key(self, id):
assert isinstance(id, (int, long)), id (headers, data) = self._requester.requestJsonAndCheck('GET', ((self.url + '/keys/') + str(id))) return github.RepositoryKey.RepositoryKey(self._requester, headers, data, completed=True, repoUrl=self.url)
':calls: `GET /repos/:owner/:repo/keys <http://developer.github.com/v3/repos/keys>`_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.RepositoryKey.RepositoryKey`'
def get_keys(self):
return github.PaginatedList.PaginatedList((lambda requester, headers, data, completed: github.RepositoryKey.RepositoryKey(requester, headers, data, completed, repoUrl=self.url)), self._requester, (self.url + '/keys'), None)
':calls: `GET /repos/:owner/:repo/labels/:name <http://developer.github.com/v3/issues/labels>`_ :param name: string :rtype: :class:`github.Label.Label`'
def get_label(self, name):
assert isinstance(name, (str, unicode)), name (headers, data) = self._requester.requestJsonAndCheck('GET', ((self.url + '/labels/') + urllib.quote(name))) return github.Label.Label(self._requester, headers, data, completed=True)
':calls: `GET /repos/:owner/:repo/labels <http://developer.github.com/v3/issues/labels>`_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Label.Label`'
def get_labels(self):
return github.PaginatedList.PaginatedList(github.Label.Label, self._requester, (self.url + '/labels'), None)
':calls: `GET /repos/:owner/:repo/languages <http://developer.github.com/v3/repos>`_ :rtype: dict of string to integer'
def get_languages(self):
(headers, data) = self._requester.requestJsonAndCheck('GET', (self.url + '/languages')) return data
':calls: `GET /repos/:owner/:repo/milestones/:number <http://developer.github.com/v3/issues/milestones>`_ :param number: integer :rtype: :class:`github.Milestone.Milestone`'
def get_milestone(self, number):
assert isinstance(number, (int, long)), number (headers, data) = self._requester.requestJsonAndCheck('GET', ((self.url + '/milestones/') + str(number))) return github.Milestone.Milestone(self._requester, headers, data, completed=True)
':calls: `GET /repos/:owner/:repo/milestones <http://developer.github.com/v3/issues/milestones>`_ :param state: string :param sort: string :param direction: string :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Milestone.Milestone`'
def get_milestones(self, state=github.GithubObject.NotSet, sort=github.GithubObject.NotSet, direction=github.GithubObject.NotSet):
assert ((state is github.GithubObject.NotSet) or isinstance(state, (str, unicode))), state assert ((sort is github.GithubObject.NotSet) or isinstance(sort, (str, unicode))), sort assert ((direction is github.GithubObject.NotSet) or isinstance(direction, (str, unicode))), direction url_parameters = dict(...
':calls: `GET /networks/:owner/:repo/events <http://developer.github.com/v3/activity/events>`_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Event.Event`'
def get_network_events(self):
return github.PaginatedList.PaginatedList(github.Event.Event, self._requester, (((('/networks/' + self.owner.login) + '/') + self.name) + '/events'), None)
':calls: `GET /repos/:owner/:repo/pulls/:number <http://developer.github.com/v3/pulls>`_ :param number: integer :rtype: :class:`github.PullRequest.PullRequest`'
def get_pull(self, number):
assert isinstance(number, (int, long)), number (headers, data) = self._requester.requestJsonAndCheck('GET', ((self.url + '/pulls/') + str(number))) return github.PullRequest.PullRequest(self._requester, headers, data, completed=True)
':calls: `GET /repos/:owner/:repo/pulls <http://developer.github.com/v3/pulls>`_ :param state: string :param sort: string :param direction: string :param base: string :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.PullRequest.PullRequest`'
def get_pulls(self, state=github.GithubObject.NotSet, sort=github.GithubObject.NotSet, direction=github.GithubObject.NotSet, base=github.GithubObject.NotSet):
assert ((state is github.GithubObject.NotSet) or isinstance(state, (str, unicode))), state assert ((sort is github.GithubObject.NotSet) or isinstance(sort, (str, unicode))), sort assert ((direction is github.GithubObject.NotSet) or isinstance(direction, (str, unicode))), direction assert ((base is githu...
':calls: `GET /repos/:owner/:repo/pulls/comments <http://developer.github.com/v3/pulls/comments>`_ :param sort: string :param direction: string :param since: datetime.datetime :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.PullRequestComment.PullRequestComment`'
def get_pulls_comments(self, sort=github.GithubObject.NotSet, direction=github.GithubObject.NotSet, since=github.GithubObject.NotSet):
return self.get_pulls_review_comments(sort, direction, since)
':calls: `GET /repos/:owner/:repo/pulls/comments <http://developer.github.com/v3/pulls/comments>`_ :param sort: string :param direction: string :param since: datetime.datetime :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.PullRequestComment.PullRequestComment`'
def get_pulls_review_comments(self, sort=github.GithubObject.NotSet, direction=github.GithubObject.NotSet, since=github.GithubObject.NotSet):
assert ((sort is github.GithubObject.NotSet) or isinstance(sort, (str, unicode))), sort assert ((direction is github.GithubObject.NotSet) or isinstance(direction, (str, unicode))), direction assert ((since is github.GithubObject.NotSet) or isinstance(since, datetime.datetime)), since url_parameters = di...
':calls: `GET /repos/:owner/:repo/readme <http://developer.github.com/v3/repos/contents>`_ :param ref: string :rtype: :class:`github.ContentFile.ContentFile`'
def get_readme(self, ref=github.GithubObject.NotSet):
assert ((ref is github.GithubObject.NotSet) or isinstance(ref, (str, unicode))), ref url_parameters = dict() if (ref is not github.GithubObject.NotSet): url_parameters['ref'] = ref (headers, data) = self._requester.requestJsonAndCheck('GET', (self.url + '/readme'), parameters=url_parameters) ...
':calls: `GET /repos/:owner/:repo/stargazers <http://developer.github.com/v3/activity/starring>`_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser`'
def get_stargazers(self):
return github.PaginatedList.PaginatedList(github.NamedUser.NamedUser, self._requester, (self.url + '/stargazers'), None)
':calls: `GET /repos/:owner/:repo/stargazers <http://developer.github.com/v3/activity/starring>`_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Stargazer.Stargazer`'
def get_stargazers_with_dates(self):
return github.PaginatedList.PaginatedList(github.Stargazer.Stargazer, self._requester, (self.url + '/stargazers'), None, headers={'Accept': 'application/vnd.github.v3.star+json'})
':calls: `GET /repos/:owner/:repo/stats/contributors <http://developer.github.com/v3/repos/statistics/#get-contributors-list-with-additions-deletions-and-commit-counts>`_ :rtype: None or list of :class:`github.StatsContributor.StatsContributor`'
def get_stats_contributors(self):
(headers, data) = self._requester.requestJsonAndCheck('GET', (self.url + '/stats/contributors')) if (data == {}): return None else: return [github.StatsContributor.StatsContributor(self._requester, headers, attributes, completed=True) for attributes in data]
':calls: `GET /repos/:owner/:repo/stats/commit_activity <developer.github.com/v3/repos/statistics/#get-the-number-of-commits-per-hour-in-each-day>`_ :rtype: None or list of :class:`github.StatsCommitActivity.StatsCommitActivity`'
def get_stats_commit_activity(self):
(headers, data) = self._requester.requestJsonAndCheck('GET', (self.url + '/stats/commit_activity')) if (data == {}): return None else: return [github.StatsCommitActivity.StatsCommitActivity(self._requester, headers, attributes, completed=True) for attributes in data]
':calls: `GET /repos/:owner/:repo/stats/code_frequency <http://developer.github.com/v3/repos/statistics/#get-the-number-of-additions-and-deletions-per-week>`_ :rtype: None or list of :class:`github.StatsCodeFrequency.StatsCodeFrequency`'
def get_stats_code_frequency(self):
(headers, data) = self._requester.requestJsonAndCheck('GET', (self.url + '/stats/code_frequency')) if (data == {}): return None else: return [github.StatsCodeFrequency.StatsCodeFrequency(self._requester, headers, attributes, completed=True) for attributes in data]
':calls: `GET /repos/:owner/:repo/stats/participation <http://developer.github.com/v3/repos/statistics/#get-the-weekly-commit-count-for-the-repo-owner-and-everyone-else>`_ :rtype: None or :class:`github.StatsParticipation.StatsParticipation`'
def get_stats_participation(self):
(headers, data) = self._requester.requestJsonAndCheck('GET', (self.url + '/stats/participation')) if (data == {}): return None else: return github.StatsParticipation.StatsParticipation(self._requester, headers, data, completed=True)
':calls: `GET /repos/:owner/:repo/stats/punch_card <http://developer.github.com/v3/repos/statistics/#get-the-number-of-commits-per-hour-in-each-day>`_ :rtype: None or :class:`github.StatsPunchCard.StatsPunchCard`'
def get_stats_punch_card(self):
(headers, data) = self._requester.requestJsonAndCheck('GET', (self.url + '/stats/punch_card')) if (data == {}): return None else: return github.StatsPunchCard.StatsPunchCard(self._requester, headers, data, completed=True)
':calls: `GET /repos/:owner/:repo/subscribers <http://developer.github.com/v3/activity/watching>`_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser`'
def get_subscribers(self):
return github.PaginatedList.PaginatedList(github.NamedUser.NamedUser, self._requester, (self.url + '/subscribers'), None)
':calls: `GET /repos/:owner/:repo/tags <http://developer.github.com/v3/repos>`_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Tag.Tag`'
def get_tags(self):
return github.PaginatedList.PaginatedList(github.Tag.Tag, self._requester, (self.url + '/tags'), None)
':calls: `GET /repos/:owner/:repo/releases <http://developer.github.com/v3/repos>`_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Tag.Tag`'
def get_releases(self):
return github.PaginatedList.PaginatedList(github.GitRelease.GitRelease, self._requester, (self.url + '/releases'), None)
':calls: `GET /repos/:owner/:repo/releases/:id https://developer.github.com/v3/repos/releases/#get-a-single-release :param id: int (release id), str (tag name) :rtype: None or :class:`github.GitRelease.GitRelease`'
def get_release(self, id):
if isinstance(id, int): (headers, data) = self._requester.requestJsonAndCheck('GET', ((self.url + '/releases/') + str(id))) return github.GitRelease.GitRelease(self._requester, headers, data, completed=True) elif isinstance(id, str): (headers, data) = self._requester.requestJsonAndCheck(...
':calls: `GET /repos/:owner/:repo/teams <http://developer.github.com/v3/repos>`_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Team.Team`'
def get_teams(self):
return github.PaginatedList.PaginatedList(github.Team.Team, self._requester, (self.url + '/teams'), None)
':calls: `GET /repos/:owner/:repo/watchers <http://developer.github.com/v3/activity/starring>`_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser`'
def get_watchers(self):
return github.PaginatedList.PaginatedList(github.NamedUser.NamedUser, self._requester, (self.url + '/watchers'), None)
':calls: `GET /repos/:owner/:repo/assignees/:assignee <http://developer.github.com/v3/issues/assignees>`_ :param assignee: string or :class:`github.NamedUser.NamedUser` :rtype: bool'
def has_in_assignees(self, assignee):
assert (isinstance(assignee, github.NamedUser.NamedUser) or isinstance(assignee, (str, unicode))), assignee if isinstance(assignee, github.NamedUser.NamedUser): assignee = assignee._identity (status, headers, data) = self._requester.requestJson('GET', ((self.url + '/assignees/') + assignee)) ret...
':calls: `GET /repos/:owner/:repo/collaborators/:user <http://developer.github.com/v3/repos/collaborators>`_ :param collaborator: string or :class:`github.NamedUser.NamedUser` :rtype: bool'
def has_in_collaborators(self, collaborator):
assert (isinstance(collaborator, github.NamedUser.NamedUser) or isinstance(collaborator, (str, unicode))), collaborator if isinstance(collaborator, github.NamedUser.NamedUser): collaborator = collaborator._identity (status, headers, data) = self._requester.requestJson('GET', ((self.url + '/collabora...
':calls: `GET /legacy/issues/search/:owner/:repository/:state/:keyword <http://developer.github.com/v3/search/legacy>`_ :param state: "open" or "closed" :param keyword: string :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Issue.Issue`'
def legacy_search_issues(self, state, keyword):
assert (state in ['open', 'closed']), state assert isinstance(keyword, (str, unicode)), keyword (headers, data) = self._requester.requestJsonAndCheck('GET', ((((((('/legacy/issues/search/' + self.owner.login) + '/') + self.name) + '/') + state) + '/') + urllib.quote(keyword))) return [github.Issue.Issue...
':calls: `POST /repos/:owner/:repo/merges <http://developer.github.com/v3/repos/merging>`_ :param base: string :param head: string :param commit_message: string :rtype: :class:`github.Commit.Commit`'
def merge(self, base, head, commit_message=github.GithubObject.NotSet):
assert isinstance(base, (str, unicode)), base assert isinstance(head, (str, unicode)), head assert ((commit_message is github.GithubObject.NotSet) or isinstance(commit_message, (str, unicode))), commit_message post_parameters = {'base': base, 'head': head} if (commit_message is not github.GithubObje...
':calls: `DELETE /repos/:owner/:repo/collaborators/:user <http://developer.github.com/v3/repos/collaborators>`_ :param collaborator: string or :class:`github.NamedUser.NamedUser` :rtype: None'
def remove_from_collaborators(self, collaborator):
assert (isinstance(collaborator, github.NamedUser.NamedUser) or isinstance(collaborator, (str, unicode))), collaborator if isinstance(collaborator, github.NamedUser.NamedUser): collaborator = collaborator._identity (headers, data) = self._requester.requestJsonAndCheck('DELETE', ((self.url + '/collab...
':calls: `POST /hub <http://developer.github.com/>`_ :param event: string :param callback: string :param secret: string :rtype: None'
def subscribe_to_hub(self, event, callback, secret=github.GithubObject.NotSet):
return self._hub('subscribe', event, callback, secret)
':calls: `POST /hub <http://developer.github.com/>`_ :param event: string :param callback: string :param secret: string :rtype: None'
def unsubscribe_from_hub(self, event, callback):
return self._hub('unsubscribe', event, callback, github.GithubObject.NotSet)
':type: datetime.datetime'
@property def created_at(self):
return self._created_at.value
':type: :class:`github.NamedUser.NamedUser`'
@property def creator(self):
return self._creator.value
':type: string'
@property def description(self):
return self._description.value
':type: integer'
@property def id(self):
return self._id.value
':type: string'
@property def state(self):
return self._state.value
':type: string'
@property def target_url(self):
return self._target_url.value
':type: datetime.datetime'
@property def updated_at(self):
return self._updated_at.value
':type: string'
@property def url(self):
return self._url.value
':type: bool'
@property def active(self):
self._completeIfNotSet(self._active) return self._active.value
':type: dict'
@property def config(self):
self._completeIfNotSet(self._config) return self._config.value
':type: datetime.datetime'
@property def created_at(self):
self._completeIfNotSet(self._created_at) return self._created_at.value