From f145d9927e34fce94cf44aa8016c121224a5aa87 Mon Sep 17 00:00:00 2001 From: Vincent Jacques Date: Sun, 14 Jul 2013 11:01:30 +0200 Subject: [PATCH 1/8] Draft a script comparing URLs called in PyGithub to Github API v3 reference --- manage.sh | 12 ++++ scripts/compare_to_api_ref_doc.py | 108 ++++++++++++++++++++++++++++++ 2 files changed, 120 insertions(+) create mode 100755 scripts/compare_to_api_ref_doc.py diff --git a/manage.sh b/manage.sh index 024b6f37..47ed646b 100755 --- a/manage.sh +++ b/manage.sh @@ -89,4 +89,16 @@ function unmerged { done } +function compare_to_api_ref_doc { + if [ -e developer.github.com ] + then + cd developer.github.com + git pull + cd .. + else + git clone https://github.com/github/developer.github.com.git + fi + python scripts/compare_to_api_ref_doc.py +} + $1 diff --git a/scripts/compare_to_api_ref_doc.py b/scripts/compare_to_api_ref_doc.py new file mode 100755 index 00000000..39342082 --- /dev/null +++ b/scripts/compare_to_api_ref_doc.py @@ -0,0 +1,108 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +import os +import fnmatch +import glob + + +def parseReference(): + badlyNamedUrls = { + "/gitignore/templates/C GET": "/gitignore/templates/:name GET", + "/notifications/threads/1/subscription DELETE": "/notifications/threads/:id/subscription DELETE", + "/notifications/threads/1/subscription GET": "/notifications/threads/:id/subscription GET", + "/notifications/threads/1/subscription PUT": "/notifications/threads/:id/subscription PUT", + } + undocumentedUrls = [ + "/hooks GET", # Mentioned somewhere + "/hub POST", # Described in content/v3/repos/hooks.md + ] + uninterestingUrls = [ + "/markdown/raw POST", # Job is done by /markdown => useless in PyGithub + "/repos/octocat/Hello-World/git/refs/heads/feature-a DELETE", # Example of DELETE /repos/:owner/:repo/git/refs/:ref + "/repos/octocat/Hello-World/git/refs/tags/v1.0 DELETE", # Example of DELETE /repos/:owner/:repo/git/refs/:ref + "/repos/:owner/:repo/git/trees/:sha?recursive=1 GET", # Example of GET /repos/:owner/:repo/git/trees/:sha + "/repos/:owner/:repo/git/refs/heads/skunkworkz/featureA GET", # Example of GET /repos/:owner/:repo/git/refs + "/repos/:owner/:repo/git/refs/tags GET", # Example of GET /repos/:owner/:repo/git/refs + ] + + urls = set() + + for root, _, filenames in os.walk('developer.github.com'): + for filename in fnmatch.filter(filenames, '*.md'): + filename = os.path.join(root, filename) + with open(filename) as f: + for line in f: + if line.startswith(" "): + line = line[4:] + if line.startswith("\t"): + line = line[1:] + for v in ["GET", "PATCH", "DELETE", "POST", "PUT"]: + if line.startswith(v + " /"): + verb, url = line.strip().split(" ") + url = url + " " + verb + if url in badlyNamedUrls: + url = badlyNamedUrls[url] + urls.add(url) + + for url in undocumentedUrls: + urls.add(url) + + for url in uninterestingUrls: + urls.remove(url) + + return urls + + +def parseLibrary(): + urls = set() + + for filename in glob.glob("github/*.py"): + with open(filename) as f: + for line in f: + if line.startswith(" :calls:"): + line = line[17:-3] + for part in line.split("`_ or `"): + verb, url, _ = part.split(" ") + urls.add(url + " " + verb) + + return urls + + +def parseApiList(): + urls = set() + + with open("doc/apis.rst") as f: + url = None + for line in f: + if line.startswith("*"): + newUrl = line[4:-3] + if url is not None: + assert newUrl > url, url + url = newUrl + elif line.startswith(" * "): + verb, method = line[4:].split(": ") + if method.startswith(":meth:"): + urls.add(url + " " + verb) + + return urls + + +def printUrls(title, urls): + if len(urls) > 0: + print len(urls), "URLs", title + ":" + print " ", "\n ".join(sorted(urls)) + print + + +def main(): + ref = parseReference() + lib = parseLibrary() + doc = parseApiList() + printUrls("in Github API v3, but not implemented in PyGithub", ref - lib) + printUrls("called by PyGithub but not existing in Github API v3", lib - ref) + printUrls("badly linked from doc/api.rst", doc ^ lib) + + +if __name__ == "__main__": + main() From d50031b0a0d3c2d9db30a270ec7d0212452270ba Mon Sep 17 00:00:00 2001 From: Vincent Jacques Date: Sun, 14 Jul 2013 11:21:17 +0200 Subject: [PATCH 2/8] Add todos --- scripts/compare_to_api_ref_doc.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/compare_to_api_ref_doc.py b/scripts/compare_to_api_ref_doc.py index 39342082..1e563445 100755 --- a/scripts/compare_to_api_ref_doc.py +++ b/scripts/compare_to_api_ref_doc.py @@ -5,6 +5,10 @@ import os import fnmatch import glob +# @todo Check links from our doc to Github API v3 ref +# - in the description of each class +# - in each ":calls:" section + def parseReference(): badlyNamedUrls = { From 84f3557f870d05467e87160ef86bb051ac79e768 Mon Sep 17 00:00:00 2001 From: Vincent Jacques Date: Tue, 16 Jul 2013 10:09:09 +0200 Subject: [PATCH 3/8] Ignore local clone of reference doc --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index acd5a72d..98aa8eff 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,4 @@ GithubCredentials.py /MANIFEST /PyGithub.egg-info/ /.coverage +/developer.github.com/ From 8484260dc5f864136b45e3ac8e8068fc7da0b1f2 Mon Sep 17 00:00:00 2001 From: Vincent Jacques Date: Tue, 16 Jul 2013 10:32:57 +0200 Subject: [PATCH 4/8] Fix our doc to match URLs described in Github API v3 ref doc --- doc/apis.rst | 184 +++++++++++++++--------------- doc/changes.rst | 8 +- github/AuthenticatedUser.py | 22 ++-- github/Commit.py | 8 +- github/CommitComment.py | 4 +- github/Download.py | 2 +- github/Gist.py | 6 +- github/GistComment.py | 4 +- github/GitRef.py | 4 +- github/Hook.py | 6 +- github/Issue.py | 20 ++-- github/IssueComment.py | 4 +- github/Label.py | 4 +- github/MainClass.py | 2 +- github/Milestone.py | 6 +- github/NamedUser.py | 2 +- github/Organization.py | 4 +- github/PullRequest.py | 28 ++--- github/PullRequestComment.py | 4 +- github/Repository.py | 133 ++++++++++----------- github/RepositoryKey.py | 4 +- github/Team.py | 6 +- scripts/compare_to_api_ref_doc.py | 4 +- 23 files changed, 239 insertions(+), 230 deletions(-) diff --git a/doc/apis.rst b/doc/apis.rst index 365bc216..c5e71bb1 100644 --- a/doc/apis.rst +++ b/doc/apis.rst @@ -21,17 +21,23 @@ APIs * GET: :meth:`github.AuthenticatedUser.AuthenticatedUser.get_gists` * POST: :meth:`github.AuthenticatedUser.AuthenticatedUser.create_gist` +* ``/gists/:gist_id/comments`` + + * GET: :meth:`github.Gist.Gist.get_comments` + * POST: :meth:`github.Gist.Gist.create_comment` + +* ``/gists/:gist_id/comments/:id`` + + * GET: :meth:`github.Gist.Gist.get_comment` + * PATCH: :meth:`github.GistComment.GistComment.edit` + * DELETE: :meth:`github.GistComment.GistComment.delete` + * ``/gists/:id`` * GET: :meth:`github.MainClass.Github.get_gist` * PATCH: :meth:`github.Gist.Gist.edit` * DELETE: :meth:`github.Gist.Gist.delete` -* ``/gists/:id/comments`` - - * GET: :meth:`github.Gist.Gist.get_comments` - * POST: :meth:`github.Gist.Gist.create_comment` - * ``/gists/:id/fork`` * POST: :meth:`github.Gist.Gist.create_fork` @@ -42,12 +48,6 @@ APIs * PUT: :meth:`github.Gist.Gist.set_starred` * DELETE: :meth:`github.Gist.Gist.reset_starred` -* ``/gists/comments/:id`` - - * GET: :meth:`github.Gist.Gist.get_comment` - * PATCH: :meth:`github.GistComment.GistComment.edit` - * DELETE: :meth:`github.GistComment.GistComment.delete` - * ``/gists/public`` * GET: :meth:`github.MainClass.Github.get_gists` @@ -98,9 +98,9 @@ APIs * ``/markdown/raw`` - * POST: see ``/markdown`` + * POST: Not implemented, see ``/markdown`` -* ``/networks/:user/:repo/events`` +* ``/networks/:owner/:repo/events`` * GET: :meth:`github.Repository.Repository.get_network_events` @@ -156,313 +156,316 @@ APIs * ``/rate_limit`` - * GET: :meth:Ngithub.ot ot implemented, see `Github.rate_limiting` + * GET: Not implemented, see `Github.rate_limiting` -* ``/repos/:user/:repo`` +* ``/repos/:owner/:repo`` * GET: :meth:`github.AuthenticatedUser.AuthenticatedUser.get_repo` or :meth:`github.NamedUser.NamedUser.get_repo` or :meth:`github.Organization.Organization.get_repo` or :meth:`github.MainClass.Github.get_repo` * PATCH: :meth:`github.Repository.Repository.edit` * DELETE: :meth:`github.Repository.Repository.delete` -* ``/repos/:user/:repo/:archive_format/:ref`` +* ``/repos/:owner/:repo/:archive_format/:ref`` * GET: :meth:`github.Repository.Repository.get_archive_link` -* ``/repos/:user/:repo/assignees`` +* ``/repos/:owner/:repo/assignees`` * GET: :meth:`github.Repository.Repository.get_assignees` -* ``/repos/:user/:repo/assignees/:assignee`` +* ``/repos/:owner/:repo/assignees/:assignee`` * GET: :meth:`github.Repository.Repository.has_in_assignees` -* ``/repos/:user/:repo/branches`` +* ``/repos/:owner/:repo/branches`` * GET: :meth:`github.Repository.Repository.get_branches` -* ``/repos/:user/:repo/branches/:branch`` +* ``/repos/:owner/:repo/branches/:branch`` * GET: :meth:`github.Repository.Repository.get_branch` -* ``/repos/:user/:repo/collaborators`` +* ``/repos/:owner/:repo/collaborators`` * GET: :meth:`github.Repository.Repository.get_collaborators` -* ``/repos/:user/:repo/collaborators/:user`` +* ``/repos/:owner/:repo/collaborators/:user`` * GET: :meth:`github.Repository.Repository.has_in_collaborators` * PUT: :meth:`github.Repository.Repository.add_to_collaborators` * DELETE: :meth:`github.Repository.Repository.remove_from_collaborators` -* ``/repos/:user/:repo/comments`` +* ``/repos/:owner/:repo/comments`` * GET: :meth:`github.Repository.Repository.get_comments` -* ``/repos/:user/:repo/comments/:id`` +* ``/repos/:owner/:repo/comments/:id`` * GET: :meth:`github.Repository.Repository.get_comment` * PATCH: :meth:`github.CommitComment.CommitComment.edit` * DELETE: :meth:`github.CommitComment.CommitComment.delete` -* ``/repos/:user/:repo/commits`` +* ``/repos/:owner/:repo/commits`` * GET: :meth:`github.Repository.Repository.get_commits` -* ``/repos/:user/:repo/commits/:sha`` +* ``/repos/:owner/:repo/commits/:sha`` * GET: :meth:`github.Repository.Repository.get_commit` -* ``/repos/:user/:repo/commits/:sha/comments`` +* ``/repos/:owner/:repo/commits/:sha/comments`` * GET: :meth:`github.Commit.Commit.get_comments` * POST: :meth:`github.Commit.Commit.create_comment` -* ``/repos/:user/:repo/compare/:base...:head`` +* ``/repos/:owner/:repo/compare/:base...:head`` * GET: :meth:`github.Repository.Repository.compare` -* ``/repos/:user/:repo/contents/:path`` +* ``/repos/:owner/:repo/contents/:path`` * GET: :meth:`github.Repository.Repository.get_contents` or :meth:`github.Repository.Repository.get_file_contents` or :meth:`github.Repository.Repository.get_dir_contents` -* ``/repos/:user/:repo/contributors`` +* ``/repos/:owner/:repo/contributors`` * GET: :meth:`github.Repository.Repository.get_contributors` -* ``/repos/:user/:repo/downloads`` +* ``/repos/:owner/:repo/downloads`` * GET: :meth:`github.Repository.Repository.get_downloads` * POST: :meth:`github.Repository.Repository.create_download` -* ``/repos/:user/:repo/downloads/:id`` +* ``/repos/:owner/:repo/downloads/:id`` * GET: :meth:`github.Repository.Repository.get_download` * DELETE: :meth:`github.Download.Download.delete` -* ``/repos/:user/:repo/events`` +* ``/repos/:owner/:repo/events`` * GET: :meth:`github.Repository.Repository.get_events` -* ``/repos/:user/:repo/forks`` +* ``/repos/:owner/:repo/forks`` * GET: :meth:`github.Repository.Repository.get_forks` * POST: :meth:`github.AuthenticatedUser.AuthenticatedUser.create_fork` or `Organization.create_fork` -* ``/repos/:user/:repo/git/blobs`` +* ``/repos/:owner/:repo/git/blobs`` * POST: :meth:`github.Repository.Repository.create_git_blob` -* ``/repos/:user/:repo/git/blobs/:sha`` +* ``/repos/:owner/:repo/git/blobs/:sha`` * GET: :meth:`github.Repository.Repository.get_git_blob` -* ``/repos/:user/:repo/git/commits`` +* ``/repos/:owner/:repo/git/commits`` * POST: :meth:`github.Repository.Repository.create_git_commit` -* ``/repos/:user/:repo/git/commits/:sha`` +* ``/repos/:owner/:repo/git/commits/:sha`` * GET: :meth:`github.Repository.Repository.get_git_commit` -* ``/repos/:user/:repo/git/refs`` +* ``/repos/:owner/:repo/git/refs`` * GET: :meth:`github.Repository.Repository.get_git_refs` * POST: :meth:`github.Repository.Repository.create_git_ref` -* ``/repos/:user/:repo/git/refs/:ref`` +* ``/repos/:owner/:repo/git/refs/:ref`` * GET: :meth:`github.Repository.Repository.get_git_ref` * PATCH: :meth:`github.GitRef.GitRef.edit` * DELETE: :meth:`github.GitRef.GitRef.delete` -* ``/repos/:user/:repo/git/tags`` +* ``/repos/:owner/:repo/git/tags`` * POST: :meth:`github.Repository.Repository.create_git_tag` -* ``/repos/:user/:repo/git/tags/:sha`` +* ``/repos/:owner/:repo/git/tags/:sha`` * GET: :meth:`github.Repository.Repository.get_git_tag` -* ``/repos/:user/:repo/git/trees`` +* ``/repos/:owner/:repo/git/trees`` * POST: :meth:`github.Repository.Repository.create_git_tree` -* ``/repos/:user/:repo/git/trees/:sha`` +* ``/repos/:owner/:repo/git/trees/:sha`` * GET: :meth:`github.Repository.Repository.get_git_tree` -* ``/repos/:user/:repo/hooks`` +* ``/repos/:owner/:repo/hooks`` * GET: :meth:`github.Repository.Repository.get_hooks` * POST: :meth:`github.Repository.Repository.create_hook` -* ``/repos/:user/:repo/hooks/:id`` +* ``/repos/:owner/:repo/hooks/:id`` * GET: :meth:`github.Repository.Repository.get_hook` * PATCH: :meth:`github.Hook.Hook.edit` * DELETE: :meth:`github.Hook.Hook.delete` -* ``/repos/:user/:repo/hooks/:id/test`` +* ``/repos/:owner/:repo/hooks/:id/test`` * POST: :meth:`github.Hook.Hook.test` -* ``/repos/:user/:repo/issues`` +* ``/repos/:owner/:repo/issues`` * GET: :meth:`github.Repository.Repository.get_issues` * POST: :meth:`github.Repository.Repository.create_issue` -* ``/repos/:user/:repo/issues/:number`` +* ``/repos/:owner/:repo/issues/:issue_number/events`` + + * GET: :meth:`github.Issue.Issue.get_events` + +* ``/repos/:owner/:repo/issues/:number`` * GET: :meth:`github.Repository.Repository.get_issue` * PATCH: :meth:`github.Issue.Issue.edit` -* ``/repos/:user/:repo/issues/:number/comments`` +* ``/repos/:owner/:repo/issues/:number/comments`` * GET: :meth:`github.Issue.Issue.get_comments` or :meth:`gituhub.PullRequest.PullRequest.get_issue_comments` * POST: :meth:`github.Issue.Issue.create_comment` or :meth:`gituhub.PullRequest.PullRequest.create_issue_comment` -* ``/repos/:user/:repo/issues/:number/events`` - - * GET: :meth:`github.Issue.Issue.get_events` - -* ``/repos/:user/:repo/issues/:number/labels`` +* ``/repos/:owner/:repo/issues/:number/labels`` * GET: :meth:`github.Issue.Issue.get_labels` * POST: :meth:`github.Issue.Issue.add_to_labels` * PUT: :meth:`github.Issue.Issue.set_labels` * DELETE: :meth:`github.Issue.Issue.delete_labels` -* ``/repos/:user/:repo/issues/:number/labels/:name`` +* ``/repos/:owner/:repo/issues/:number/labels/:name`` * DELETE: :meth:`github.Issue.Issue.remove_from_labels` -* ``/repos/:user/:repo/issues/comments`` +* ``/repos/:owner/:repo/issues/comments`` * GET: :meth:`github.Repository.Repository.get_issues_comments` -* ``/repos/:user/:repo/issues/comments/:id`` +* ``/repos/:owner/:repo/issues/comments/:id`` * GET: :meth:`github.Issue.Issue.get_comment` or :meth:`gituhub.PullRequest.PullRequest.get_issue_comment` * PATCH: :meth:`github.IssueComment.IssueComment.edit` * DELETE: :meth:`github.IssueComment.IssueComment.delete` -* ``/repos/:user/:repo/issues/events`` +* ``/repos/:owner/:repo/issues/events`` * GET: :meth:`github.Repository.Repository.get_issues_events` -* ``/repos/:user/:repo/issues/events/:id`` +* ``/repos/:owner/:repo/issues/events/:id`` * GET: :meth:`github.Repository.Repository.get_issues_event` -* ``/repos/:user/:repo/keys`` +* ``/repos/:owner/:repo/keys`` * GET: :meth:`github.Repository.Repository.get_keys` * POST: :meth:`github.Repository.Repository.create_key` -* ``/repos/:user/:repo/keys/:id`` +* ``/repos/:owner/:repo/keys/:id`` * GET: :meth:`github.Repository.Repository.get_key` * PATCH: :meth:`github.RepositoryKey.RepositoryKey.edit` * DELETE: :meth:`github.RepositoryKey.RepositoryKey.delete` -* ``/repos/:user/:repo/labels`` +* ``/repos/:owner/:repo/labels`` * GET: :meth:`github.Repository.Repository.get_labels` * POST: :meth:`github.Repository.Repository.create_label` -* ``/repos/:user/:repo/labels/:name`` +* ``/repos/:owner/:repo/labels/:name`` * GET: :meth:`github.Repository.Repository.get_label` * PATCH: :meth:`github.Label.Label.edit` * DELETE: :meth:`github.Label.Label.delete` -* ``/repos/:user/:repo/languages`` +* ``/repos/:owner/:repo/languages`` * GET: :meth:`github.Repository.Repository.get_languages` -* ``/repos/:user/:repo/merges`` +* ``/repos/:owner/:repo/merges`` * POST: :meth:`github.Repository.Repository.merge` -* ``/repos/:user/:repo/milestones`` +* ``/repos/:owner/:repo/milestones`` * GET: :meth:`github.Repository.Repository.get_milestones` * POST: :meth:`github.Repository.Repository.create_milestone` -* ``/repos/:user/:repo/milestones/:number`` +* ``/repos/:owner/:repo/milestones/:number`` * GET: :meth:`github.Repository.Repository.get_milestone` * PATCH: :meth:`github.Milestone.Milestone.edit` * DELETE: :meth:`github.Milestone.Milestone.delete` -* ``/repos/:user/:repo/milestones/:number/labels`` +* ``/repos/:owner/:repo/milestones/:number/labels`` * GET: :meth:`github.Milestone.Milestone.get_labels` -* ``/repos/:user/:repo/pulls`` +* ``/repos/:owner/:repo/pulls`` * GET: :meth:`github.Repository.Repository.get_pulls` * POST: :meth:`github.Repository.Repository.create_pull` -* ``/repos/:user/:repo/pulls/:number`` +* ``/repos/:owner/:repo/pulls/:number`` * GET: :meth:`github.Repository.Repository.get_pull` * PATCH: :meth:`github.PullRequest.PullRequest.edit` -* ``/repos/:user/:repo/pulls/:number/comments`` +* ``/repos/:owner/:repo/pulls/:number/comments`` * GET: :meth:`github.PullRequest.PullRequest.get_comments` or :meth:`github.PullRequest.PullRequest.get_review_comments` * POST: :meth:`github.PullRequest.PullRequest.create_comment` or :meth:`github.PullRequest.PullRequest.create_review_comment` -* ``/repos/:user/:repo/pulls/:number/commits`` +* ``/repos/:owner/:repo/pulls/:number/commits`` * GET: :meth:`github.PullRequest.PullRequest.get_commits` -* ``/repos/:user/:repo/pulls/:number/files`` +* ``/repos/:owner/:repo/pulls/:number/files`` * GET: :meth:`github.PullRequest.PullRequest.get_files` -* ``/repos/:user/:repo/pulls/:number/merge`` +* ``/repos/:owner/:repo/pulls/:number/merge`` * GET: :meth:`github.PullRequest.PullRequest.is_merged` * PUT: :meth:`github.PullRequest.PullRequest.merge` -* ``/repos/:user/:repo/pulls/comments`` +* ``/repos/:owner/:repo/pulls/comments`` * GET: :meth:`github.Repository.Repository.get_pulls_comments` or :meth:`github.Repository.Repository.get_pulls_review_comments` -* ``/repos/:user/:repo/pulls/comments/:number`` +* ``/repos/:owner/:repo/pulls/comments/:number`` * GET: :meth:`github.PullRequest.PullRequest.get_comment` or :meth:`github.PullRequest.PullRequest.get_review_comment` * PATCH: :meth:`github.PullRequestComment.PullRequestComment.edit` * DELETE: :meth:`github.PullRequestComment.PullRequestComment.delete` -* ``/repos/:user/:repo/readme`` +* ``/repos/:owner/:repo/readme`` * GET: :meth:`github.Repository.Repository.get_readme` -* ``/repos/:user/:repo/stargazers`` +* ``/repos/:owner/:repo/stargazers`` * GET: :meth:`github.Repository.Repository.get_stargazers` -* ``/repos/:user/:repo/statuses/:sha`` +* ``/repos/:owner/:repo/statuses/:ref`` * GET: :meth:`github.Commit.Commit.get_statuses` + +* ``/repos/:owner/:repo/statuses/:sha`` + * POST: :meth:`github.Commit.Commit.create_status` -* ``/repos/:user/:repo/subscribers`` +* ``/repos/:owner/:repo/subscribers`` * GET: :meth:`github.Repository.Repository.get_subscribers` -* ``/repos/:user/:repo/tags`` +* ``/repos/:owner/:repo/tags`` * GET: :meth:`github.Repository.Repository.get_tags` -* ``/repos/:user/:repo/teams`` +* ``/repos/:owner/:repo/teams`` * GET: :meth:`github.Repository.Repository.get_teams` -* ``/repos/:user/:repo/watchers`` +* ``/repos/:owner/:repo/watchers`` * GET: :meth:`github.Repository.Repository.get_watchers` @@ -486,10 +489,13 @@ APIs * GET: :meth:`github.Team.Team.get_repos` -* ``/teams/:id/repos/:user/:repo`` +* ``/teams/:id/repos/:org/:repo`` + + * PUT: :meth:`github.Team.Team.add_to_repos` + +* ``/teams/:id/repos/:owner/:repo`` * GET: :meth:`github.Team.Team.has_in_repos` - * PUT: :meth:`github.Team.Team.add_to_repos` * DELETE: :meth:`github.Team.Team.remove_from_repos` * ``/user`` @@ -545,7 +551,7 @@ APIs * GET: :meth:`github.AuthenticatedUser.AuthenticatedUser.get_starred` -* ``/user/starred/:user/:repo`` +* ``/user/starred/:owner/:repo`` * GET: :meth:`github.AuthenticatedUser.AuthenticatedUser.has_in_starred` * PUT: :meth:`github.AuthenticatedUser.AuthenticatedUser.add_to_starred` @@ -555,7 +561,7 @@ APIs * GET: :meth:`github.AuthenticatedUser.AuthenticatedUser.get_subscriptions` -* ``/user/subscriptions/:user/:repo`` +* ``/user/subscriptions/:owner/:repo`` * GET: :meth:`github.AuthenticatedUser.AuthenticatedUser.has_in_subscriptions` * PUT: :meth:`github.AuthenticatedUser.AuthenticatedUser.add_to_subscriptions` @@ -565,7 +571,7 @@ APIs * GET: :meth:`github.AuthenticatedUser.AuthenticatedUser.get_watched` -* ``/user/watched/:user/:repo`` +* ``/user/watched/:owner/:repo`` * GET: :meth:`github.AuthenticatedUser.AuthenticatedUser.has_in_watched` * PUT: :meth:`github.AuthenticatedUser.AuthenticatedUser.add_to_watched` diff --git a/doc/changes.rst b/doc/changes.rst index 4fb35905..8202f7b8 100644 --- a/doc/changes.rst +++ b/doc/changes.rst @@ -93,7 +93,7 @@ Version 1.12.1 (February 20th, 2013) * Add a shortcut function :meth:`github.MainClass.Github.get_repo` to get a repo directly from its full name. thank you `lwc `_ for the contribution * :meth:`github.MainClass.Github.get_gitignore_templates` and :meth:`github.MainClass.Github.get_gitignore_template` for APIs ``/gitignore/templates`` * Add the optional ``ref`` parameter to :meth:`github.Repository.Repository.get_contents` and :meth:`github.Repository.Repository.get_readme`. Thank you `fixxxeruk `_ for the contribution -* Get comments for all issues and all pull requests on a repository (``GET /repos/:user/:repo/pulls/comments``: :meth:`github.Repository.Repository.get_pulls_comments` or :meth:`github.Repository.Repository.get_pulls_review_comments`; ``GET /repos/:user/:repo/issues/comments``: :meth:`github.Repository.Repository.get_issues_comments`) +* Get comments for all issues and all pull requests on a repository (``GET /repos/:owner/:repo/pulls/comments``: :meth:`github.Repository.Repository.get_pulls_comments` or :meth:`github.Repository.Repository.get_pulls_review_comments`; ``GET /repos/:owner/:repo/issues/comments``: :meth:`github.Repository.Repository.get_issues_comments`) `Version 1.9.1 `_ (November 20th, 2012) -------------------------------------------------------------------------------------------------------------- @@ -225,9 +225,9 @@ Pre-release versions * GET `/gists/public` * GET `/issues` - * GET `/repos/:user/:repo/compare/:base...:head` - * GET `/repos/:user/:repo/git/trees/:sha?recursive-1` - * POST `/repos/:user/:repo/git/trees?base_tree-` + * GET `/repos/:owner/:repo/compare/:base...:head` + * GET `/repos/:owner/:repo/git/trees/:sha?recursive-1` + * POST `/repos/:owner/:repo/git/trees?base_tree-` * Gists * Autorizations diff --git a/github/AuthenticatedUser.py b/github/AuthenticatedUser.py index e64bb2d8..56638122 100644 --- a/github/AuthenticatedUser.py +++ b/github/AuthenticatedUser.py @@ -276,7 +276,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject): def add_to_starred(self, starred): """ - :calls: `PUT /user/starred/:user/:repo `_ + :calls: `PUT /user/starred/:owner/:repo `_ :param starred: :class:`github.Repository.Repository` :rtype: None """ @@ -290,7 +290,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject): def add_to_subscriptions(self, subscription): """ - :calls: `PUT /user/subscriptions/:user/:repo `_ + :calls: `PUT /user/subscriptions/:owner/:repo `_ :param subscription: :class:`github.Repository.Repository` :rtype: None """ @@ -304,7 +304,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject): def add_to_watched(self, watched): """ - :calls: `PUT /user/watched/:user/:repo `_ + :calls: `PUT /user/watched/:owner/:repo `_ :param watched: :class:`github.Repository.Repository` :rtype: None """ @@ -352,7 +352,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject): def create_fork(self, repo): """ - :calls: `POST /repos/:user/:repo/forks `_ + :calls: `POST /repos/:owner/:repo/forks `_ :param repo: :class:`github.Repository.Repository` :rtype: :class:`github.Repository.Repository` """ @@ -760,7 +760,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject): def get_repo(self, name): """ - :calls: `GET /repos/:user/:repo `_ + :calls: `GET /repos/:owner/:repo `_ :param name: string :rtype: :class:`github.Repository.Repository` """ @@ -863,7 +863,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject): def has_in_starred(self, starred): """ - :calls: `GET /user/starred/:user/:repo `_ + :calls: `GET /user/starred/:owner/:repo `_ :param starred: :class:`github.Repository.Repository` :rtype: bool """ @@ -878,7 +878,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject): def has_in_subscriptions(self, subscription): """ - :calls: `GET /user/subscriptions/:user/:repo `_ + :calls: `GET /user/subscriptions/:owner/:repo `_ :param subscription: :class:`github.Repository.Repository` :rtype: bool """ @@ -893,7 +893,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject): def has_in_watched(self, watched): """ - :calls: `GET /user/watched/:user/:repo `_ + :calls: `GET /user/watched/:owner/:repo `_ :param watched: :class:`github.Repository.Repository` :rtype: bool """ @@ -937,7 +937,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject): def remove_from_starred(self, starred): """ - :calls: `DELETE /user/starred/:user/:repo `_ + :calls: `DELETE /user/starred/:owner/:repo `_ :param starred: :class:`github.Repository.Repository` :rtype: None """ @@ -951,7 +951,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject): def remove_from_subscriptions(self, subscription): """ - :calls: `DELETE /user/subscriptions/:user/:repo `_ + :calls: `DELETE /user/subscriptions/:owner/:repo `_ :param subscription: :class:`github.Repository.Repository` :rtype: None """ @@ -965,7 +965,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject): def remove_from_watched(self, watched): """ - :calls: `DELETE /user/watched/:user/:repo `_ + :calls: `DELETE /user/watched/:owner/:repo `_ :param watched: :class:`github.Repository.Repository` :rtype: None """ diff --git a/github/Commit.py b/github/Commit.py index 613885ab..264dc420 100644 --- a/github/Commit.py +++ b/github/Commit.py @@ -106,7 +106,7 @@ class Commit(github.GithubObject.CompletableGithubObject): def create_comment(self, body, line=github.GithubObject.NotSet, path=github.GithubObject.NotSet, position=github.GithubObject.NotSet): """ - :calls: `POST /repos/:user/:repo/commits/:sha/comments `_ + :calls: `POST /repos/:owner/:repo/commits/:sha/comments `_ :param body: string :param line: integer :param path: string @@ -136,7 +136,7 @@ class Commit(github.GithubObject.CompletableGithubObject): def create_status(self, state, target_url=github.GithubObject.NotSet, description=github.GithubObject.NotSet): """ - :calls: `POST /repos/:user/:repo/statuses/:sha `_ + :calls: `POST /repos/:owner/:repo/statuses/:sha `_ :param state: string :param target_url: string :param description: string @@ -162,7 +162,7 @@ class Commit(github.GithubObject.CompletableGithubObject): def get_comments(self): """ - :calls: `GET /repos/:user/:repo/commits/:sha/comments `_ + :calls: `GET /repos/:owner/:repo/commits/:sha/comments `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.CommitComment.CommitComment` """ return github.PaginatedList.PaginatedList( @@ -174,7 +174,7 @@ class Commit(github.GithubObject.CompletableGithubObject): def get_statuses(self): """ - :calls: `GET /repos/:user/:repo/statuses/:sha `_ + :calls: `GET /repos/:owner/:repo/statuses/:ref `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.CommitStatus.CommitStatus` """ return github.PaginatedList.PaginatedList( diff --git a/github/CommitComment.py b/github/CommitComment.py index bdb30272..0a3cacdf 100644 --- a/github/CommitComment.py +++ b/github/CommitComment.py @@ -123,7 +123,7 @@ class CommitComment(github.GithubObject.CompletableGithubObject): def delete(self): """ - :calls: `DELETE /repos/:user/:repo/comments/:id `_ + :calls: `DELETE /repos/:owner/:repo/comments/:id `_ :rtype: None """ headers, data = self._requester.requestJsonAndCheck( @@ -135,7 +135,7 @@ class CommitComment(github.GithubObject.CompletableGithubObject): def edit(self, body): """ - :calls: `PATCH /repos/:user/:repo/comments/:id `_ + :calls: `PATCH /repos/:owner/:repo/comments/:id `_ :param body: string :rtype: None """ diff --git a/github/Download.py b/github/Download.py index 580e3cd2..3023d051 100644 --- a/github/Download.py +++ b/github/Download.py @@ -193,7 +193,7 @@ class Download(github.GithubObject.CompletableGithubObject): def delete(self): """ - :calls: `DELETE /repos/:user/:repo/downloads/:id `_ + :calls: `DELETE /repos/:owner/:repo/downloads/:id `_ :rtype: None """ headers, data = self._requester.requestJsonAndCheck( diff --git a/github/Gist.py b/github/Gist.py index bc6c05cb..744df418 100644 --- a/github/Gist.py +++ b/github/Gist.py @@ -160,7 +160,7 @@ class Gist(github.GithubObject.CompletableGithubObject): def create_comment(self, body): """ - :calls: `POST /gists/:id/comments `_ + :calls: `POST /gists/:gist_id/comments `_ :param body: string :rtype: :class:`github.GistComment.GistComment` """ @@ -225,7 +225,7 @@ class Gist(github.GithubObject.CompletableGithubObject): def get_comment(self, id): """ - :calls: `GET /gists/comments/:id `_ + :calls: `GET /gists/:gist_id/comments/:id `_ :param id: integer :rtype: :class:`github.GistComment.GistComment` """ @@ -240,7 +240,7 @@ class Gist(github.GithubObject.CompletableGithubObject): def get_comments(self): """ - :calls: `GET /gists/:id/comments `_ + :calls: `GET /gists/:gist_id/comments `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.GistComment.GistComment` """ return github.PaginatedList.PaginatedList( diff --git a/github/GistComment.py b/github/GistComment.py index 1c0c5978..498b2e1b 100644 --- a/github/GistComment.py +++ b/github/GistComment.py @@ -83,7 +83,7 @@ class GistComment(github.GithubObject.CompletableGithubObject): def delete(self): """ - :calls: `DELETE /gists/comments/:id `_ + :calls: `DELETE /gists/:gist_id/comments/:id `_ :rtype: None """ headers, data = self._requester.requestJsonAndCheck( @@ -95,7 +95,7 @@ class GistComment(github.GithubObject.CompletableGithubObject): def edit(self, body): """ - :calls: `PATCH /gists/comments/:id `_ + :calls: `PATCH /gists/:gist_id/comments/:id `_ :param body: string :rtype: None """ diff --git a/github/GitRef.py b/github/GitRef.py index bd489c81..ee55ef05 100644 --- a/github/GitRef.py +++ b/github/GitRef.py @@ -59,7 +59,7 @@ class GitRef(github.GithubObject.CompletableGithubObject): def delete(self): """ - :calls: `DELETE /repos/:user/:repo/git/refs/:ref `_ + :calls: `DELETE /repos/:owner/:repo/git/refs/:ref `_ :rtype: None """ headers, data = self._requester.requestJsonAndCheck( @@ -71,7 +71,7 @@ class GitRef(github.GithubObject.CompletableGithubObject): def edit(self, sha, force=github.GithubObject.NotSet): """ - :calls: `PATCH /repos/:user/:repo/git/refs/:ref `_ + :calls: `PATCH /repos/:owner/:repo/git/refs/:ref `_ :param sha: string :param force: bool :rtype: None diff --git a/github/Hook.py b/github/Hook.py index 6be867e3..17b6a480 100644 --- a/github/Hook.py +++ b/github/Hook.py @@ -107,7 +107,7 @@ class Hook(github.GithubObject.CompletableGithubObject): def delete(self): """ - :calls: `DELETE /repos/:user/:repo/hooks/:id `_ + :calls: `DELETE /repos/:owner/:repo/hooks/:id `_ :rtype: None """ headers, data = self._requester.requestJsonAndCheck( @@ -119,7 +119,7 @@ class Hook(github.GithubObject.CompletableGithubObject): def edit(self, name, config, events=github.GithubObject.NotSet, add_events=github.GithubObject.NotSet, remove_events=github.GithubObject.NotSet, active=github.GithubObject.NotSet): """ - :calls: `PATCH /repos/:user/:repo/hooks/:id `_ + :calls: `PATCH /repos/:owner/:repo/hooks/:id `_ :param name: string :param config: dict :param events: list of string @@ -156,7 +156,7 @@ class Hook(github.GithubObject.CompletableGithubObject): def test(self): """ - :calls: `POST /repos/:user/:repo/hooks/:id/test `_ + :calls: `POST /repos/:owner/:repo/hooks/:id/test `_ :rtype: None """ headers, data = self._requester.requestJsonAndCheck( diff --git a/github/Issue.py b/github/Issue.py index 84542541..7fa890e6 100644 --- a/github/Issue.py +++ b/github/Issue.py @@ -188,7 +188,7 @@ class Issue(github.GithubObject.CompletableGithubObject): def add_to_labels(self, *labels): """ - :calls: `POST /repos/:user/:repo/issues/:number/labels `_ + :calls: `POST /repos/:owner/:repo/issues/:number/labels `_ :param label: :class:`github.Label.Label` :rtype: None """ @@ -203,7 +203,7 @@ class Issue(github.GithubObject.CompletableGithubObject): def create_comment(self, body): """ - :calls: `POST /repos/:user/:repo/issues/:number/comments `_ + :calls: `POST /repos/:owner/:repo/issues/:number/comments `_ :param body: string :rtype: :class:`github.IssueComment.IssueComment` """ @@ -221,7 +221,7 @@ class Issue(github.GithubObject.CompletableGithubObject): def delete_labels(self): """ - :calls: `DELETE /repos/:user/:repo/issues/:number/labels `_ + :calls: `DELETE /repos/:owner/:repo/issues/:number/labels `_ :rtype: None """ headers, data = self._requester.requestJsonAndCheck( @@ -233,7 +233,7 @@ class Issue(github.GithubObject.CompletableGithubObject): def edit(self, title=github.GithubObject.NotSet, body=github.GithubObject.NotSet, assignee=github.GithubObject.NotSet, state=github.GithubObject.NotSet, milestone=github.GithubObject.NotSet, labels=github.GithubObject.NotSet): """ - :calls: `PATCH /repos/:user/:repo/issues/:number `_ + :calls: `PATCH /repos/:owner/:repo/issues/:number `_ :param title: string :param body: string :param assignee: :class:`github.NamedUser.NamedUser` or None @@ -271,7 +271,7 @@ class Issue(github.GithubObject.CompletableGithubObject): def get_comment(self, id): """ - :calls: `GET /repos/:user/:repo/issues/comments/:id `_ + :calls: `GET /repos/:owner/:repo/issues/comments/:id `_ :param id: integer :rtype: :class:`github.IssueComment.IssueComment` """ @@ -286,7 +286,7 @@ class Issue(github.GithubObject.CompletableGithubObject): def get_comments(self): """ - :calls: `GET /repos/:user/:repo/issues/:number/comments `_ + :calls: `GET /repos/:owner/:repo/issues/:number/comments `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.IssueComment.IssueComment` """ return github.PaginatedList.PaginatedList( @@ -298,7 +298,7 @@ class Issue(github.GithubObject.CompletableGithubObject): def get_events(self): """ - :calls: `GET /repos/:user/:repo/issues/:number/events `_ + :calls: `GET /repos/:owner/:repo/issues/:issue_number/events `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.IssueEvent.IssueEvent` """ return github.PaginatedList.PaginatedList( @@ -310,7 +310,7 @@ class Issue(github.GithubObject.CompletableGithubObject): def get_labels(self): """ - :calls: `GET /repos/:user/:repo/issues/:number/labels `_ + :calls: `GET /repos/:owner/:repo/issues/:number/labels `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Label.Label` """ return github.PaginatedList.PaginatedList( @@ -322,7 +322,7 @@ class Issue(github.GithubObject.CompletableGithubObject): def remove_from_labels(self, label): """ - :calls: `DELETE /repos/:user/:repo/issues/:number/labels/:name `_ + :calls: `DELETE /repos/:owner/:repo/issues/:number/labels/:name `_ :param label: :class:`github.Label.Label` :rtype: None """ @@ -336,7 +336,7 @@ class Issue(github.GithubObject.CompletableGithubObject): def set_labels(self, *labels): """ - :calls: `PUT /repos/:user/:repo/issues/:number/labels `_ + :calls: `PUT /repos/:owner/:repo/issues/:number/labels `_ :param label: :class:`github.Label.Label` :rtype: None """ diff --git a/github/IssueComment.py b/github/IssueComment.py index 906b4059..79720181 100644 --- a/github/IssueComment.py +++ b/github/IssueComment.py @@ -92,7 +92,7 @@ class IssueComment(github.GithubObject.CompletableGithubObject): def delete(self): """ - :calls: `DELETE /repos/:user/:repo/issues/comments/:id `_ + :calls: `DELETE /repos/:owner/:repo/issues/comments/:id `_ :rtype: None """ headers, data = self._requester.requestJsonAndCheck( @@ -104,7 +104,7 @@ class IssueComment(github.GithubObject.CompletableGithubObject): def edit(self, body): """ - :calls: `PATCH /repos/:user/:repo/issues/comments/:id `_ + :calls: `PATCH /repos/:owner/:repo/issues/comments/:id `_ :param body: string :rtype: None """ diff --git a/github/Label.py b/github/Label.py index 52e6f2ed..ff1c3d18 100644 --- a/github/Label.py +++ b/github/Label.py @@ -60,7 +60,7 @@ class Label(github.GithubObject.CompletableGithubObject): def delete(self): """ - :calls: `DELETE /repos/:user/:repo/labels/:name `_ + :calls: `DELETE /repos/:owner/:repo/labels/:name `_ :rtype: None """ headers, data = self._requester.requestJsonAndCheck( @@ -72,7 +72,7 @@ class Label(github.GithubObject.CompletableGithubObject): def edit(self, name, color): """ - :calls: `PATCH /repos/:user/:repo/labels/:name `_ + :calls: `PATCH /repos/:owner/:repo/labels/:name `_ :param name: string :param color: string :rtype: None diff --git a/github/MainClass.py b/github/MainClass.py index db99bce3..dbde89d9 100644 --- a/github/MainClass.py +++ b/github/MainClass.py @@ -158,7 +158,7 @@ class Github(object): def get_repo(self, full_name): """ - :calls: `GET /repos/:user/:repo `_ + :calls: `GET /repos/:owner/:repo `_ :rtype: :class:`github.Repository.Repository` """ assert isinstance(full_name, (str, unicode)), full_name diff --git a/github/Milestone.py b/github/Milestone.py index 32394583..717b23ad 100644 --- a/github/Milestone.py +++ b/github/Milestone.py @@ -128,7 +128,7 @@ class Milestone(github.GithubObject.CompletableGithubObject): def delete(self): """ - :calls: `DELETE /repos/:user/:repo/milestones/:number `_ + :calls: `DELETE /repos/:owner/:repo/milestones/:number `_ :rtype: None """ headers, data = self._requester.requestJsonAndCheck( @@ -140,7 +140,7 @@ class Milestone(github.GithubObject.CompletableGithubObject): def edit(self, title, state=github.GithubObject.NotSet, description=github.GithubObject.NotSet, due_on=github.GithubObject.NotSet): """ - :calls: `PATCH /repos/:user/:repo/milestones/:number `_ + :calls: `PATCH /repos/:owner/:repo/milestones/:number `_ :param title: string :param state: string :param description: string @@ -170,7 +170,7 @@ class Milestone(github.GithubObject.CompletableGithubObject): def get_labels(self): """ - :calls: `GET /repos/:user/:repo/milestones/:number/labels `_ + :calls: `GET /repos/:owner/:repo/milestones/:number/labels `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Label.Label` """ return github.PaginatedList.PaginatedList( diff --git a/github/NamedUser.py b/github/NamedUser.py index 3e24e5ac..12eed7e2 100644 --- a/github/NamedUser.py +++ b/github/NamedUser.py @@ -383,7 +383,7 @@ class NamedUser(github.GithubObject.CompletableGithubObject): def get_repo(self, name): """ - :calls: `GET /repos/:user/:repo `_ + :calls: `GET /repos/:owner/:repo `_ :param name: string :rtype: :class:`github.Repository.Repository` """ diff --git a/github/Organization.py b/github/Organization.py index 8c19f160..a89b5b42 100644 --- a/github/Organization.py +++ b/github/Organization.py @@ -250,7 +250,7 @@ class Organization(github.GithubObject.CompletableGithubObject): def create_fork(self, repo): """ - :calls: `POST /repos/:user/:repo/forks `_ + :calls: `POST /repos/:owner/:repo/forks `_ :param repo: :class:`github.Repository.Repository` :rtype: :class:`github.Repository.Repository` """ @@ -460,7 +460,7 @@ class Organization(github.GithubObject.CompletableGithubObject): def get_repo(self, name): """ - :calls: `GET /repos/:user/:repo `_ + :calls: `GET /repos/:owner/:repo `_ :param name: string :rtype: :class:`github.Repository.Repository` """ diff --git a/github/PullRequest.py b/github/PullRequest.py index 8104878b..f0d8ed12 100644 --- a/github/PullRequest.py +++ b/github/PullRequest.py @@ -260,7 +260,7 @@ class PullRequest(github.GithubObject.CompletableGithubObject): def create_comment(self, body, commit_id, path, position): """ - :calls: `POST /repos/:user/:repo/pulls/:number/comments `_ + :calls: `POST /repos/:owner/:repo/pulls/:number/comments `_ :param body: string :param commit_id: :class:`github.Commit.Commit` :param path: string @@ -271,7 +271,7 @@ class PullRequest(github.GithubObject.CompletableGithubObject): def create_review_comment(self, body, commit_id, path, position): """ - :calls: `POST /repos/:user/:repo/pulls/:number/comments `_ + :calls: `POST /repos/:owner/:repo/pulls/:number/comments `_ :param body: string :param commit_id: :class:`github.Commit.Commit` :param path: string @@ -298,7 +298,7 @@ class PullRequest(github.GithubObject.CompletableGithubObject): def create_issue_comment(self, body): """ - :calls: `POST /repos/:user/:repo/issues/:number/comments `_ + :calls: `POST /repos/:owner/:repo/issues/:number/comments `_ :param body: string :rtype: :class:`github.IssueComment.IssueComment` """ @@ -316,7 +316,7 @@ class PullRequest(github.GithubObject.CompletableGithubObject): def edit(self, title=github.GithubObject.NotSet, body=github.GithubObject.NotSet, state=github.GithubObject.NotSet): """ - :calls: `PATCH /repos/:user/:repo/pulls/:number `_ + :calls: `PATCH /repos/:owner/:repo/pulls/:number `_ :param title: string :param body: string :param state: string @@ -342,7 +342,7 @@ class PullRequest(github.GithubObject.CompletableGithubObject): def get_comment(self, id): """ - :calls: `GET /repos/:user/:repo/pulls/comments/:number `_ + :calls: `GET /repos/:owner/:repo/pulls/comments/:number `_ :param id: integer :rtype: :class:`github.PullRequestComment.PullRequestComment` """ @@ -350,7 +350,7 @@ class PullRequest(github.GithubObject.CompletableGithubObject): def get_review_comment(self, id): """ - :calls: `GET /repos/:user/:repo/pulls/comments/:number `_ + :calls: `GET /repos/:owner/:repo/pulls/comments/:number `_ :param id: integer :rtype: :class:`github.PullRequestComment.PullRequestComment` """ @@ -365,14 +365,14 @@ class PullRequest(github.GithubObject.CompletableGithubObject): def get_comments(self): """ - :calls: `GET /repos/:user/:repo/pulls/:number/comments `_ + :calls: `GET /repos/:owner/:repo/pulls/:number/comments `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.PullRequestComment.PullRequestComment` """ return self.get_review_comments() def get_review_comments(self): """ - :calls: `GET /repos/:user/:repo/pulls/:number/comments `_ + :calls: `GET /repos/:owner/:repo/pulls/:number/comments `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.PullRequestComment.PullRequestComment` """ return github.PaginatedList.PaginatedList( @@ -384,7 +384,7 @@ class PullRequest(github.GithubObject.CompletableGithubObject): def get_commits(self): """ - :calls: `GET /repos/:user/:repo/pulls/:number/commits `_ + :calls: `GET /repos/:owner/:repo/pulls/:number/commits `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Commit.Commit` """ return github.PaginatedList.PaginatedList( @@ -396,7 +396,7 @@ class PullRequest(github.GithubObject.CompletableGithubObject): def get_files(self): """ - :calls: `GET /repos/:user/:repo/pulls/:number/files `_ + :calls: `GET /repos/:owner/:repo/pulls/:number/files `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.File.File` """ return github.PaginatedList.PaginatedList( @@ -408,7 +408,7 @@ class PullRequest(github.GithubObject.CompletableGithubObject): def get_issue_comment(self, id): """ - :calls: `GET /repos/:user/:repo/issues/comments/:id `_ + :calls: `GET /repos/:owner/:repo/issues/comments/:id `_ :param id: integer :rtype: :class:`github.IssueComment.IssueComment` """ @@ -423,7 +423,7 @@ class PullRequest(github.GithubObject.CompletableGithubObject): def get_issue_comments(self): """ - :calls: `GET /repos/:user/:repo/issues/:number/comments `_ + :calls: `GET /repos/:owner/:repo/issues/:number/comments `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.IssueComment.IssueComment` """ return github.PaginatedList.PaginatedList( @@ -435,7 +435,7 @@ class PullRequest(github.GithubObject.CompletableGithubObject): def is_merged(self): """ - :calls: `GET /repos/:user/:repo/pulls/:number/merge `_ + :calls: `GET /repos/:owner/:repo/pulls/:number/merge `_ :rtype: bool """ status, headers, data = self._requester.requestJson( @@ -448,7 +448,7 @@ class PullRequest(github.GithubObject.CompletableGithubObject): def merge(self, commit_message=github.GithubObject.NotSet): """ - :calls: `PUT /repos/:user/:repo/pulls/:number/merge `_ + :calls: `PUT /repos/:owner/:repo/pulls/:number/merge `_ :param commit_message: string :rtype: :class:`github.PullRequestMergeStatus.PullRequestMergeStatus` """ diff --git a/github/PullRequestComment.py b/github/PullRequestComment.py index 9704ef95..aec3ed84 100644 --- a/github/PullRequestComment.py +++ b/github/PullRequestComment.py @@ -133,7 +133,7 @@ class PullRequestComment(github.GithubObject.CompletableGithubObject): def delete(self): """ - :calls: `DELETE /repos/:user/:repo/pulls/comments/:number `_ + :calls: `DELETE /repos/:owner/:repo/pulls/comments/:number `_ :rtype: None """ headers, data = self._requester.requestJsonAndCheck( @@ -145,7 +145,7 @@ class PullRequestComment(github.GithubObject.CompletableGithubObject): def edit(self, body): """ - :calls: `PATCH /repos/:user/:repo/pulls/comments/:number `_ + :calls: `PATCH /repos/:owner/:repo/pulls/comments/:number `_ :param body: string :rtype: None """ diff --git a/github/Repository.py b/github/Repository.py index 01072aad..306e9dc2 100644 --- a/github/Repository.py +++ b/github/Repository.py @@ -308,7 +308,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def add_to_collaborators(self, collaborator): """ - :calls: `PUT /repos/:user/:repo/collaborators/:user `_ + :calls: `PUT /repos/:owner/:repo/collaborators/:user `_ :param collaborator: :class:`github.NamedUser.NamedUser` :rtype: None """ @@ -322,7 +322,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def compare(self, base, head): """ - :calls: `GET /repos/:user/:repo/compare/:base...:head `_ + :calls: `GET /repos/:owner/:repo/compare/:base...:head `_ :param base: string :param head: string :rtype: :class:`github.Comparison.Comparison` @@ -339,7 +339,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def create_download(self, name, size, description=github.GithubObject.NotSet, content_type=github.GithubObject.NotSet): """ - :calls: `POST /repos/:user/:repo/downloads `_ + :calls: `POST /repos/:owner/:repo/downloads `_ :param name: string :param size: integer :param description: string @@ -368,7 +368,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def create_git_blob(self, content, encoding): """ - :calls: `POST /repos/:user/:repo/git/blobs `_ + :calls: `POST /repos/:owner/:repo/git/blobs `_ :param content: string :param encoding: string :rtype: :class:`github.GitBlob.GitBlob` @@ -389,7 +389,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def create_git_commit(self, message, tree, parents, author=github.GithubObject.NotSet, committer=github.GithubObject.NotSet): """ - :calls: `POST /repos/:user/:repo/git/commits `_ + :calls: `POST /repos/:owner/:repo/git/commits `_ :param message: string :param tree: :class:`github.GitTree.GitTree` :param parents: list of :class:`github.GitCommit.GitCommit` @@ -421,7 +421,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def create_git_ref(self, ref, sha): """ - :calls: `POST /repos/:user/:repo/git/refs `_ + :calls: `POST /repos/:owner/:repo/git/refs `_ :param ref: string :param sha: string :rtype: :class:`github.GitRef.GitRef` @@ -442,7 +442,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def create_git_tag(self, tag, message, object, type, tagger=github.GithubObject.NotSet): """ - :calls: `POST /repos/:user/:repo/git/tags `_ + :calls: `POST /repos/:owner/:repo/git/tags `_ :param tag: string :param message: string :param object: string @@ -473,7 +473,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def create_git_tree(self, tree, base_tree=github.GithubObject.NotSet): """ - :calls: `POST /repos/:user/:repo/git/trees `_ + :calls: `POST /repos/:owner/:repo/git/trees `_ :param tree: list of :class:`github.InputGitTreeElement.InputGitTreeElement` :param base_tree: :class:`github.GitTree.GitTree` :rtype: :class:`github.GitTree.GitTree` @@ -495,7 +495,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def create_hook(self, name, config, events=github.GithubObject.NotSet, active=github.GithubObject.NotSet): """ - :calls: `POST /repos/:user/:repo/hooks `_ + :calls: `POST /repos/:owner/:repo/hooks `_ :param name: string :param config: dict :param events: list of string @@ -524,7 +524,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def create_issue(self, title, body=github.GithubObject.NotSet, assignee=github.GithubObject.NotSet, milestone=github.GithubObject.NotSet, labels=github.GithubObject.NotSet): """ - :calls: `POST /repos/:user/:repo/issues `_ + :calls: `POST /repos/:owner/:repo/issues `_ :param title: string :param body: string :param assignee: :class:`github.NamedUser.NamedUser` @@ -558,7 +558,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def create_key(self, title, key): """ - :calls: `POST /repos/:user/:repo/keys `_ + :calls: `POST /repos/:owner/:repo/keys `_ :param title: string :param key: string :rtype: :class:`github.RepositoryKey.RepositoryKey` @@ -579,7 +579,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def create_label(self, name, color): """ - :calls: `POST /repos/:user/:repo/labels `_ + :calls: `POST /repos/:owner/:repo/labels `_ :param name: string :param color: string :rtype: :class:`github.Label.Label` @@ -600,7 +600,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def create_milestone(self, title, state=github.GithubObject.NotSet, description=github.GithubObject.NotSet, due_on=github.GithubObject.NotSet): """ - :calls: `POST /repos/:user/:repo/milestones `_ + :calls: `POST /repos/:owner/:repo/milestones `_ :param title: string :param state: string :param description: string @@ -630,7 +630,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def create_pull(self, *args, **kwds): """ - :calls: `POST /repos/:user/:repo/pulls `_ + :calls: `POST /repos/:owner/:repo/pulls `_ :param title: string :param body: string :param issue: :class:`github.Issue.Issue` @@ -668,7 +668,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def delete(self): """ - :calls: `DELETE /repos/:user/:repo `_ + :calls: `DELETE /repos/:owner/:repo `_ :rtype: None """ headers, data = self._requester.requestJsonAndCheck( @@ -680,7 +680,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def edit(self, name, description=github.GithubObject.NotSet, homepage=github.GithubObject.NotSet, public=github.GithubObject.NotSet, has_issues=github.GithubObject.NotSet, has_wiki=github.GithubObject.NotSet, has_downloads=github.GithubObject.NotSet, default_branch=github.GithubObject.NotSet): """ - :calls: `PATCH /repos/:user/:repo `_ + :calls: `PATCH /repos/:owner/:repo `_ :param name: string :param description: string :param homepage: string @@ -726,7 +726,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_archive_link(self, archive_format, ref=github.GithubObject.NotSet): """ - :calls: `GET /repos/:user/:repo/:archive_format/:ref `_ + :calls: `GET /repos/:owner/:repo/:archive_format/:ref `_ :param archive_format: string :param ref: string :rtype: string @@ -746,7 +746,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_assignees(self): """ - :calls: `GET /repos/:user/:repo/assignees `_ + :calls: `GET /repos/:owner/:repo/assignees `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser` """ return github.PaginatedList.PaginatedList( @@ -758,7 +758,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_branch(self, branch): """ - :calls: `GET /repos/:user/:repo/branches/:branch `_ + :calls: `GET /repos/:owner/:repo/branches/:branch `_ :param branch: string :rtype: :class:`github.Branch.Branch` """ @@ -773,7 +773,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_branches(self): """ - :calls: `GET /repos/:user/:repo/branches `_ + :calls: `GET /repos/:owner/:repo/branches `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Branch.Branch` """ return github.PaginatedList.PaginatedList( @@ -785,7 +785,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_collaborators(self): """ - :calls: `GET /repos/:user/:repo/collaborators `_ + :calls: `GET /repos/:owner/:repo/collaborators `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser` """ return github.PaginatedList.PaginatedList( @@ -797,7 +797,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_comment(self, id): """ - :calls: `GET /repos/:user/:repo/comments/:id `_ + :calls: `GET /repos/:owner/:repo/comments/:id `_ :param id: integer :rtype: :class:`github.CommitComment.CommitComment` """ @@ -812,7 +812,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_comments(self): """ - :calls: `GET /repos/:user/:repo/comments `_ + :calls: `GET /repos/:owner/:repo/comments `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.CommitComment.CommitComment` """ return github.PaginatedList.PaginatedList( @@ -824,7 +824,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_commit(self, sha): """ - :calls: `GET /repos/:user/:repo/commits/:sha `_ + :calls: `GET /repos/:owner/:repo/commits/:sha `_ :param sha: string :rtype: :class:`github.Commit.Commit` """ @@ -839,7 +839,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_commits(self, sha=github.GithubObject.NotSet, path=github.GithubObject.NotSet): """ - :calls: `GET /repos/:user/:repo/commits `_ + :calls: `GET /repos/:owner/:repo/commits `_ :param sha: string :param path: string :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Commit.Commit` @@ -860,6 +860,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_contents(self, path, ref=github.GithubObject.NotSet): """ + :calls: `GET /repos/:owner/:repo/contents/:path `_ :param path: string :param ref: string :rtype: :class:`github.ContentFile.ContentFile` @@ -868,6 +869,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_file_contents(self, path, ref=github.GithubObject.NotSet): """ + :calls: `GET /repos/:owner/:repo/contents/:path `_ :param path: string :param ref: string :rtype: :class:`github.ContentFile.ContentFile` @@ -887,6 +889,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_dir_contents(self, path, ref=github.GithubObject.NotSet): """ + :calls: `GET /repos/:owner/:repo/contents/:path `_ :param path: string :param ref: string :rtype: list of :class:`github.ContentFile.ContentFile` @@ -919,7 +922,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_contributors(self): """ - :calls: `GET /repos/:user/:repo/contributors `_ + :calls: `GET /repos/:owner/:repo/contributors `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser` """ return github.PaginatedList.PaginatedList( @@ -931,7 +934,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_download(self, id): """ - :calls: `GET /repos/:user/:repo/downloads/:id `_ + :calls: `GET /repos/:owner/:repo/downloads/:id `_ :param id: integer :rtype: :class:`github.Download.Download` """ @@ -946,7 +949,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_downloads(self): """ - :calls: `GET /repos/:user/:repo/downloads `_ + :calls: `GET /repos/:owner/:repo/downloads `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Download.Download` """ return github.PaginatedList.PaginatedList( @@ -958,7 +961,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_events(self): """ - :calls: `GET /repos/:user/:repo/events `_ + :calls: `GET /repos/:owner/:repo/events `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Event.Event` """ return github.PaginatedList.PaginatedList( @@ -970,7 +973,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_forks(self): """ - :calls: `GET /repos/:user/:repo/forks `_ + :calls: `GET /repos/:owner/:repo/forks `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Repository.Repository` """ return github.PaginatedList.PaginatedList( @@ -982,7 +985,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_git_blob(self, sha): """ - :calls: `GET /repos/:user/:repo/git/blobs/:sha `_ + :calls: `GET /repos/:owner/:repo/git/blobs/:sha `_ :param sha: string :rtype: :class:`github.GitBlob.GitBlob` """ @@ -997,7 +1000,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_git_commit(self, sha): """ - :calls: `GET /repos/:user/:repo/git/commits/:sha `_ + :calls: `GET /repos/:owner/:repo/git/commits/:sha `_ :param sha: string :rtype: :class:`github.GitCommit.GitCommit` """ @@ -1012,7 +1015,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_git_ref(self, ref): """ - :calls: `GET /repos/:user/:repo/git/refs/:ref `_ + :calls: `GET /repos/:owner/:repo/git/refs/:ref `_ :param ref: string :rtype: :class:`github.GitRef.GitRef` """ @@ -1030,7 +1033,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_git_refs(self): """ - :calls: `GET /repos/:user/:repo/git/refs `_ + :calls: `GET /repos/:owner/:repo/git/refs `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.GitRef.GitRef` """ return github.PaginatedList.PaginatedList( @@ -1042,7 +1045,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_git_tag(self, sha): """ - :calls: `GET /repos/:user/:repo/git/tags/:sha `_ + :calls: `GET /repos/:owner/:repo/git/tags/:sha `_ :param sha: string :rtype: :class:`github.GitTag.GitTag` """ @@ -1057,7 +1060,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_git_tree(self, sha, recursive=github.GithubObject.NotSet): """ - :calls: `GET /repos/:user/:repo/git/trees/:sha `_ + :calls: `GET /repos/:owner/:repo/git/trees/:sha `_ :param sha: string :param recursive: bool :rtype: :class:`github.GitTree.GitTree` @@ -1077,7 +1080,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_hook(self, id): """ - :calls: `GET /repos/:user/:repo/hooks/:id `_ + :calls: `GET /repos/:owner/:repo/hooks/:id `_ :param id: integer :rtype: :class:`github.Hook.Hook` """ @@ -1092,7 +1095,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_hooks(self): """ - :calls: `GET /repos/:user/:repo/hooks `_ + :calls: `GET /repos/:owner/:repo/hooks `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Hook.Hook` """ return github.PaginatedList.PaginatedList( @@ -1104,7 +1107,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_issue(self, number): """ - :calls: `GET /repos/:user/:repo/issues/:number `_ + :calls: `GET /repos/:owner/:repo/issues/:number `_ :param number: integer :rtype: :class:`github.Issue.Issue` """ @@ -1119,7 +1122,7 @@ class Repository(github.GithubObject.CompletableGithubObject): 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): """ - :calls: `GET /repos/:user/:repo/issues `_ + :calls: `GET /repos/:owner/:repo/issues `_ :param milestone: :class:`github.Milestone.Milestone` or "none" or "*" :param state: string :param assignee: :class:`github.NamedUser.NamedUser` or "none" or "*" @@ -1170,7 +1173,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_issues_comments(self, sort=github.GithubObject.NotSet, direction=github.GithubObject.NotSet, since=github.GithubObject.NotSet): """ - :calls: `GET /repos/:user/:repo/issues/comments `_ + :calls: `GET /repos/:owner/:repo/issues/comments `_ :param sort: string :param direction: string :param since: datetime.datetime @@ -1195,7 +1198,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_issues_event(self, id): """ - :calls: `GET /repos/:user/:repo/issues/events/:id `_ + :calls: `GET /repos/:owner/:repo/issues/events/:id `_ :param id: integer :rtype: :class:`github.IssueEvent.IssueEvent` """ @@ -1210,7 +1213,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_issues_events(self): """ - :calls: `GET /repos/:user/:repo/issues/events `_ + :calls: `GET /repos/:owner/:repo/issues/events `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.IssueEvent.IssueEvent` """ return github.PaginatedList.PaginatedList( @@ -1222,7 +1225,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_key(self, id): """ - :calls: `GET /repos/:user/:repo/keys/:id `_ + :calls: `GET /repos/:owner/:repo/keys/:id `_ :param id: integer :rtype: :class:`github.RepositoryKey.RepositoryKey` """ @@ -1237,7 +1240,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_keys(self): """ - :calls: `GET /repos/:user/:repo/keys `_ + :calls: `GET /repos/:owner/:repo/keys `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.RepositoryKey.RepositoryKey` """ return github.PaginatedList.PaginatedList( @@ -1249,7 +1252,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_label(self, name): """ - :calls: `GET /repos/:user/:repo/labels/:name `_ + :calls: `GET /repos/:owner/:repo/labels/:name `_ :param name: string :rtype: :class:`github.Label.Label` """ @@ -1264,7 +1267,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_labels(self): """ - :calls: `GET /repos/:user/:repo/labels `_ + :calls: `GET /repos/:owner/:repo/labels `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Label.Label` """ return github.PaginatedList.PaginatedList( @@ -1276,7 +1279,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_languages(self): """ - :calls: `GET /repos/:user/:repo/languages `_ + :calls: `GET /repos/:owner/:repo/languages `_ :rtype: dict of string to integer """ headers, data = self._requester.requestJsonAndCheck( @@ -1289,7 +1292,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_milestone(self, number): """ - :calls: `GET /repos/:user/:repo/milestones/:number `_ + :calls: `GET /repos/:owner/:repo/milestones/:number `_ :param number: integer :rtype: :class:`github.Milestone.Milestone` """ @@ -1304,7 +1307,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_milestones(self, state=github.GithubObject.NotSet, sort=github.GithubObject.NotSet, direction=github.GithubObject.NotSet): """ - :calls: `GET /repos/:user/:repo/milestones `_ + :calls: `GET /repos/:owner/:repo/milestones `_ :param state: string :param sort: string :param direction: string @@ -1329,7 +1332,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_network_events(self): """ - :calls: `GET /networks/:user/:repo/events `_ + :calls: `GET /networks/:owner/:repo/events `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Event.Event` """ return github.PaginatedList.PaginatedList( @@ -1341,7 +1344,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_pull(self, number): """ - :calls: `GET /repos/:user/:repo/pulls/:number `_ + :calls: `GET /repos/:owner/:repo/pulls/:number `_ :param number: integer :rtype: :class:`github.PullRequest.PullRequest` """ @@ -1356,7 +1359,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_pulls(self, state=github.GithubObject.NotSet): """ - :calls: `GET /repos/:user/:repo/pulls `_ + :calls: `GET /repos/:owner/:repo/pulls `_ :param state: string :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.PullRequest.PullRequest` """ @@ -1373,7 +1376,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_pulls_comments(self, sort=github.GithubObject.NotSet, direction=github.GithubObject.NotSet, since=github.GithubObject.NotSet): """ - :calls: `GET /repos/:user/:repo/pulls/comments `_ + :calls: `GET /repos/:owner/:repo/pulls/comments `_ :param sort: string :param direction: string :param since: datetime.datetime @@ -1383,7 +1386,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_pulls_review_comments(self, sort=github.GithubObject.NotSet, direction=github.GithubObject.NotSet, since=github.GithubObject.NotSet): """ - :calls: `GET /repos/:user/:repo/pulls/comments `_ + :calls: `GET /repos/:owner/:repo/pulls/comments `_ :param sort: string :param direction: string :param since: datetime.datetime @@ -1408,7 +1411,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_readme(self, ref=github.GithubObject.NotSet): """ - :calls: `GET /repos/:user/:repo/readme `_ + :calls: `GET /repos/:owner/:repo/readme `_ :param ref: string :rtype: :class:`github.ContentFile.ContentFile` """ @@ -1426,7 +1429,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_stargazers(self): """ - :calls: `GET /repos/:user/:repo/stargazers `_ + :calls: `GET /repos/:owner/:repo/stargazers `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser` """ return github.PaginatedList.PaginatedList( @@ -1438,7 +1441,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_subscribers(self): """ - :calls: `GET /repos/:user/:repo/subscribers `_ + :calls: `GET /repos/:owner/:repo/subscribers `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser` """ return github.PaginatedList.PaginatedList( @@ -1450,7 +1453,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_tags(self): """ - :calls: `GET /repos/:user/:repo/tags `_ + :calls: `GET /repos/:owner/:repo/tags `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Tag.Tag` """ return github.PaginatedList.PaginatedList( @@ -1462,7 +1465,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_teams(self): """ - :calls: `GET /repos/:user/:repo/teams `_ + :calls: `GET /repos/:owner/:repo/teams `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Team.Team` """ return github.PaginatedList.PaginatedList( @@ -1474,7 +1477,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_watchers(self): """ - :calls: `GET /repos/:user/:repo/watchers `_ + :calls: `GET /repos/:owner/:repo/watchers `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser` """ return github.PaginatedList.PaginatedList( @@ -1486,7 +1489,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def has_in_assignees(self, assignee): """ - :calls: `GET /repos/:user/:repo/assignees/:assignee `_ + :calls: `GET /repos/:owner/:repo/assignees/:assignee `_ :param assignee: :class:`github.NamedUser.NamedUser` :rtype: bool """ @@ -1501,7 +1504,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def has_in_collaborators(self, collaborator): """ - :calls: `GET /repos/:user/:repo/collaborators/:user `_ + :calls: `GET /repos/:owner/:repo/collaborators/:user `_ :param collaborator: :class:`github.NamedUser.NamedUser` :rtype: bool """ @@ -1536,7 +1539,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def merge(self, base, head, commit_message=github.GithubObject.NotSet): """ - :calls: `POST /repos/:user/:repo/merges `_ + :calls: `POST /repos/:owner/:repo/merges `_ :param base: string :param head: string :param commit_message: string @@ -1564,7 +1567,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def remove_from_collaborators(self, collaborator): """ - :calls: `DELETE /repos/:user/:repo/collaborators/:user `_ + :calls: `DELETE /repos/:owner/:repo/collaborators/:user `_ :param collaborator: :class:`github.NamedUser.NamedUser` :rtype: None """ diff --git a/github/RepositoryKey.py b/github/RepositoryKey.py index 79953506..00da76b8 100644 --- a/github/RepositoryKey.py +++ b/github/RepositoryKey.py @@ -83,7 +83,7 @@ class RepositoryKey(github.GithubObject.CompletableGithubObject): def delete(self): """ - :calls: `DELETE /repos/:user/:repo/keys/:id `_ + :calls: `DELETE /repos/:owner/:repo/keys/:id `_ :rtype: None """ headers, data = self._requester.requestJsonAndCheck( @@ -95,7 +95,7 @@ class RepositoryKey(github.GithubObject.CompletableGithubObject): def edit(self, title=github.GithubObject.NotSet, key=github.GithubObject.NotSet): """ - :calls: `PATCH /repos/:user/:repo/keys/:id `_ + :calls: `PATCH /repos/:owner/:repo/keys/:id `_ :param title: string :param key: string :rtype: None diff --git a/github/Team.py b/github/Team.py index 0081aedd..4c570426 100644 --- a/github/Team.py +++ b/github/Team.py @@ -100,7 +100,7 @@ class Team(github.GithubObject.CompletableGithubObject): def add_to_repos(self, repo): """ - :calls: `PUT /teams/:id/repos/:user/:repo `_ + :calls: `PUT /teams/:id/repos/:org/:repo `_ :param repo: :class:`github.Repository.Repository` :rtype: None """ @@ -187,7 +187,7 @@ class Team(github.GithubObject.CompletableGithubObject): def has_in_repos(self, repo): """ - :calls: `GET /teams/:id/repos/:user/:repo `_ + :calls: `GET /teams/:id/repos/:owner/:repo `_ :param repo: :class:`github.Repository.Repository` :rtype: bool """ @@ -216,7 +216,7 @@ class Team(github.GithubObject.CompletableGithubObject): def remove_from_repos(self, repo): """ - :calls: `DELETE /teams/:id/repos/:user/:repo `_ + :calls: `DELETE /teams/:id/repos/:owner/:repo `_ :param repo: :class:`github.Repository.Repository` :rtype: None """ diff --git a/scripts/compare_to_api_ref_doc.py b/scripts/compare_to_api_ref_doc.py index 1e563445..0c2166e8 100755 --- a/scripts/compare_to_api_ref_doc.py +++ b/scripts/compare_to_api_ref_doc.py @@ -85,8 +85,8 @@ def parseApiList(): assert newUrl > url, url url = newUrl elif line.startswith(" * "): - verb, method = line[4:].split(": ") - if method.startswith(":meth:"): + verb = line[4:].split(":")[0] + if "Not implemented" not in line: urls.add(url + " " + verb) return urls From 16cb2873e840e0a024219692b32abe21455092fa Mon Sep 17 00:00:00 2001 From: Vincent Jacques Date: Tue, 16 Jul 2013 22:19:22 +0200 Subject: [PATCH 5/8] Generate doc/apis.rst instead of checking it --- doc/.gitignore | 5 +- doc/apis.rst | 644 ------------------------------ doc/conf.py | 94 ++++- scripts/compare_to_api_ref_doc.py | 21 - 4 files changed, 82 insertions(+), 682 deletions(-) delete mode 100644 doc/apis.rst diff --git a/doc/.gitignore b/doc/.gitignore index 44fee292..3efe120e 100644 --- a/doc/.gitignore +++ b/doc/.gitignore @@ -21,5 +21,6 @@ ################################################################################ /build/ -github_objects.rst -contributing.rst +/github_objects.rst +/contributing.rst +/apis.rst diff --git a/doc/apis.rst b/doc/apis.rst deleted file mode 100644 index c5e71bb1..00000000 --- a/doc/apis.rst +++ /dev/null @@ -1,644 +0,0 @@ -APIs -==== - -* ``/authorizations`` - - * GET: :meth:`github.AuthenticatedUser.AuthenticatedUser.get_authorizations` - * POST: :meth:`github.AuthenticatedUser.AuthenticatedUser.create_authorization` - -* ``/authorizations/:id`` - - * GET: :meth:`github.AuthenticatedUser.AuthenticatedUser.get_authorization` - * PATCH: :meth:`github.Authorization.Authorization.edit` - * DELETE: :meth:`github.Authorization.Authorization.delete` - -* ``/events`` - - * GET: :meth:`github.AuthenticatedUser.AuthenticatedUser.get_events` - -* ``/gists`` - - * GET: :meth:`github.AuthenticatedUser.AuthenticatedUser.get_gists` - * POST: :meth:`github.AuthenticatedUser.AuthenticatedUser.create_gist` - -* ``/gists/:gist_id/comments`` - - * GET: :meth:`github.Gist.Gist.get_comments` - * POST: :meth:`github.Gist.Gist.create_comment` - -* ``/gists/:gist_id/comments/:id`` - - * GET: :meth:`github.Gist.Gist.get_comment` - * PATCH: :meth:`github.GistComment.GistComment.edit` - * DELETE: :meth:`github.GistComment.GistComment.delete` - -* ``/gists/:id`` - - * GET: :meth:`github.MainClass.Github.get_gist` - * PATCH: :meth:`github.Gist.Gist.edit` - * DELETE: :meth:`github.Gist.Gist.delete` - -* ``/gists/:id/fork`` - - * POST: :meth:`github.Gist.Gist.create_fork` - -* ``/gists/:id/star`` - - * GET: :meth:`github.Gist.Gist.is_starred` - * PUT: :meth:`github.Gist.Gist.set_starred` - * DELETE: :meth:`github.Gist.Gist.reset_starred` - -* ``/gists/public`` - - * GET: :meth:`github.MainClass.Github.get_gists` - -* ``/gists/starred`` - - * GET: :meth:`github.AuthenticatedUser.AuthenticatedUser.get_starred_gists` - -* ``/gitignore/templates`` - - * GET: :meth:`github.MainClass.Github.get_gitignore_templates` - -* ``/gitignore/templates/:name`` - - * GET: :meth:`github.MainClass.Github.get_gitignore_template` - -* ``/hooks`` - - * GET: :meth:`github.MainClass.Github.get_hooks` - -* ``/hub`` - - * POST: :meth:`github.Repository.Repository.subscribe_to_hub` or :meth:`github.Repository.Repository.unsubscribe_to_hub` - -* ``/issues`` - - * GET: :meth:`github.AuthenticatedUser.AuthenticatedUser.get_issues` - -* ``/legacy/issues/search/:owner/:repository/:state/:keyword`` - - * GET: :meth:`github.Repository.Repository.legacy_search_issues` - -* ``/legacy/repos/search/:keyword`` - - * GET: :meth:`github.MainClass.Github.legacy_search_repos` - -* ``/legacy/user/email/:email`` - - * GET: :meth:`github.MainClass.Github.legacy_search_user_by_email` - -* ``/legacy/user/search/:keyword`` - - * GET: :meth:`github.MainClass.Github.legacy_search_users` - -* ``/markdown`` - - * POST: :meth:`github.MainClass.Github.render_markdown` - -* ``/markdown/raw`` - - * POST: Not implemented, see ``/markdown`` - -* ``/networks/:owner/:repo/events`` - - * GET: :meth:`github.Repository.Repository.get_network_events` - -* ``/notifications`` - - * GET: :meth:`github.AuthenticatedUser.AuthenticatedUser.get_notifications` - -* ``/notifications/threads/:id`` - - * GET: :meth:`github.AuthenticatedUser.AuthenticatedUser.get_notification` - -* ``/orgs/:org`` - - * GET: :meth:`github.MainClass.Github.get_organization` - * PATCH: :meth:`github.Organization.Organization.edit` - -* ``/orgs/:org/events`` - - * GET: :meth:`github.Organization.Organization.get_events` - -* ``/orgs/:org/issues`` - - * GET: :meth:`github.Organization.Organization.get_issues` - -* ``/orgs/:org/members`` - - * GET: :meth:`github.Organization.Organization.get_members` - -* ``/orgs/:org/members/:user`` - - * GET: :meth:`github.Organization.Organization.has_in_members` - * DELETE: :meth:`github.Organization.Organization.remove_from_members` - -* ``/orgs/:org/public_members`` - - * GET: :meth:`github.Organization.Organization.get_public_members` - -* ``/orgs/:org/public_members/:user`` - - * GET: :meth:`github.Organization.Organization.has_in_public_members` - * PUT: :meth:`github.Organization.Organization.add_to_public_members` - * DELETE: :meth:`github.Organization.Organization.remove_from_public_members` - -* ``/orgs/:org/repos`` - - * GET: :meth:`github.Organization.Organization.get_repos` - * POST: :meth:`github.Organization.Organization.create_repo` - -* ``/orgs/:org/teams`` - - * GET: :meth:`github.Organization.Organization.get_teams` - * POST: :meth:`github.Organization.Organization.create_team` - -* ``/rate_limit`` - - * GET: Not implemented, see `Github.rate_limiting` - -* ``/repos/:owner/:repo`` - - * GET: :meth:`github.AuthenticatedUser.AuthenticatedUser.get_repo` or :meth:`github.NamedUser.NamedUser.get_repo` or :meth:`github.Organization.Organization.get_repo` or :meth:`github.MainClass.Github.get_repo` - * PATCH: :meth:`github.Repository.Repository.edit` - * DELETE: :meth:`github.Repository.Repository.delete` - -* ``/repos/:owner/:repo/:archive_format/:ref`` - - * GET: :meth:`github.Repository.Repository.get_archive_link` - -* ``/repos/:owner/:repo/assignees`` - - * GET: :meth:`github.Repository.Repository.get_assignees` - -* ``/repos/:owner/:repo/assignees/:assignee`` - - * GET: :meth:`github.Repository.Repository.has_in_assignees` - -* ``/repos/:owner/:repo/branches`` - - * GET: :meth:`github.Repository.Repository.get_branches` - -* ``/repos/:owner/:repo/branches/:branch`` - - * GET: :meth:`github.Repository.Repository.get_branch` - -* ``/repos/:owner/:repo/collaborators`` - - * GET: :meth:`github.Repository.Repository.get_collaborators` - -* ``/repos/:owner/:repo/collaborators/:user`` - - * GET: :meth:`github.Repository.Repository.has_in_collaborators` - * PUT: :meth:`github.Repository.Repository.add_to_collaborators` - * DELETE: :meth:`github.Repository.Repository.remove_from_collaborators` - -* ``/repos/:owner/:repo/comments`` - - * GET: :meth:`github.Repository.Repository.get_comments` - -* ``/repos/:owner/:repo/comments/:id`` - - * GET: :meth:`github.Repository.Repository.get_comment` - * PATCH: :meth:`github.CommitComment.CommitComment.edit` - * DELETE: :meth:`github.CommitComment.CommitComment.delete` - -* ``/repos/:owner/:repo/commits`` - - * GET: :meth:`github.Repository.Repository.get_commits` - -* ``/repos/:owner/:repo/commits/:sha`` - - * GET: :meth:`github.Repository.Repository.get_commit` - -* ``/repos/:owner/:repo/commits/:sha/comments`` - - * GET: :meth:`github.Commit.Commit.get_comments` - * POST: :meth:`github.Commit.Commit.create_comment` - -* ``/repos/:owner/:repo/compare/:base...:head`` - - * GET: :meth:`github.Repository.Repository.compare` - -* ``/repos/:owner/:repo/contents/:path`` - - * GET: :meth:`github.Repository.Repository.get_contents` or :meth:`github.Repository.Repository.get_file_contents` or :meth:`github.Repository.Repository.get_dir_contents` - -* ``/repos/:owner/:repo/contributors`` - - * GET: :meth:`github.Repository.Repository.get_contributors` - -* ``/repos/:owner/:repo/downloads`` - - * GET: :meth:`github.Repository.Repository.get_downloads` - * POST: :meth:`github.Repository.Repository.create_download` - -* ``/repos/:owner/:repo/downloads/:id`` - - * GET: :meth:`github.Repository.Repository.get_download` - * DELETE: :meth:`github.Download.Download.delete` - -* ``/repos/:owner/:repo/events`` - - * GET: :meth:`github.Repository.Repository.get_events` - -* ``/repos/:owner/:repo/forks`` - - * GET: :meth:`github.Repository.Repository.get_forks` - * POST: :meth:`github.AuthenticatedUser.AuthenticatedUser.create_fork` or `Organization.create_fork` - -* ``/repos/:owner/:repo/git/blobs`` - - * POST: :meth:`github.Repository.Repository.create_git_blob` - -* ``/repos/:owner/:repo/git/blobs/:sha`` - - * GET: :meth:`github.Repository.Repository.get_git_blob` - -* ``/repos/:owner/:repo/git/commits`` - - * POST: :meth:`github.Repository.Repository.create_git_commit` - -* ``/repos/:owner/:repo/git/commits/:sha`` - - * GET: :meth:`github.Repository.Repository.get_git_commit` - -* ``/repos/:owner/:repo/git/refs`` - - * GET: :meth:`github.Repository.Repository.get_git_refs` - * POST: :meth:`github.Repository.Repository.create_git_ref` - -* ``/repos/:owner/:repo/git/refs/:ref`` - - * GET: :meth:`github.Repository.Repository.get_git_ref` - * PATCH: :meth:`github.GitRef.GitRef.edit` - * DELETE: :meth:`github.GitRef.GitRef.delete` - -* ``/repos/:owner/:repo/git/tags`` - - * POST: :meth:`github.Repository.Repository.create_git_tag` - -* ``/repos/:owner/:repo/git/tags/:sha`` - - * GET: :meth:`github.Repository.Repository.get_git_tag` - -* ``/repos/:owner/:repo/git/trees`` - - * POST: :meth:`github.Repository.Repository.create_git_tree` - -* ``/repos/:owner/:repo/git/trees/:sha`` - - * GET: :meth:`github.Repository.Repository.get_git_tree` - -* ``/repos/:owner/:repo/hooks`` - - * GET: :meth:`github.Repository.Repository.get_hooks` - * POST: :meth:`github.Repository.Repository.create_hook` - -* ``/repos/:owner/:repo/hooks/:id`` - - * GET: :meth:`github.Repository.Repository.get_hook` - * PATCH: :meth:`github.Hook.Hook.edit` - * DELETE: :meth:`github.Hook.Hook.delete` - -* ``/repos/:owner/:repo/hooks/:id/test`` - - * POST: :meth:`github.Hook.Hook.test` - -* ``/repos/:owner/:repo/issues`` - - * GET: :meth:`github.Repository.Repository.get_issues` - * POST: :meth:`github.Repository.Repository.create_issue` - -* ``/repos/:owner/:repo/issues/:issue_number/events`` - - * GET: :meth:`github.Issue.Issue.get_events` - -* ``/repos/:owner/:repo/issues/:number`` - - * GET: :meth:`github.Repository.Repository.get_issue` - * PATCH: :meth:`github.Issue.Issue.edit` - -* ``/repos/:owner/:repo/issues/:number/comments`` - - * GET: :meth:`github.Issue.Issue.get_comments` or :meth:`gituhub.PullRequest.PullRequest.get_issue_comments` - * POST: :meth:`github.Issue.Issue.create_comment` or :meth:`gituhub.PullRequest.PullRequest.create_issue_comment` - -* ``/repos/:owner/:repo/issues/:number/labels`` - - * GET: :meth:`github.Issue.Issue.get_labels` - * POST: :meth:`github.Issue.Issue.add_to_labels` - * PUT: :meth:`github.Issue.Issue.set_labels` - * DELETE: :meth:`github.Issue.Issue.delete_labels` - -* ``/repos/:owner/:repo/issues/:number/labels/:name`` - - * DELETE: :meth:`github.Issue.Issue.remove_from_labels` - -* ``/repos/:owner/:repo/issues/comments`` - - * GET: :meth:`github.Repository.Repository.get_issues_comments` - -* ``/repos/:owner/:repo/issues/comments/:id`` - - * GET: :meth:`github.Issue.Issue.get_comment` or :meth:`gituhub.PullRequest.PullRequest.get_issue_comment` - * PATCH: :meth:`github.IssueComment.IssueComment.edit` - * DELETE: :meth:`github.IssueComment.IssueComment.delete` - -* ``/repos/:owner/:repo/issues/events`` - - * GET: :meth:`github.Repository.Repository.get_issues_events` - -* ``/repos/:owner/:repo/issues/events/:id`` - - * GET: :meth:`github.Repository.Repository.get_issues_event` - -* ``/repos/:owner/:repo/keys`` - - * GET: :meth:`github.Repository.Repository.get_keys` - * POST: :meth:`github.Repository.Repository.create_key` - -* ``/repos/:owner/:repo/keys/:id`` - - * GET: :meth:`github.Repository.Repository.get_key` - * PATCH: :meth:`github.RepositoryKey.RepositoryKey.edit` - * DELETE: :meth:`github.RepositoryKey.RepositoryKey.delete` - -* ``/repos/:owner/:repo/labels`` - - * GET: :meth:`github.Repository.Repository.get_labels` - * POST: :meth:`github.Repository.Repository.create_label` - -* ``/repos/:owner/:repo/labels/:name`` - - * GET: :meth:`github.Repository.Repository.get_label` - * PATCH: :meth:`github.Label.Label.edit` - * DELETE: :meth:`github.Label.Label.delete` - -* ``/repos/:owner/:repo/languages`` - - * GET: :meth:`github.Repository.Repository.get_languages` - -* ``/repos/:owner/:repo/merges`` - - * POST: :meth:`github.Repository.Repository.merge` - -* ``/repos/:owner/:repo/milestones`` - - * GET: :meth:`github.Repository.Repository.get_milestones` - * POST: :meth:`github.Repository.Repository.create_milestone` - -* ``/repos/:owner/:repo/milestones/:number`` - - * GET: :meth:`github.Repository.Repository.get_milestone` - * PATCH: :meth:`github.Milestone.Milestone.edit` - * DELETE: :meth:`github.Milestone.Milestone.delete` - -* ``/repos/:owner/:repo/milestones/:number/labels`` - - * GET: :meth:`github.Milestone.Milestone.get_labels` - -* ``/repos/:owner/:repo/pulls`` - - * GET: :meth:`github.Repository.Repository.get_pulls` - * POST: :meth:`github.Repository.Repository.create_pull` - -* ``/repos/:owner/:repo/pulls/:number`` - - * GET: :meth:`github.Repository.Repository.get_pull` - * PATCH: :meth:`github.PullRequest.PullRequest.edit` - -* ``/repos/:owner/:repo/pulls/:number/comments`` - - * GET: :meth:`github.PullRequest.PullRequest.get_comments` or :meth:`github.PullRequest.PullRequest.get_review_comments` - * POST: :meth:`github.PullRequest.PullRequest.create_comment` or :meth:`github.PullRequest.PullRequest.create_review_comment` - -* ``/repos/:owner/:repo/pulls/:number/commits`` - - * GET: :meth:`github.PullRequest.PullRequest.get_commits` - -* ``/repos/:owner/:repo/pulls/:number/files`` - - * GET: :meth:`github.PullRequest.PullRequest.get_files` - -* ``/repos/:owner/:repo/pulls/:number/merge`` - - * GET: :meth:`github.PullRequest.PullRequest.is_merged` - * PUT: :meth:`github.PullRequest.PullRequest.merge` - -* ``/repos/:owner/:repo/pulls/comments`` - - * GET: :meth:`github.Repository.Repository.get_pulls_comments` or :meth:`github.Repository.Repository.get_pulls_review_comments` - -* ``/repos/:owner/:repo/pulls/comments/:number`` - - * GET: :meth:`github.PullRequest.PullRequest.get_comment` or :meth:`github.PullRequest.PullRequest.get_review_comment` - * PATCH: :meth:`github.PullRequestComment.PullRequestComment.edit` - * DELETE: :meth:`github.PullRequestComment.PullRequestComment.delete` - -* ``/repos/:owner/:repo/readme`` - - * GET: :meth:`github.Repository.Repository.get_readme` - -* ``/repos/:owner/:repo/stargazers`` - - * GET: :meth:`github.Repository.Repository.get_stargazers` - -* ``/repos/:owner/:repo/statuses/:ref`` - - * GET: :meth:`github.Commit.Commit.get_statuses` - -* ``/repos/:owner/:repo/statuses/:sha`` - - * POST: :meth:`github.Commit.Commit.create_status` - -* ``/repos/:owner/:repo/subscribers`` - - * GET: :meth:`github.Repository.Repository.get_subscribers` - -* ``/repos/:owner/:repo/tags`` - - * GET: :meth:`github.Repository.Repository.get_tags` - -* ``/repos/:owner/:repo/teams`` - - * GET: :meth:`github.Repository.Repository.get_teams` - -* ``/repos/:owner/:repo/watchers`` - - * GET: :meth:`github.Repository.Repository.get_watchers` - -* ``/teams/:id`` - - * GET: :meth:`github.Organization.Organization.get_team` - * PATCH: :meth:`github.Team.Team.edit` - * DELETE: :meth:`github.Team.Team.delete` - -* ``/teams/:id/members`` - - * GET: :meth:`github.Team.Team.get_members` - -* ``/teams/:id/members/:user`` - - * GET: :meth:`github.Team.Team.has_in_members` - * PUT: :meth:`github.Team.Team.add_to_members` - * DELETE: :meth:`github.Team.Team.remove_from_members` - -* ``/teams/:id/repos`` - - * GET: :meth:`github.Team.Team.get_repos` - -* ``/teams/:id/repos/:org/:repo`` - - * PUT: :meth:`github.Team.Team.add_to_repos` - -* ``/teams/:id/repos/:owner/:repo`` - - * GET: :meth:`github.Team.Team.has_in_repos` - * DELETE: :meth:`github.Team.Team.remove_from_repos` - -* ``/user`` - - * GET: :meth:`github.MainClass.Github.get_user` - * PATCH: :meth:`github.AuthenticatedUser.AuthenticatedUser.edit` - -* ``/user/emails`` - - * GET: :meth:`github.AuthenticatedUser.AuthenticatedUser.get_emails` - * POST: :meth:`github.AuthenticatedUser.AuthenticatedUser.add_to_emails` - * DELETE: :meth:`github.AuthenticatedUser.AuthenticatedUser.remove_from_emails` - -* ``/user/followers`` - - * GET: :meth:`github.AuthenticatedUser.AuthenticatedUser.get_followers` - -* ``/user/following`` - - * GET: :meth:`github.AuthenticatedUser.AuthenticatedUser.get_following` - -* ``/user/following/:user`` - - * GET: :meth:`github.AuthenticatedUser.AuthenticatedUser.has_in_following` - * PUT: :meth:`github.AuthenticatedUser.AuthenticatedUser.add_to_following` - * DELETE: :meth:`github.AuthenticatedUser.AuthenticatedUser.remove_from_following` - -* ``/user/issues`` - - * GET: :meth:`github.AuthenticatedUser.AuthenticatedUser.get_user_issues` - -* ``/user/keys`` - - * GET: :meth:`github.AuthenticatedUser.AuthenticatedUser.get_keys` - * POST: :meth:`github.AuthenticatedUser.AuthenticatedUser.create_key` - -* ``/user/keys/:id`` - - * GET: :meth:`github.AuthenticatedUser.AuthenticatedUser.get_key` - * PATCH: :meth:`github.UserKey.UserKey.edit` - * DELETE: :meth:`github.UserKey.UserKey.delete` - -* ``/user/orgs`` - - * GET: :meth:`github.AuthenticatedUser.AuthenticatedUser.get_orgs` - -* ``/user/repos`` - - * GET: :meth:`github.AuthenticatedUser.AuthenticatedUser.get_repos` - * POST: :meth:`github.AuthenticatedUser.AuthenticatedUser.create_repo` - -* ``/user/starred`` - - * GET: :meth:`github.AuthenticatedUser.AuthenticatedUser.get_starred` - -* ``/user/starred/:owner/:repo`` - - * GET: :meth:`github.AuthenticatedUser.AuthenticatedUser.has_in_starred` - * PUT: :meth:`github.AuthenticatedUser.AuthenticatedUser.add_to_starred` - * DELETE: :meth:`github.AuthenticatedUser.AuthenticatedUser.remove_from_starred` - -* ``/user/subscriptions`` - - * GET: :meth:`github.AuthenticatedUser.AuthenticatedUser.get_subscriptions` - -* ``/user/subscriptions/:owner/:repo`` - - * GET: :meth:`github.AuthenticatedUser.AuthenticatedUser.has_in_subscriptions` - * PUT: :meth:`github.AuthenticatedUser.AuthenticatedUser.add_to_subscriptions` - * DELETE: :meth:`github.AuthenticatedUser.AuthenticatedUser.remove_from_subscriptions` - -* ``/user/watched`` - - * GET: :meth:`github.AuthenticatedUser.AuthenticatedUser.get_watched` - -* ``/user/watched/:owner/:repo`` - - * GET: :meth:`github.AuthenticatedUser.AuthenticatedUser.has_in_watched` - * PUT: :meth:`github.AuthenticatedUser.AuthenticatedUser.add_to_watched` - * DELETE: :meth:`github.AuthenticatedUser.AuthenticatedUser.remove_from_watched` - -* ``/users`` - - * GET: :meth:`github.MainClass.Github.get_users` - -* ``/users/:user`` - - * GET: :meth:`github.MainClass.Github.get_user` - -* ``/users/:user/events`` - - * GET: :meth:`github.NamedUser.NamedUser.get_events` - -* ``/users/:user/events/orgs/:org`` - - * GET: :meth:`github.AuthenticatedUser.AuthenticatedUser.get_organization_events` - -* ``/users/:user/events/public`` - - * GET: :meth:`github.NamedUser.NamedUser.get_public_events` - -* ``/users/:user/followers`` - - * GET: :meth:`github.NamedUser.NamedUser.get_followers` - -* ``/users/:user/following`` - - * GET: :meth:`github.NamedUser.NamedUser.get_following` - -* ``/users/:user/gists`` - - * GET: :meth:`github.NamedUser.NamedUser.get_gists` - * POST: :meth:`github.NamedUser.NamedUser.create_gist` - -* ``/users/:user/keys`` - - * GET: :meth:`github.NamedUser.NamedUser.get_keys` - -* ``/users/:user/orgs`` - - * GET: :meth:`github.NamedUser.NamedUser.get_orgs` - -* ``/users/:user/received_events`` - - * GET: :meth:`github.NamedUser.NamedUser.get_received_events` - -* ``/users/:user/received_events/public`` - - * GET: :meth:`github.NamedUser.NamedUser.get_public_received_events` - -* ``/users/:user/repos`` - - * GET: :meth:`github.NamedUser.NamedUser.get_repos` - -* ``/users/:user/starred`` - - * GET: :meth:`github.NamedUser.NamedUser.get_starred` - -* ``/users/:user/subscriptions`` - - * GET: :meth:`github.NamedUser.NamedUser.get_subscriptions` - -* ``/users/:user/watched`` - - * GET: :meth:`github.NamedUser.NamedUser.get_watched` - diff --git a/doc/conf.py b/doc/conf.py index fd5d71ee..63f326af 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -33,7 +33,7 @@ # All configuration values have a default; values that are commented out # serve to show the default. -import sys, os, shutil +import sys, os, shutil, glob # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the @@ -268,20 +268,84 @@ autodoc_default_flags = [ "members" ] autodoc_member_order = "bysource" autoclass_content = "both" -with open("github_objects.rst", "w") as github_objects: - github_objects.write("Github objects\n") - github_objects.write("==============\n") - github_objects.write("\n") - github_objects.write(".. autoclass:: github.GithubObject.GithubObject()\n") - github_objects.write("\n") - github_objects.write(".. toctree::\n") +githubClasses = [ + fileName[10:-3] + for fileName in glob.glob("../github/*.py") + if fileName not in [ + "../github/GithubException.py", + "../github/GithubObject.py", + "../github/InputFileContent.py", + "../github/InputGitAuthor.py", + "../github/InputGitTreeElement.py", + "../github/Legacy.py", + "../github/MainClass.py", + "../github/PaginatedList.py", + "../github/Requester.py", + "../github/__init__.py"] +] - for obj in ["AuthenticatedUser", "Authorization", "AuthorizationApplication", "Branch", "Commit", "CommitComment", "CommitStats", "CommitStatus", "Comparison", "ContentFile", "Download", "Event", "File", "Gist", "GistComment", "GistFile", "GistHistoryState", "GitAuthor", "GitBlob", "GitCommit", "GitObject", "GitignoreTemplate", "GitRef", "GitTag", "GitTree", "GitTreeElement", "Hook", "HookDescription", "HookResponse", "Issue", "IssueComment", "IssueEvent", "IssuePullRequest", "Label", "Milestone", "NamedUser", "Notification", "NotificationSubject", "Organization", "Permissions", "Plan", "PullRequest", "PullRequestComment", "PullRequestMergeStatus", "PullRequestPart", "Repository", "RepositoryKey", "Tag", "Team", "UserKey"]: - github_objects.write(" github_objects/" + obj + "\n") - with open("github_objects/" + obj + ".rst", "w") as github_object: - github_object.write(obj + "\n") - github_object.write("=" * len(obj) + "\n") - github_object.write("\n") - github_object.write(".. autoclass:: github." + obj + "." + obj + "()\n") +with open("github_objects.rst", "w") as f: + f.write("Github objects\n") + f.write("==============\n") + f.write("\n") + f.write(".. autoclass:: github.GithubObject.GithubObject()\n") + f.write("\n") + f.write(".. toctree::\n") + for githubClass in githubClasses: + f.write(" github_objects/" + githubClass + "\n") + +for githubClass in githubClasses: + with open("github_objects/" + githubClass + ".rst", "w") as f: + f.write(githubClass + "\n") + f.write("=" * len(githubClass) + "\n") + f.write("\n") + f.write(".. autoclass:: github." + githubClass + "." + githubClass + "()\n") + +methods = dict() +for githubClass in githubClasses + ["MainClass"]: + with open("../github/" + githubClass + ".py") as f: + if githubClass == "MainClass": + githubClass = "github.MainClass.Github" + else: + githubClass = "github." + githubClass + "." + githubClass + method = None + isProperty = False + for line in f: + line = line.rstrip() + if line == " @property": + isProperty = True + if line.startswith(" def "): + if not isProperty: + assert method is None, method + " has no :calls: section" + method = line.split("(")[0][8:] + if method in ["_initAttributes", "_useAttributes", "__init__", "__create_pull_1", "__create_pull_2", "__create_pull", "_hub", "__get_FIX_REPO_GET_GIT_REF", "__set_FIX_REPO_GET_GIT_REF", "__get_per_page", "__set_per_page"]: + method = None + isProperty = False + if line.startswith(" :calls: `"): + for callee in line[16:].split(" or "): + verb, url = callee[1:].split(" ")[0:2] + if url not in methods: + methods[url] = dict() + if verb not in methods[url]: + methods[url][verb] = set() + methods[url][verb].add(":meth:`" + githubClass + "." + method + "`") + method = None + +methods["/markdown/raw"] = dict() +methods["/markdown/raw"]["POST"] = ["Not implemented, see ``/markdown``"] +methods["/rate_limit"] = dict() +methods["/rate_limit"]["GET"] = ["Not implemented, see `Github.rate_limiting`"] + +with open("apis.rst", "w") as apis: + apis.write("APIs\n") + apis.write("====\n") + apis.write("\n") + for url, verbs in sorted(methods.iteritems()): + apis.write("* ``" + url + "``\n") + apis.write("\n") + for verb in ["GET", "PATCH", "POST", "PUT", "DELETE"]: + if verb in verbs: + apis.write(" * " + verb + ": " + " or ".join(sorted(verbs[verb])) + "\n") + apis.write("\n") shutil.copyfile("../Contributing.rst", "contributing.rst") diff --git a/scripts/compare_to_api_ref_doc.py b/scripts/compare_to_api_ref_doc.py index 0c2166e8..577066ab 100755 --- a/scripts/compare_to_api_ref_doc.py +++ b/scripts/compare_to_api_ref_doc.py @@ -73,25 +73,6 @@ def parseLibrary(): return urls -def parseApiList(): - urls = set() - - with open("doc/apis.rst") as f: - url = None - for line in f: - if line.startswith("*"): - newUrl = line[4:-3] - if url is not None: - assert newUrl > url, url - url = newUrl - elif line.startswith(" * "): - verb = line[4:].split(":")[0] - if "Not implemented" not in line: - urls.add(url + " " + verb) - - return urls - - def printUrls(title, urls): if len(urls) > 0: print len(urls), "URLs", title + ":" @@ -102,10 +83,8 @@ def printUrls(title, urls): def main(): ref = parseReference() lib = parseLibrary() - doc = parseApiList() printUrls("in Github API v3, but not implemented in PyGithub", ref - lib) printUrls("called by PyGithub but not existing in Github API v3", lib - ref) - printUrls("badly linked from doc/api.rst", doc ^ lib) if __name__ == "__main__": From 600f50834341ae7dc20d3aec7493e12b785f2abe Mon Sep 17 00:00:00 2001 From: Vincent Jacques Date: Tue, 16 Jul 2013 23:45:57 +0200 Subject: [PATCH 6/8] Check links to ref in :calls: sections --- scripts/compare_to_api_ref_doc.py | 54 ++++++++++++++++++------------- 1 file changed, 31 insertions(+), 23 deletions(-) diff --git a/scripts/compare_to_api_ref_doc.py b/scripts/compare_to_api_ref_doc.py index 577066ab..a3eb3fa4 100755 --- a/scripts/compare_to_api_ref_doc.py +++ b/scripts/compare_to_api_ref_doc.py @@ -12,31 +12,33 @@ import glob def parseReference(): badlyNamedUrls = { - "/gitignore/templates/C GET": "/gitignore/templates/:name GET", - "/notifications/threads/1/subscription DELETE": "/notifications/threads/:id/subscription DELETE", - "/notifications/threads/1/subscription GET": "/notifications/threads/:id/subscription GET", - "/notifications/threads/1/subscription PUT": "/notifications/threads/:id/subscription PUT", + ("/gitignore/templates/C", "GET"): ("/gitignore/templates/:name", "GET"), + ("/notifications/threads/1/subscription", "DELETE"): ("/notifications/threads/:id/subscription", "DELETE"), + ("/notifications/threads/1/subscription", "GET"): ("/notifications/threads/:id/subscription", "GET"), + ("/notifications/threads/1/subscription", "PUT"): ("/notifications/threads/:id/subscription", "PUT"), } undocumentedUrls = [ - "/hooks GET", # Mentioned somewhere - "/hub POST", # Described in content/v3/repos/hooks.md + ("/hooks", "GET"), # Mentioned somewhere + ("/hub", "POST"), # Described in content/v3/repos/hooks.md ] uninterestingUrls = [ - "/markdown/raw POST", # Job is done by /markdown => useless in PyGithub - "/repos/octocat/Hello-World/git/refs/heads/feature-a DELETE", # Example of DELETE /repos/:owner/:repo/git/refs/:ref - "/repos/octocat/Hello-World/git/refs/tags/v1.0 DELETE", # Example of DELETE /repos/:owner/:repo/git/refs/:ref - "/repos/:owner/:repo/git/trees/:sha?recursive=1 GET", # Example of GET /repos/:owner/:repo/git/trees/:sha - "/repos/:owner/:repo/git/refs/heads/skunkworkz/featureA GET", # Example of GET /repos/:owner/:repo/git/refs - "/repos/:owner/:repo/git/refs/tags GET", # Example of GET /repos/:owner/:repo/git/refs + ("/markdown/raw", "POST"), # Job is done by /markdown => useless in PyGithub + ("/repos/octocat/Hello-World/git/refs/heads/feature-a", "DELETE"), # Example of DELETE /repos/:owner/:repo/git/refs/:ref + ("/repos/octocat/Hello-World/git/refs/tags/v1.0", "DELETE"), # Example of DELETE /repos/:owner/:repo/git/refs/:ref + ("/repos/:owner/:repo/git/trees/:sha?recursive=1", "GET"), # Example of GET /repos/:owner/:repo/git/trees/:sha + ("/repos/:owner/:repo/git/refs/heads/skunkworkz/featureA", "GET"), # Example of GET /repos/:owner/:repo/git/refs + ("/repos/:owner/:repo/git/refs/tags", "GET"), # Example of GET /repos/:owner/:repo/git/refs ] - urls = set() + urls = dict() for root, _, filenames in os.walk('developer.github.com'): for filename in fnmatch.filter(filenames, '*.md'): filename = os.path.join(root, filename) with open(filename) as f: for line in f: + if line.startswith("#"): + section = ("-".join(line.rstrip().split(" ")[1:])) ### @todo anchor-ify (lowercase, only a-z, etc.) if line.startswith(" "): line = line[4:] if line.startswith("\t"): @@ -44,22 +46,23 @@ def parseReference(): for v in ["GET", "PATCH", "DELETE", "POST", "PUT"]: if line.startswith(v + " /"): verb, url = line.strip().split(" ") - url = url + " " + verb + url = (url, verb) if url in badlyNamedUrls: url = badlyNamedUrls[url] - urls.add(url) + docUrl = "http://developer.github.com/" + filename[29:-3] ### @todo + "#" + section + urls[url] = docUrl for url in undocumentedUrls: - urls.add(url) + urls[url] = "http://developer.github.com/" for url in uninterestingUrls: - urls.remove(url) + del urls[url] return urls def parseLibrary(): - urls = set() + urls = dict() for filename in glob.glob("github/*.py"): with open(filename) as f: @@ -67,8 +70,9 @@ def parseLibrary(): if line.startswith(" :calls:"): line = line[17:-3] for part in line.split("`_ or `"): - verb, url, _ = part.split(" ") - urls.add(url + " " + verb) + verb, apiUrl, docUrl = part.split(" ") + docUrl = docUrl[1:-1] + urls[(apiUrl, verb)] = docUrl return urls @@ -76,15 +80,19 @@ def parseLibrary(): def printUrls(title, urls): if len(urls) > 0: print len(urls), "URLs", title + ":" - print " ", "\n ".join(sorted(urls)) + print " ", "\n ".join(url + " (" + verb + ")" for url, verb in sorted(urls)) print def main(): ref = parseReference() lib = parseLibrary() - printUrls("in Github API v3, but not implemented in PyGithub", ref - lib) - printUrls("called by PyGithub but not existing in Github API v3", lib - ref) + printUrls("in Github API v3, but not implemented in PyGithub", set(ref) - set(lib)) + printUrls("called by PyGithub but not existing in Github API v3", set(lib) - set(ref)) + for key in set(lib) & set(ref): + (url, verb) = key + if lib[key] != ref[key]: + print "sed -i \"s@:calls: ." + verb + " " + url + " ." + lib[key] + ".._" + "@:calls: \\`" + verb + " " + url + " \\<" + ref[key] + "\\>\\`_@\" github/*.py" if __name__ == "__main__": From 7c49e483055e83730ecc0ffe1b4b6624b9552517 Mon Sep 17 00:00:00 2001 From: Vincent Jacques Date: Tue, 16 Jul 2013 23:46:23 +0200 Subject: [PATCH 7/8] Fix links to ref in :calls: sections --- github/AuthenticatedUser.py | 82 ++++++++++---------- github/Authorization.py | 4 +- github/Commit.py | 8 +- github/CommitComment.py | 4 +- github/Download.py | 2 +- github/Gist.py | 16 ++-- github/GistComment.py | 4 +- github/GitRef.py | 4 +- github/Hook.py | 4 +- github/Issue.py | 20 ++--- github/IssueComment.py | 4 +- github/Label.py | 4 +- github/MainClass.py | 26 +++---- github/Milestone.py | 6 +- github/NamedUser.py | 28 +++---- github/Organization.py | 34 ++++----- github/PullRequest.py | 28 +++---- github/PullRequestComment.py | 4 +- github/Repository.py | 142 +++++++++++++++++------------------ github/RepositoryKey.py | 4 +- github/Team.py | 20 ++--- github/UserKey.py | 4 +- 22 files changed, 226 insertions(+), 226 deletions(-) diff --git a/github/AuthenticatedUser.py b/github/AuthenticatedUser.py index 56638122..a92a7813 100644 --- a/github/AuthenticatedUser.py +++ b/github/AuthenticatedUser.py @@ -247,7 +247,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject): def add_to_emails(self, *emails): """ - :calls: `POST /user/emails `_ + :calls: `POST /user/emails `_ :param email: string :rtype: None """ @@ -262,7 +262,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject): def add_to_following(self, following): """ - :calls: `PUT /user/following/:user `_ + :calls: `PUT /user/following/:user `_ :param following: :class:`github.NamedUser.NamedUser` :rtype: None """ @@ -276,7 +276,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject): def add_to_starred(self, starred): """ - :calls: `PUT /user/starred/:owner/:repo `_ + :calls: `PUT /user/starred/:owner/:repo `_ :param starred: :class:`github.Repository.Repository` :rtype: None """ @@ -290,7 +290,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject): def add_to_subscriptions(self, subscription): """ - :calls: `PUT /user/subscriptions/:owner/:repo `_ + :calls: `PUT /user/subscriptions/:owner/:repo `_ :param subscription: :class:`github.Repository.Repository` :rtype: None """ @@ -304,7 +304,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject): def add_to_watched(self, watched): """ - :calls: `PUT /user/watched/:owner/:repo `_ + :calls: `PUT /user/watched/:owner/:repo `_ :param watched: :class:`github.Repository.Repository` :rtype: None """ @@ -318,7 +318,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject): def create_authorization(self, scopes=github.GithubObject.NotSet, note=github.GithubObject.NotSet, note_url=github.GithubObject.NotSet, client_id=github.GithubObject.NotSet, client_secret=github.GithubObject.NotSet): """ - :calls: `POST /authorizations `_ + :calls: `POST /authorizations `_ :param scopes: list of string :param note: string :param note_url: string @@ -352,7 +352,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject): def create_fork(self, repo): """ - :calls: `POST /repos/:owner/:repo/forks `_ + :calls: `POST /repos/:owner/:repo/forks `_ :param repo: :class:`github.Repository.Repository` :rtype: :class:`github.Repository.Repository` """ @@ -367,7 +367,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject): def create_gist(self, public, files, description=github.GithubObject.NotSet): """ - :calls: `POST /gists `_ + :calls: `POST /gists `_ :param public: bool :param files: dict of string to :class:`github.InputFileContent.InputFileContent` :param description: string @@ -392,7 +392,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject): def create_key(self, title, key): """ - :calls: `POST /user/keys `_ + :calls: `POST /user/keys `_ :param title: string :param key: string :rtype: :class:`github.UserKey.UserKey` @@ -413,7 +413,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject): def create_repo(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, auto_init=github.GithubObject.NotSet, gitignore_template=github.GithubObject.NotSet): """ - :calls: `POST /user/repos `_ + :calls: `POST /user/repos `_ :param name: string :param description: string :param homepage: string @@ -463,7 +463,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject): def edit(self, name=github.GithubObject.NotSet, email=github.GithubObject.NotSet, blog=github.GithubObject.NotSet, company=github.GithubObject.NotSet, location=github.GithubObject.NotSet, hireable=github.GithubObject.NotSet, bio=github.GithubObject.NotSet): """ - :calls: `PATCH /user `_ + :calls: `PATCH /user `_ :param name: string :param email: string :param blog: string @@ -505,7 +505,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject): def get_authorization(self, id): """ - :calls: `GET /authorizations/:id `_ + :calls: `GET /authorizations/:id `_ :param id: integer :rtype: :class:`github.Authorization.Authorization` """ @@ -520,7 +520,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject): def get_authorizations(self): """ - :calls: `GET /authorizations `_ + :calls: `GET /authorizations `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Authorization.Authorization` """ return github.PaginatedList.PaginatedList( @@ -532,7 +532,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject): def get_emails(self): """ - :calls: `GET /user/emails `_ + :calls: `GET /user/emails `_ :rtype: list of string """ headers, data = self._requester.requestJsonAndCheck( @@ -545,7 +545,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject): def get_events(self): """ - :calls: `GET /events `_ + :calls: `GET /events `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Event.Event` """ return github.PaginatedList.PaginatedList( @@ -557,7 +557,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject): def get_followers(self): """ - :calls: `GET /user/followers `_ + :calls: `GET /user/followers `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser` """ return github.PaginatedList.PaginatedList( @@ -569,7 +569,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject): def get_following(self): """ - :calls: `GET /user/following `_ + :calls: `GET /user/following `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser` """ return github.PaginatedList.PaginatedList( @@ -581,7 +581,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject): def get_gists(self): """ - :calls: `GET /gists `_ + :calls: `GET /gists `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Gist.Gist` """ return github.PaginatedList.PaginatedList( @@ -593,7 +593,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject): def get_issues(self, filter=github.GithubObject.NotSet, state=github.GithubObject.NotSet, labels=github.GithubObject.NotSet, sort=github.GithubObject.NotSet, direction=github.GithubObject.NotSet, since=github.GithubObject.NotSet): """ - :calls: `GET /issues `_ + :calls: `GET /issues `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Issue.Issue` :param filter: string :param state: string @@ -631,7 +631,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject): def get_user_issues(self, filter=github.GithubObject.NotSet, state=github.GithubObject.NotSet, labels=github.GithubObject.NotSet, sort=github.GithubObject.NotSet, direction=github.GithubObject.NotSet, since=github.GithubObject.NotSet): """ - :calls: `GET /user/issues `_ + :calls: `GET /user/issues `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Issue.Issue` :param filter: string :param state: string @@ -669,7 +669,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject): def get_key(self, id): """ - :calls: `GET /user/keys/:id `_ + :calls: `GET /user/keys/:id `_ :param id: integer :rtype: :class:`github.UserKey.UserKey` """ @@ -684,7 +684,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject): def get_keys(self): """ - :calls: `GET /user/keys `_ + :calls: `GET /user/keys `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.UserKey.UserKey` """ return github.PaginatedList.PaginatedList( @@ -696,7 +696,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject): def get_notification(self, id): """ - :calls: `GET /notifications/threads/:id `_ + :calls: `GET /notifications/threads/:id `_ :rtype: :class:`github.Notification.Notification` """ @@ -711,7 +711,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject): def get_notifications(self, all=github.GithubObject.NotSet, participating=github.GithubObject.NotSet): """ - :calls: `GET /notifications `_ + :calls: `GET /notifications `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Notification.Notification` """ @@ -734,7 +734,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject): def get_organization_events(self, org): """ - :calls: `GET /users/:user/events/orgs/:org `_ + :calls: `GET /users/:user/events/orgs/:org `_ :param org: :class:`github.Organization.Organization` :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Event.Event` """ @@ -748,7 +748,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject): def get_orgs(self): """ - :calls: `GET /user/orgs `_ + :calls: `GET /user/orgs `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Organization.Organization` """ return github.PaginatedList.PaginatedList( @@ -760,7 +760,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject): def get_repo(self, name): """ - :calls: `GET /repos/:owner/:repo `_ + :calls: `GET /repos/:owner/:repo `_ :param name: string :rtype: :class:`github.Repository.Repository` """ @@ -775,7 +775,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject): def get_repos(self, type=github.GithubObject.NotSet, sort=github.GithubObject.NotSet, direction=github.GithubObject.NotSet): """ - :calls: `GET /user/repos `_ + :calls: `GET /user/repos `_ :param type: string :param sort: string :param direction: string @@ -800,7 +800,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject): def get_starred(self): """ - :calls: `GET /user/starred `_ + :calls: `GET /user/starred `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Repository.Repository` """ return github.PaginatedList.PaginatedList( @@ -812,7 +812,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject): def get_starred_gists(self): """ - :calls: `GET /gists/starred `_ + :calls: `GET /gists/starred `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Gist.Gist` """ return github.PaginatedList.PaginatedList( @@ -824,7 +824,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject): def get_subscriptions(self): """ - :calls: `GET /user/subscriptions `_ + :calls: `GET /user/subscriptions `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Repository.Repository` """ return github.PaginatedList.PaginatedList( @@ -836,7 +836,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject): def get_watched(self): """ - :calls: `GET /user/watched `_ + :calls: `GET /user/watched `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Repository.Repository` """ return github.PaginatedList.PaginatedList( @@ -848,7 +848,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject): def has_in_following(self, following): """ - :calls: `GET /user/following/:user `_ + :calls: `GET /user/following/:user `_ :param following: :class:`github.NamedUser.NamedUser` :rtype: bool """ @@ -863,7 +863,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject): def has_in_starred(self, starred): """ - :calls: `GET /user/starred/:owner/:repo `_ + :calls: `GET /user/starred/:owner/:repo `_ :param starred: :class:`github.Repository.Repository` :rtype: bool """ @@ -878,7 +878,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject): def has_in_subscriptions(self, subscription): """ - :calls: `GET /user/subscriptions/:owner/:repo `_ + :calls: `GET /user/subscriptions/:owner/:repo `_ :param subscription: :class:`github.Repository.Repository` :rtype: bool """ @@ -893,7 +893,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject): def has_in_watched(self, watched): """ - :calls: `GET /user/watched/:owner/:repo `_ + :calls: `GET /user/watched/:owner/:repo `_ :param watched: :class:`github.Repository.Repository` :rtype: bool """ @@ -908,7 +908,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject): def remove_from_emails(self, *emails): """ - :calls: `DELETE /user/emails `_ + :calls: `DELETE /user/emails `_ :param email: string :rtype: None """ @@ -923,7 +923,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject): def remove_from_following(self, following): """ - :calls: `DELETE /user/following/:user `_ + :calls: `DELETE /user/following/:user `_ :param following: :class:`github.NamedUser.NamedUser` :rtype: None """ @@ -937,7 +937,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject): def remove_from_starred(self, starred): """ - :calls: `DELETE /user/starred/:owner/:repo `_ + :calls: `DELETE /user/starred/:owner/:repo `_ :param starred: :class:`github.Repository.Repository` :rtype: None """ @@ -951,7 +951,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject): def remove_from_subscriptions(self, subscription): """ - :calls: `DELETE /user/subscriptions/:owner/:repo `_ + :calls: `DELETE /user/subscriptions/:owner/:repo `_ :param subscription: :class:`github.Repository.Repository` :rtype: None """ @@ -965,7 +965,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject): def remove_from_watched(self, watched): """ - :calls: `DELETE /user/watched/:owner/:repo `_ + :calls: `DELETE /user/watched/:owner/:repo `_ :param watched: :class:`github.Repository.Repository` :rtype: None """ diff --git a/github/Authorization.py b/github/Authorization.py index 23456d11..14cc1350 100644 --- a/github/Authorization.py +++ b/github/Authorization.py @@ -107,7 +107,7 @@ class Authorization(github.GithubObject.CompletableGithubObject): def delete(self): """ - :calls: `DELETE /authorizations/:id `_ + :calls: `DELETE /authorizations/:id `_ :rtype: None """ headers, data = self._requester.requestJsonAndCheck( @@ -119,7 +119,7 @@ class Authorization(github.GithubObject.CompletableGithubObject): def edit(self, scopes=github.GithubObject.NotSet, add_scopes=github.GithubObject.NotSet, remove_scopes=github.GithubObject.NotSet, note=github.GithubObject.NotSet, note_url=github.GithubObject.NotSet): """ - :calls: `PATCH /authorizations/:id `_ + :calls: `PATCH /authorizations/:id `_ :param scopes: list of string :param add_scopes: list of string :param remove_scopes: list of string diff --git a/github/Commit.py b/github/Commit.py index 264dc420..de9da2d1 100644 --- a/github/Commit.py +++ b/github/Commit.py @@ -106,7 +106,7 @@ class Commit(github.GithubObject.CompletableGithubObject): def create_comment(self, body, line=github.GithubObject.NotSet, path=github.GithubObject.NotSet, position=github.GithubObject.NotSet): """ - :calls: `POST /repos/:owner/:repo/commits/:sha/comments `_ + :calls: `POST /repos/:owner/:repo/commits/:sha/comments `_ :param body: string :param line: integer :param path: string @@ -136,7 +136,7 @@ class Commit(github.GithubObject.CompletableGithubObject): def create_status(self, state, target_url=github.GithubObject.NotSet, description=github.GithubObject.NotSet): """ - :calls: `POST /repos/:owner/:repo/statuses/:sha `_ + :calls: `POST /repos/:owner/:repo/statuses/:sha `_ :param state: string :param target_url: string :param description: string @@ -162,7 +162,7 @@ class Commit(github.GithubObject.CompletableGithubObject): def get_comments(self): """ - :calls: `GET /repos/:owner/:repo/commits/:sha/comments `_ + :calls: `GET /repos/:owner/:repo/commits/:sha/comments `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.CommitComment.CommitComment` """ return github.PaginatedList.PaginatedList( @@ -174,7 +174,7 @@ class Commit(github.GithubObject.CompletableGithubObject): def get_statuses(self): """ - :calls: `GET /repos/:owner/:repo/statuses/:ref `_ + :calls: `GET /repos/:owner/:repo/statuses/:ref `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.CommitStatus.CommitStatus` """ return github.PaginatedList.PaginatedList( diff --git a/github/CommitComment.py b/github/CommitComment.py index 0a3cacdf..30f1df3a 100644 --- a/github/CommitComment.py +++ b/github/CommitComment.py @@ -123,7 +123,7 @@ class CommitComment(github.GithubObject.CompletableGithubObject): def delete(self): """ - :calls: `DELETE /repos/:owner/:repo/comments/:id `_ + :calls: `DELETE /repos/:owner/:repo/comments/:id `_ :rtype: None """ headers, data = self._requester.requestJsonAndCheck( @@ -135,7 +135,7 @@ class CommitComment(github.GithubObject.CompletableGithubObject): def edit(self, body): """ - :calls: `PATCH /repos/:owner/:repo/comments/:id `_ + :calls: `PATCH /repos/:owner/:repo/comments/:id `_ :param body: string :rtype: None """ diff --git a/github/Download.py b/github/Download.py index 3023d051..7555a8c3 100644 --- a/github/Download.py +++ b/github/Download.py @@ -193,7 +193,7 @@ class Download(github.GithubObject.CompletableGithubObject): def delete(self): """ - :calls: `DELETE /repos/:owner/:repo/downloads/:id `_ + :calls: `DELETE /repos/:owner/:repo/downloads/:id `_ :rtype: None """ headers, data = self._requester.requestJsonAndCheck( diff --git a/github/Gist.py b/github/Gist.py index 744df418..66866a81 100644 --- a/github/Gist.py +++ b/github/Gist.py @@ -160,7 +160,7 @@ class Gist(github.GithubObject.CompletableGithubObject): def create_comment(self, body): """ - :calls: `POST /gists/:gist_id/comments `_ + :calls: `POST /gists/:gist_id/comments `_ :param body: string :rtype: :class:`github.GistComment.GistComment` """ @@ -191,7 +191,7 @@ class Gist(github.GithubObject.CompletableGithubObject): def delete(self): """ - :calls: `DELETE /gists/:id `_ + :calls: `DELETE /gists/:id `_ :rtype: None """ headers, data = self._requester.requestJsonAndCheck( @@ -203,7 +203,7 @@ class Gist(github.GithubObject.CompletableGithubObject): def edit(self, description=github.GithubObject.NotSet, files=github.GithubObject.NotSet): """ - :calls: `PATCH /gists/:id `_ + :calls: `PATCH /gists/:id `_ :param description: string :param files: dict of string to :class:`github.InputFileContent.InputFileContent` :rtype: None @@ -225,7 +225,7 @@ class Gist(github.GithubObject.CompletableGithubObject): def get_comment(self, id): """ - :calls: `GET /gists/:gist_id/comments/:id `_ + :calls: `GET /gists/:gist_id/comments/:id `_ :param id: integer :rtype: :class:`github.GistComment.GistComment` """ @@ -240,7 +240,7 @@ class Gist(github.GithubObject.CompletableGithubObject): def get_comments(self): """ - :calls: `GET /gists/:gist_id/comments `_ + :calls: `GET /gists/:gist_id/comments `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.GistComment.GistComment` """ return github.PaginatedList.PaginatedList( @@ -252,7 +252,7 @@ class Gist(github.GithubObject.CompletableGithubObject): def is_starred(self): """ - :calls: `GET /gists/:id/star `_ + :calls: `GET /gists/:id/star `_ :rtype: bool """ status, headers, data = self._requester.requestJson( @@ -265,7 +265,7 @@ class Gist(github.GithubObject.CompletableGithubObject): def reset_starred(self): """ - :calls: `DELETE /gists/:id/star `_ + :calls: `DELETE /gists/:id/star `_ :rtype: None """ headers, data = self._requester.requestJsonAndCheck( @@ -277,7 +277,7 @@ class Gist(github.GithubObject.CompletableGithubObject): def set_starred(self): """ - :calls: `PUT /gists/:id/star `_ + :calls: `PUT /gists/:id/star `_ :rtype: None """ headers, data = self._requester.requestJsonAndCheck( diff --git a/github/GistComment.py b/github/GistComment.py index 498b2e1b..2bb28abd 100644 --- a/github/GistComment.py +++ b/github/GistComment.py @@ -83,7 +83,7 @@ class GistComment(github.GithubObject.CompletableGithubObject): def delete(self): """ - :calls: `DELETE /gists/:gist_id/comments/:id `_ + :calls: `DELETE /gists/:gist_id/comments/:id `_ :rtype: None """ headers, data = self._requester.requestJsonAndCheck( @@ -95,7 +95,7 @@ class GistComment(github.GithubObject.CompletableGithubObject): def edit(self, body): """ - :calls: `PATCH /gists/:gist_id/comments/:id `_ + :calls: `PATCH /gists/:gist_id/comments/:id `_ :param body: string :rtype: None """ diff --git a/github/GitRef.py b/github/GitRef.py index ee55ef05..44d177b8 100644 --- a/github/GitRef.py +++ b/github/GitRef.py @@ -59,7 +59,7 @@ class GitRef(github.GithubObject.CompletableGithubObject): def delete(self): """ - :calls: `DELETE /repos/:owner/:repo/git/refs/:ref `_ + :calls: `DELETE /repos/:owner/:repo/git/refs/:ref `_ :rtype: None """ headers, data = self._requester.requestJsonAndCheck( @@ -71,7 +71,7 @@ class GitRef(github.GithubObject.CompletableGithubObject): def edit(self, sha, force=github.GithubObject.NotSet): """ - :calls: `PATCH /repos/:owner/:repo/git/refs/:ref `_ + :calls: `PATCH /repos/:owner/:repo/git/refs/:ref `_ :param sha: string :param force: bool :rtype: None diff --git a/github/Hook.py b/github/Hook.py index 17b6a480..e3a955d3 100644 --- a/github/Hook.py +++ b/github/Hook.py @@ -107,7 +107,7 @@ class Hook(github.GithubObject.CompletableGithubObject): def delete(self): """ - :calls: `DELETE /repos/:owner/:repo/hooks/:id `_ + :calls: `DELETE /repos/:owner/:repo/hooks/:id `_ :rtype: None """ headers, data = self._requester.requestJsonAndCheck( @@ -119,7 +119,7 @@ class Hook(github.GithubObject.CompletableGithubObject): def edit(self, name, config, events=github.GithubObject.NotSet, add_events=github.GithubObject.NotSet, remove_events=github.GithubObject.NotSet, active=github.GithubObject.NotSet): """ - :calls: `PATCH /repos/:owner/:repo/hooks/:id `_ + :calls: `PATCH /repos/:owner/:repo/hooks/:id `_ :param name: string :param config: dict :param events: list of string diff --git a/github/Issue.py b/github/Issue.py index 7fa890e6..fd62dccf 100644 --- a/github/Issue.py +++ b/github/Issue.py @@ -188,7 +188,7 @@ class Issue(github.GithubObject.CompletableGithubObject): def add_to_labels(self, *labels): """ - :calls: `POST /repos/:owner/:repo/issues/:number/labels `_ + :calls: `POST /repos/:owner/:repo/issues/:number/labels `_ :param label: :class:`github.Label.Label` :rtype: None """ @@ -203,7 +203,7 @@ class Issue(github.GithubObject.CompletableGithubObject): def create_comment(self, body): """ - :calls: `POST /repos/:owner/:repo/issues/:number/comments `_ + :calls: `POST /repos/:owner/:repo/issues/:number/comments `_ :param body: string :rtype: :class:`github.IssueComment.IssueComment` """ @@ -221,7 +221,7 @@ class Issue(github.GithubObject.CompletableGithubObject): def delete_labels(self): """ - :calls: `DELETE /repos/:owner/:repo/issues/:number/labels `_ + :calls: `DELETE /repos/:owner/:repo/issues/:number/labels `_ :rtype: None """ headers, data = self._requester.requestJsonAndCheck( @@ -233,7 +233,7 @@ class Issue(github.GithubObject.CompletableGithubObject): def edit(self, title=github.GithubObject.NotSet, body=github.GithubObject.NotSet, assignee=github.GithubObject.NotSet, state=github.GithubObject.NotSet, milestone=github.GithubObject.NotSet, labels=github.GithubObject.NotSet): """ - :calls: `PATCH /repos/:owner/:repo/issues/:number `_ + :calls: `PATCH /repos/:owner/:repo/issues/:number `_ :param title: string :param body: string :param assignee: :class:`github.NamedUser.NamedUser` or None @@ -271,7 +271,7 @@ class Issue(github.GithubObject.CompletableGithubObject): def get_comment(self, id): """ - :calls: `GET /repos/:owner/:repo/issues/comments/:id `_ + :calls: `GET /repos/:owner/:repo/issues/comments/:id `_ :param id: integer :rtype: :class:`github.IssueComment.IssueComment` """ @@ -286,7 +286,7 @@ class Issue(github.GithubObject.CompletableGithubObject): def get_comments(self): """ - :calls: `GET /repos/:owner/:repo/issues/:number/comments `_ + :calls: `GET /repos/:owner/:repo/issues/:number/comments `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.IssueComment.IssueComment` """ return github.PaginatedList.PaginatedList( @@ -298,7 +298,7 @@ class Issue(github.GithubObject.CompletableGithubObject): def get_events(self): """ - :calls: `GET /repos/:owner/:repo/issues/:issue_number/events `_ + :calls: `GET /repos/:owner/:repo/issues/:issue_number/events `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.IssueEvent.IssueEvent` """ return github.PaginatedList.PaginatedList( @@ -310,7 +310,7 @@ class Issue(github.GithubObject.CompletableGithubObject): def get_labels(self): """ - :calls: `GET /repos/:owner/:repo/issues/:number/labels `_ + :calls: `GET /repos/:owner/:repo/issues/:number/labels `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Label.Label` """ return github.PaginatedList.PaginatedList( @@ -322,7 +322,7 @@ class Issue(github.GithubObject.CompletableGithubObject): def remove_from_labels(self, label): """ - :calls: `DELETE /repos/:owner/:repo/issues/:number/labels/:name `_ + :calls: `DELETE /repos/:owner/:repo/issues/:number/labels/:name `_ :param label: :class:`github.Label.Label` :rtype: None """ @@ -336,7 +336,7 @@ class Issue(github.GithubObject.CompletableGithubObject): def set_labels(self, *labels): """ - :calls: `PUT /repos/:owner/:repo/issues/:number/labels `_ + :calls: `PUT /repos/:owner/:repo/issues/:number/labels `_ :param label: :class:`github.Label.Label` :rtype: None """ diff --git a/github/IssueComment.py b/github/IssueComment.py index 79720181..5e9e5099 100644 --- a/github/IssueComment.py +++ b/github/IssueComment.py @@ -92,7 +92,7 @@ class IssueComment(github.GithubObject.CompletableGithubObject): def delete(self): """ - :calls: `DELETE /repos/:owner/:repo/issues/comments/:id `_ + :calls: `DELETE /repos/:owner/:repo/issues/comments/:id `_ :rtype: None """ headers, data = self._requester.requestJsonAndCheck( @@ -104,7 +104,7 @@ class IssueComment(github.GithubObject.CompletableGithubObject): def edit(self, body): """ - :calls: `PATCH /repos/:owner/:repo/issues/comments/:id `_ + :calls: `PATCH /repos/:owner/:repo/issues/comments/:id `_ :param body: string :rtype: None """ diff --git a/github/Label.py b/github/Label.py index ff1c3d18..e2d42335 100644 --- a/github/Label.py +++ b/github/Label.py @@ -60,7 +60,7 @@ class Label(github.GithubObject.CompletableGithubObject): def delete(self): """ - :calls: `DELETE /repos/:owner/:repo/labels/:name `_ + :calls: `DELETE /repos/:owner/:repo/labels/:name `_ :rtype: None """ headers, data = self._requester.requestJsonAndCheck( @@ -72,7 +72,7 @@ class Label(github.GithubObject.CompletableGithubObject): def edit(self, name, color): """ - :calls: `PATCH /repos/:owner/:repo/labels/:name `_ + :calls: `PATCH /repos/:owner/:repo/labels/:name `_ :param name: string :param color: string :rtype: None diff --git a/github/MainClass.py b/github/MainClass.py index dbde89d9..ff180ef4 100644 --- a/github/MainClass.py +++ b/github/MainClass.py @@ -108,7 +108,7 @@ class Github(object): def get_user(self, login=github.GithubObject.NotSet): """ - :calls: `GET /users/:user `_ or `GET /user `_ + :calls: `GET /users/:user `_ or `GET /user `_ :param login: string :rtype: :class:`github.NamedUser.NamedUser` """ @@ -126,7 +126,7 @@ class Github(object): def get_users(self, since=github.GithubObject.NotSet): """ - :calls: `GET /users `_ + :calls: `GET /users `_ :param since: integer :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser` """ @@ -143,7 +143,7 @@ class Github(object): def get_organization(self, login): """ - :calls: `GET /orgs/:org `_ + :calls: `GET /orgs/:org `_ :param login: string :rtype: :class:`github.Organization.Organization` """ @@ -158,7 +158,7 @@ class Github(object): def get_repo(self, full_name): """ - :calls: `GET /repos/:owner/:repo `_ + :calls: `GET /repos/:owner/:repo `_ :rtype: :class:`github.Repository.Repository` """ assert isinstance(full_name, (str, unicode)), full_name @@ -172,7 +172,7 @@ class Github(object): def get_gist(self, id): """ - :calls: `GET /gists/:id `_ + :calls: `GET /gists/:id `_ :param id: string :rtype: :class:`github.Gist.Gist` """ @@ -187,7 +187,7 @@ class Github(object): def get_gists(self): """ - :calls: `GET /gists/public `_ + :calls: `GET /gists/public `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Gist.Gist` """ return github.PaginatedList.PaginatedList( @@ -199,7 +199,7 @@ class Github(object): def legacy_search_repos(self, keyword, language=github.GithubObject.NotSet): """ - :calls: `GET /legacy/repos/search/:keyword `_ + :calls: `GET /legacy/repos/search/:keyword `_ :param keyword: string :param language: string :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Repository.Repository` @@ -218,7 +218,7 @@ class Github(object): def legacy_search_users(self, keyword): """ - :calls: `GET /legacy/user/search/:keyword `_ + :calls: `GET /legacy/user/search/:keyword `_ :param keyword: string :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser` """ @@ -234,7 +234,7 @@ class Github(object): def legacy_search_user_by_email(self, email): """ - :calls: `GET /legacy/user/email/:email `_ + :calls: `GET /legacy/user/email/:email `_ :param email: string :rtype: :class:`github.NamedUser.NamedUser` """ @@ -249,7 +249,7 @@ class Github(object): def render_markdown(self, text, context=github.GithubObject.NotSet): """ - :calls: `POST /markdown `_ + :calls: `POST /markdown `_ :param text: string :param context: :class:`github.Repository.Repository` :rtype: string @@ -272,7 +272,7 @@ class Github(object): def get_hooks(self): """ - :calls: `GET /hooks `_ + :calls: `GET /hooks `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.HookDescription.HookDescription` """ headers, data = self.__requester.requestJsonAndCheck( @@ -285,7 +285,7 @@ class Github(object): def get_gitignore_templates(self): """ - :calls: `GET /gitignore/templates `_ + :calls: `GET /gitignore/templates `_ :rtype: list of string """ headers, data = self.__requester.requestJsonAndCheck( @@ -298,7 +298,7 @@ class Github(object): def get_gitignore_template(self, name): """ - :calls: `GET /gitignore/templates/:name `_ + :calls: `GET /gitignore/templates/:name `_ :rtype: :class:`github.GitignoreTemplate.GitignoreTemplate` """ assert isinstance(name, (str, unicode)), name diff --git a/github/Milestone.py b/github/Milestone.py index 717b23ad..9611d7b7 100644 --- a/github/Milestone.py +++ b/github/Milestone.py @@ -128,7 +128,7 @@ class Milestone(github.GithubObject.CompletableGithubObject): def delete(self): """ - :calls: `DELETE /repos/:owner/:repo/milestones/:number `_ + :calls: `DELETE /repos/:owner/:repo/milestones/:number `_ :rtype: None """ headers, data = self._requester.requestJsonAndCheck( @@ -140,7 +140,7 @@ class Milestone(github.GithubObject.CompletableGithubObject): def edit(self, title, state=github.GithubObject.NotSet, description=github.GithubObject.NotSet, due_on=github.GithubObject.NotSet): """ - :calls: `PATCH /repos/:owner/:repo/milestones/:number `_ + :calls: `PATCH /repos/:owner/:repo/milestones/:number `_ :param title: string :param state: string :param description: string @@ -170,7 +170,7 @@ class Milestone(github.GithubObject.CompletableGithubObject): def get_labels(self): """ - :calls: `GET /repos/:owner/:repo/milestones/:number/labels `_ + :calls: `GET /repos/:owner/:repo/milestones/:number/labels `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Label.Label` """ return github.PaginatedList.PaginatedList( diff --git a/github/NamedUser.py b/github/NamedUser.py index 12eed7e2..a8016a15 100644 --- a/github/NamedUser.py +++ b/github/NamedUser.py @@ -275,7 +275,7 @@ class NamedUser(github.GithubObject.CompletableGithubObject): def get_events(self): """ - :calls: `GET /users/:user/events `_ + :calls: `GET /users/:user/events `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Event.Event` """ return github.PaginatedList.PaginatedList( @@ -287,7 +287,7 @@ class NamedUser(github.GithubObject.CompletableGithubObject): def get_followers(self): """ - :calls: `GET /users/:user/followers `_ + :calls: `GET /users/:user/followers `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser` """ return github.PaginatedList.PaginatedList( @@ -299,7 +299,7 @@ class NamedUser(github.GithubObject.CompletableGithubObject): def get_following(self): """ - :calls: `GET /users/:user/following `_ + :calls: `GET /users/:user/following `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser` """ return github.PaginatedList.PaginatedList( @@ -311,7 +311,7 @@ class NamedUser(github.GithubObject.CompletableGithubObject): def get_gists(self): """ - :calls: `GET /users/:user/gists `_ + :calls: `GET /users/:user/gists `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Gist.Gist` """ return github.PaginatedList.PaginatedList( @@ -323,7 +323,7 @@ class NamedUser(github.GithubObject.CompletableGithubObject): def get_keys(self): """ - :calls: `GET /users/:user/keys `_ + :calls: `GET /users/:user/keys `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.UserKey.UserKey` """ return github.PaginatedList.PaginatedList( @@ -335,7 +335,7 @@ class NamedUser(github.GithubObject.CompletableGithubObject): def get_orgs(self): """ - :calls: `GET /users/:user/orgs `_ + :calls: `GET /users/:user/orgs `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Organization.Organization` """ return github.PaginatedList.PaginatedList( @@ -347,7 +347,7 @@ class NamedUser(github.GithubObject.CompletableGithubObject): def get_public_events(self): """ - :calls: `GET /users/:user/events/public `_ + :calls: `GET /users/:user/events/public `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Event.Event` """ return github.PaginatedList.PaginatedList( @@ -359,7 +359,7 @@ class NamedUser(github.GithubObject.CompletableGithubObject): def get_public_received_events(self): """ - :calls: `GET /users/:user/received_events/public `_ + :calls: `GET /users/:user/received_events/public `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Event.Event` """ return github.PaginatedList.PaginatedList( @@ -371,7 +371,7 @@ class NamedUser(github.GithubObject.CompletableGithubObject): def get_received_events(self): """ - :calls: `GET /users/:user/received_events `_ + :calls: `GET /users/:user/received_events `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Event.Event` """ return github.PaginatedList.PaginatedList( @@ -383,7 +383,7 @@ class NamedUser(github.GithubObject.CompletableGithubObject): def get_repo(self, name): """ - :calls: `GET /repos/:owner/:repo `_ + :calls: `GET /repos/:owner/:repo `_ :param name: string :rtype: :class:`github.Repository.Repository` """ @@ -398,7 +398,7 @@ class NamedUser(github.GithubObject.CompletableGithubObject): def get_repos(self, type=github.GithubObject.NotSet): """ - :calls: `GET /users/:user/repos `_ + :calls: `GET /users/:user/repos `_ :param type: string :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Repository.Repository` """ @@ -415,7 +415,7 @@ class NamedUser(github.GithubObject.CompletableGithubObject): def get_starred(self): """ - :calls: `GET /users/:user/starred `_ + :calls: `GET /users/:user/starred `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Repository.Repository` """ return github.PaginatedList.PaginatedList( @@ -427,7 +427,7 @@ class NamedUser(github.GithubObject.CompletableGithubObject): def get_subscriptions(self): """ - :calls: `GET /users/:user/subscriptions `_ + :calls: `GET /users/:user/subscriptions `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Repository.Repository` """ return github.PaginatedList.PaginatedList( @@ -439,7 +439,7 @@ class NamedUser(github.GithubObject.CompletableGithubObject): def get_watched(self): """ - :calls: `GET /users/:user/watched `_ + :calls: `GET /users/:user/watched `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Repository.Repository` """ return github.PaginatedList.PaginatedList( diff --git a/github/Organization.py b/github/Organization.py index a89b5b42..efe9cef0 100644 --- a/github/Organization.py +++ b/github/Organization.py @@ -236,7 +236,7 @@ class Organization(github.GithubObject.CompletableGithubObject): def add_to_public_members(self, public_member): """ - :calls: `PUT /orgs/:org/public_members/:user `_ + :calls: `PUT /orgs/:org/public_members/:user `_ :param public_member: :class:`github.NamedUser.NamedUser` :rtype: None """ @@ -250,7 +250,7 @@ class Organization(github.GithubObject.CompletableGithubObject): def create_fork(self, repo): """ - :calls: `POST /repos/:owner/:repo/forks `_ + :calls: `POST /repos/:owner/:repo/forks `_ :param repo: :class:`github.Repository.Repository` :rtype: :class:`github.Repository.Repository` """ @@ -268,7 +268,7 @@ class Organization(github.GithubObject.CompletableGithubObject): def create_repo(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, team_id=github.GithubObject.NotSet, auto_init=github.GithubObject.NotSet, gitignore_template=github.GithubObject.NotSet): """ - :calls: `POST /orgs/:org/repos `_ + :calls: `POST /orgs/:org/repos `_ :param name: string :param description: string :param homepage: string @@ -322,7 +322,7 @@ class Organization(github.GithubObject.CompletableGithubObject): def create_team(self, name, repo_names=github.GithubObject.NotSet, permission=github.GithubObject.NotSet): """ - :calls: `POST /orgs/:org/teams `_ + :calls: `POST /orgs/:org/teams `_ :param name: string :param repo_names: list of :class:`github.Repository.Repository` :param permission: string @@ -348,7 +348,7 @@ class Organization(github.GithubObject.CompletableGithubObject): def edit(self, billing_email=github.GithubObject.NotSet, blog=github.GithubObject.NotSet, company=github.GithubObject.NotSet, email=github.GithubObject.NotSet, location=github.GithubObject.NotSet, name=github.GithubObject.NotSet): """ - :calls: `PATCH /orgs/:org `_ + :calls: `PATCH /orgs/:org `_ :param billing_email: string :param blog: string :param company: string @@ -386,7 +386,7 @@ class Organization(github.GithubObject.CompletableGithubObject): def get_events(self): """ - :calls: `GET /orgs/:org/events `_ + :calls: `GET /orgs/:org/events `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Event.Event` """ return github.PaginatedList.PaginatedList( @@ -398,7 +398,7 @@ class Organization(github.GithubObject.CompletableGithubObject): def get_issues(self, filter=github.GithubObject.NotSet, state=github.GithubObject.NotSet, labels=github.GithubObject.NotSet, sort=github.GithubObject.NotSet, direction=github.GithubObject.NotSet, since=github.GithubObject.NotSet): """ - :calls: `GET /orgs/:org/issues `_ + :calls: `GET /orgs/:org/issues `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Issue.Issue` :param filter: string :param state: string @@ -436,7 +436,7 @@ class Organization(github.GithubObject.CompletableGithubObject): def get_members(self): """ - :calls: `GET /orgs/:org/members `_ + :calls: `GET /orgs/:org/members `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser` """ return github.PaginatedList.PaginatedList( @@ -448,7 +448,7 @@ class Organization(github.GithubObject.CompletableGithubObject): def get_public_members(self): """ - :calls: `GET /orgs/:org/public_members `_ + :calls: `GET /orgs/:org/public_members `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser` """ return github.PaginatedList.PaginatedList( @@ -460,7 +460,7 @@ class Organization(github.GithubObject.CompletableGithubObject): def get_repo(self, name): """ - :calls: `GET /repos/:owner/:repo `_ + :calls: `GET /repos/:owner/:repo `_ :param name: string :rtype: :class:`github.Repository.Repository` """ @@ -475,7 +475,7 @@ class Organization(github.GithubObject.CompletableGithubObject): def get_repos(self, type=github.GithubObject.NotSet): """ - :calls: `GET /orgs/:org/repos `_ + :calls: `GET /orgs/:org/repos `_ :param type: string :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Repository.Repository` """ @@ -492,7 +492,7 @@ class Organization(github.GithubObject.CompletableGithubObject): def get_team(self, id): """ - :calls: `GET /teams/:id `_ + :calls: `GET /teams/:id `_ :param id: integer :rtype: :class:`github.Team.Team` """ @@ -507,7 +507,7 @@ class Organization(github.GithubObject.CompletableGithubObject): def get_teams(self): """ - :calls: `GET /orgs/:org/teams `_ + :calls: `GET /orgs/:org/teams `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Team.Team` """ return github.PaginatedList.PaginatedList( @@ -519,7 +519,7 @@ class Organization(github.GithubObject.CompletableGithubObject): def has_in_members(self, member): """ - :calls: `GET /orgs/:org/members/:user `_ + :calls: `GET /orgs/:org/members/:user `_ :param member: :class:`github.NamedUser.NamedUser` :rtype: bool """ @@ -534,7 +534,7 @@ class Organization(github.GithubObject.CompletableGithubObject): def has_in_public_members(self, public_member): """ - :calls: `GET /orgs/:org/public_members/:user `_ + :calls: `GET /orgs/:org/public_members/:user `_ :param public_member: :class:`github.NamedUser.NamedUser` :rtype: bool """ @@ -549,7 +549,7 @@ class Organization(github.GithubObject.CompletableGithubObject): def remove_from_members(self, member): """ - :calls: `DELETE /orgs/:org/members/:user `_ + :calls: `DELETE /orgs/:org/members/:user `_ :param member: :class:`github.NamedUser.NamedUser` :rtype: None """ @@ -563,7 +563,7 @@ class Organization(github.GithubObject.CompletableGithubObject): def remove_from_public_members(self, public_member): """ - :calls: `DELETE /orgs/:org/public_members/:user `_ + :calls: `DELETE /orgs/:org/public_members/:user `_ :param public_member: :class:`github.NamedUser.NamedUser` :rtype: None """ diff --git a/github/PullRequest.py b/github/PullRequest.py index f0d8ed12..0adad292 100644 --- a/github/PullRequest.py +++ b/github/PullRequest.py @@ -260,7 +260,7 @@ class PullRequest(github.GithubObject.CompletableGithubObject): def create_comment(self, body, commit_id, path, position): """ - :calls: `POST /repos/:owner/:repo/pulls/:number/comments `_ + :calls: `POST /repos/:owner/:repo/pulls/:number/comments `_ :param body: string :param commit_id: :class:`github.Commit.Commit` :param path: string @@ -271,7 +271,7 @@ class PullRequest(github.GithubObject.CompletableGithubObject): def create_review_comment(self, body, commit_id, path, position): """ - :calls: `POST /repos/:owner/:repo/pulls/:number/comments `_ + :calls: `POST /repos/:owner/:repo/pulls/:number/comments `_ :param body: string :param commit_id: :class:`github.Commit.Commit` :param path: string @@ -298,7 +298,7 @@ class PullRequest(github.GithubObject.CompletableGithubObject): def create_issue_comment(self, body): """ - :calls: `POST /repos/:owner/:repo/issues/:number/comments `_ + :calls: `POST /repos/:owner/:repo/issues/:number/comments `_ :param body: string :rtype: :class:`github.IssueComment.IssueComment` """ @@ -316,7 +316,7 @@ class PullRequest(github.GithubObject.CompletableGithubObject): def edit(self, title=github.GithubObject.NotSet, body=github.GithubObject.NotSet, state=github.GithubObject.NotSet): """ - :calls: `PATCH /repos/:owner/:repo/pulls/:number `_ + :calls: `PATCH /repos/:owner/:repo/pulls/:number `_ :param title: string :param body: string :param state: string @@ -342,7 +342,7 @@ class PullRequest(github.GithubObject.CompletableGithubObject): def get_comment(self, id): """ - :calls: `GET /repos/:owner/:repo/pulls/comments/:number `_ + :calls: `GET /repos/:owner/:repo/pulls/comments/:number `_ :param id: integer :rtype: :class:`github.PullRequestComment.PullRequestComment` """ @@ -350,7 +350,7 @@ class PullRequest(github.GithubObject.CompletableGithubObject): def get_review_comment(self, id): """ - :calls: `GET /repos/:owner/:repo/pulls/comments/:number `_ + :calls: `GET /repos/:owner/:repo/pulls/comments/:number `_ :param id: integer :rtype: :class:`github.PullRequestComment.PullRequestComment` """ @@ -365,14 +365,14 @@ class PullRequest(github.GithubObject.CompletableGithubObject): def get_comments(self): """ - :calls: `GET /repos/:owner/:repo/pulls/:number/comments `_ + :calls: `GET /repos/:owner/:repo/pulls/:number/comments `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.PullRequestComment.PullRequestComment` """ return self.get_review_comments() def get_review_comments(self): """ - :calls: `GET /repos/:owner/:repo/pulls/:number/comments `_ + :calls: `GET /repos/:owner/:repo/pulls/:number/comments `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.PullRequestComment.PullRequestComment` """ return github.PaginatedList.PaginatedList( @@ -384,7 +384,7 @@ class PullRequest(github.GithubObject.CompletableGithubObject): def get_commits(self): """ - :calls: `GET /repos/:owner/:repo/pulls/:number/commits `_ + :calls: `GET /repos/:owner/:repo/pulls/:number/commits `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Commit.Commit` """ return github.PaginatedList.PaginatedList( @@ -396,7 +396,7 @@ class PullRequest(github.GithubObject.CompletableGithubObject): def get_files(self): """ - :calls: `GET /repos/:owner/:repo/pulls/:number/files `_ + :calls: `GET /repos/:owner/:repo/pulls/:number/files `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.File.File` """ return github.PaginatedList.PaginatedList( @@ -408,7 +408,7 @@ class PullRequest(github.GithubObject.CompletableGithubObject): def get_issue_comment(self, id): """ - :calls: `GET /repos/:owner/:repo/issues/comments/:id `_ + :calls: `GET /repos/:owner/:repo/issues/comments/:id `_ :param id: integer :rtype: :class:`github.IssueComment.IssueComment` """ @@ -423,7 +423,7 @@ class PullRequest(github.GithubObject.CompletableGithubObject): def get_issue_comments(self): """ - :calls: `GET /repos/:owner/:repo/issues/:number/comments `_ + :calls: `GET /repos/:owner/:repo/issues/:number/comments `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.IssueComment.IssueComment` """ return github.PaginatedList.PaginatedList( @@ -435,7 +435,7 @@ class PullRequest(github.GithubObject.CompletableGithubObject): def is_merged(self): """ - :calls: `GET /repos/:owner/:repo/pulls/:number/merge `_ + :calls: `GET /repos/:owner/:repo/pulls/:number/merge `_ :rtype: bool """ status, headers, data = self._requester.requestJson( @@ -448,7 +448,7 @@ class PullRequest(github.GithubObject.CompletableGithubObject): def merge(self, commit_message=github.GithubObject.NotSet): """ - :calls: `PUT /repos/:owner/:repo/pulls/:number/merge `_ + :calls: `PUT /repos/:owner/:repo/pulls/:number/merge `_ :param commit_message: string :rtype: :class:`github.PullRequestMergeStatus.PullRequestMergeStatus` """ diff --git a/github/PullRequestComment.py b/github/PullRequestComment.py index aec3ed84..c8f0ef6f 100644 --- a/github/PullRequestComment.py +++ b/github/PullRequestComment.py @@ -133,7 +133,7 @@ class PullRequestComment(github.GithubObject.CompletableGithubObject): def delete(self): """ - :calls: `DELETE /repos/:owner/:repo/pulls/comments/:number `_ + :calls: `DELETE /repos/:owner/:repo/pulls/comments/:number `_ :rtype: None """ headers, data = self._requester.requestJsonAndCheck( @@ -145,7 +145,7 @@ class PullRequestComment(github.GithubObject.CompletableGithubObject): def edit(self, body): """ - :calls: `PATCH /repos/:owner/:repo/pulls/comments/:number `_ + :calls: `PATCH /repos/:owner/:repo/pulls/comments/:number `_ :param body: string :rtype: None """ diff --git a/github/Repository.py b/github/Repository.py index 306e9dc2..fd3afbce 100644 --- a/github/Repository.py +++ b/github/Repository.py @@ -308,7 +308,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def add_to_collaborators(self, collaborator): """ - :calls: `PUT /repos/:owner/:repo/collaborators/:user `_ + :calls: `PUT /repos/:owner/:repo/collaborators/:user `_ :param collaborator: :class:`github.NamedUser.NamedUser` :rtype: None """ @@ -322,7 +322,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def compare(self, base, head): """ - :calls: `GET /repos/:owner/:repo/compare/:base...:head `_ + :calls: `GET /repos/:owner/:repo/compare/:base...:head `_ :param base: string :param head: string :rtype: :class:`github.Comparison.Comparison` @@ -339,7 +339,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def create_download(self, name, size, description=github.GithubObject.NotSet, content_type=github.GithubObject.NotSet): """ - :calls: `POST /repos/:owner/:repo/downloads `_ + :calls: `POST /repos/:owner/:repo/downloads `_ :param name: string :param size: integer :param description: string @@ -368,7 +368,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def create_git_blob(self, content, encoding): """ - :calls: `POST /repos/:owner/:repo/git/blobs `_ + :calls: `POST /repos/:owner/:repo/git/blobs `_ :param content: string :param encoding: string :rtype: :class:`github.GitBlob.GitBlob` @@ -389,7 +389,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def create_git_commit(self, message, tree, parents, author=github.GithubObject.NotSet, committer=github.GithubObject.NotSet): """ - :calls: `POST /repos/:owner/:repo/git/commits `_ + :calls: `POST /repos/:owner/:repo/git/commits `_ :param message: string :param tree: :class:`github.GitTree.GitTree` :param parents: list of :class:`github.GitCommit.GitCommit` @@ -421,7 +421,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def create_git_ref(self, ref, sha): """ - :calls: `POST /repos/:owner/:repo/git/refs `_ + :calls: `POST /repos/:owner/:repo/git/refs `_ :param ref: string :param sha: string :rtype: :class:`github.GitRef.GitRef` @@ -442,7 +442,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def create_git_tag(self, tag, message, object, type, tagger=github.GithubObject.NotSet): """ - :calls: `POST /repos/:owner/:repo/git/tags `_ + :calls: `POST /repos/:owner/:repo/git/tags `_ :param tag: string :param message: string :param object: string @@ -473,7 +473,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def create_git_tree(self, tree, base_tree=github.GithubObject.NotSet): """ - :calls: `POST /repos/:owner/:repo/git/trees `_ + :calls: `POST /repos/:owner/:repo/git/trees `_ :param tree: list of :class:`github.InputGitTreeElement.InputGitTreeElement` :param base_tree: :class:`github.GitTree.GitTree` :rtype: :class:`github.GitTree.GitTree` @@ -495,7 +495,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def create_hook(self, name, config, events=github.GithubObject.NotSet, active=github.GithubObject.NotSet): """ - :calls: `POST /repos/:owner/:repo/hooks `_ + :calls: `POST /repos/:owner/:repo/hooks `_ :param name: string :param config: dict :param events: list of string @@ -524,7 +524,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def create_issue(self, title, body=github.GithubObject.NotSet, assignee=github.GithubObject.NotSet, milestone=github.GithubObject.NotSet, labels=github.GithubObject.NotSet): """ - :calls: `POST /repos/:owner/:repo/issues `_ + :calls: `POST /repos/:owner/:repo/issues `_ :param title: string :param body: string :param assignee: :class:`github.NamedUser.NamedUser` @@ -558,7 +558,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def create_key(self, title, key): """ - :calls: `POST /repos/:owner/:repo/keys `_ + :calls: `POST /repos/:owner/:repo/keys `_ :param title: string :param key: string :rtype: :class:`github.RepositoryKey.RepositoryKey` @@ -579,7 +579,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def create_label(self, name, color): """ - :calls: `POST /repos/:owner/:repo/labels `_ + :calls: `POST /repos/:owner/:repo/labels `_ :param name: string :param color: string :rtype: :class:`github.Label.Label` @@ -600,7 +600,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def create_milestone(self, title, state=github.GithubObject.NotSet, description=github.GithubObject.NotSet, due_on=github.GithubObject.NotSet): """ - :calls: `POST /repos/:owner/:repo/milestones `_ + :calls: `POST /repos/:owner/:repo/milestones `_ :param title: string :param state: string :param description: string @@ -630,7 +630,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def create_pull(self, *args, **kwds): """ - :calls: `POST /repos/:owner/:repo/pulls `_ + :calls: `POST /repos/:owner/:repo/pulls `_ :param title: string :param body: string :param issue: :class:`github.Issue.Issue` @@ -668,7 +668,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def delete(self): """ - :calls: `DELETE /repos/:owner/:repo `_ + :calls: `DELETE /repos/:owner/:repo `_ :rtype: None """ headers, data = self._requester.requestJsonAndCheck( @@ -680,7 +680,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def edit(self, name, description=github.GithubObject.NotSet, homepage=github.GithubObject.NotSet, public=github.GithubObject.NotSet, has_issues=github.GithubObject.NotSet, has_wiki=github.GithubObject.NotSet, has_downloads=github.GithubObject.NotSet, default_branch=github.GithubObject.NotSet): """ - :calls: `PATCH /repos/:owner/:repo `_ + :calls: `PATCH /repos/:owner/:repo `_ :param name: string :param description: string :param homepage: string @@ -726,7 +726,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_archive_link(self, archive_format, ref=github.GithubObject.NotSet): """ - :calls: `GET /repos/:owner/:repo/:archive_format/:ref `_ + :calls: `GET /repos/:owner/:repo/:archive_format/:ref `_ :param archive_format: string :param ref: string :rtype: string @@ -746,7 +746,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_assignees(self): """ - :calls: `GET /repos/:owner/:repo/assignees `_ + :calls: `GET /repos/:owner/:repo/assignees `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser` """ return github.PaginatedList.PaginatedList( @@ -758,7 +758,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_branch(self, branch): """ - :calls: `GET /repos/:owner/:repo/branches/:branch `_ + :calls: `GET /repos/:owner/:repo/branches/:branch `_ :param branch: string :rtype: :class:`github.Branch.Branch` """ @@ -773,7 +773,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_branches(self): """ - :calls: `GET /repos/:owner/:repo/branches `_ + :calls: `GET /repos/:owner/:repo/branches `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Branch.Branch` """ return github.PaginatedList.PaginatedList( @@ -785,7 +785,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_collaborators(self): """ - :calls: `GET /repos/:owner/:repo/collaborators `_ + :calls: `GET /repos/:owner/:repo/collaborators `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser` """ return github.PaginatedList.PaginatedList( @@ -797,7 +797,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_comment(self, id): """ - :calls: `GET /repos/:owner/:repo/comments/:id `_ + :calls: `GET /repos/:owner/:repo/comments/:id `_ :param id: integer :rtype: :class:`github.CommitComment.CommitComment` """ @@ -812,7 +812,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_comments(self): """ - :calls: `GET /repos/:owner/:repo/comments `_ + :calls: `GET /repos/:owner/:repo/comments `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.CommitComment.CommitComment` """ return github.PaginatedList.PaginatedList( @@ -824,7 +824,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_commit(self, sha): """ - :calls: `GET /repos/:owner/:repo/commits/:sha `_ + :calls: `GET /repos/:owner/:repo/commits/:sha `_ :param sha: string :rtype: :class:`github.Commit.Commit` """ @@ -839,7 +839,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_commits(self, sha=github.GithubObject.NotSet, path=github.GithubObject.NotSet): """ - :calls: `GET /repos/:owner/:repo/commits `_ + :calls: `GET /repos/:owner/:repo/commits `_ :param sha: string :param path: string :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Commit.Commit` @@ -860,7 +860,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_contents(self, path, ref=github.GithubObject.NotSet): """ - :calls: `GET /repos/:owner/:repo/contents/:path `_ + :calls: `GET /repos/:owner/:repo/contents/:path `_ :param path: string :param ref: string :rtype: :class:`github.ContentFile.ContentFile` @@ -869,7 +869,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_file_contents(self, path, ref=github.GithubObject.NotSet): """ - :calls: `GET /repos/:owner/:repo/contents/:path `_ + :calls: `GET /repos/:owner/:repo/contents/:path `_ :param path: string :param ref: string :rtype: :class:`github.ContentFile.ContentFile` @@ -889,7 +889,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_dir_contents(self, path, ref=github.GithubObject.NotSet): """ - :calls: `GET /repos/:owner/:repo/contents/:path `_ + :calls: `GET /repos/:owner/:repo/contents/:path `_ :param path: string :param ref: string :rtype: list of :class:`github.ContentFile.ContentFile` @@ -922,7 +922,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_contributors(self): """ - :calls: `GET /repos/:owner/:repo/contributors `_ + :calls: `GET /repos/:owner/:repo/contributors `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser` """ return github.PaginatedList.PaginatedList( @@ -934,7 +934,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_download(self, id): """ - :calls: `GET /repos/:owner/:repo/downloads/:id `_ + :calls: `GET /repos/:owner/:repo/downloads/:id `_ :param id: integer :rtype: :class:`github.Download.Download` """ @@ -949,7 +949,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_downloads(self): """ - :calls: `GET /repos/:owner/:repo/downloads `_ + :calls: `GET /repos/:owner/:repo/downloads `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Download.Download` """ return github.PaginatedList.PaginatedList( @@ -961,7 +961,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_events(self): """ - :calls: `GET /repos/:owner/:repo/events `_ + :calls: `GET /repos/:owner/:repo/events `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Event.Event` """ return github.PaginatedList.PaginatedList( @@ -973,7 +973,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_forks(self): """ - :calls: `GET /repos/:owner/:repo/forks `_ + :calls: `GET /repos/:owner/:repo/forks `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Repository.Repository` """ return github.PaginatedList.PaginatedList( @@ -985,7 +985,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_git_blob(self, sha): """ - :calls: `GET /repos/:owner/:repo/git/blobs/:sha `_ + :calls: `GET /repos/:owner/:repo/git/blobs/:sha `_ :param sha: string :rtype: :class:`github.GitBlob.GitBlob` """ @@ -1000,7 +1000,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_git_commit(self, sha): """ - :calls: `GET /repos/:owner/:repo/git/commits/:sha `_ + :calls: `GET /repos/:owner/:repo/git/commits/:sha `_ :param sha: string :rtype: :class:`github.GitCommit.GitCommit` """ @@ -1015,7 +1015,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_git_ref(self, ref): """ - :calls: `GET /repos/:owner/:repo/git/refs/:ref `_ + :calls: `GET /repos/:owner/:repo/git/refs/:ref `_ :param ref: string :rtype: :class:`github.GitRef.GitRef` """ @@ -1033,7 +1033,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_git_refs(self): """ - :calls: `GET /repos/:owner/:repo/git/refs `_ + :calls: `GET /repos/:owner/:repo/git/refs `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.GitRef.GitRef` """ return github.PaginatedList.PaginatedList( @@ -1045,7 +1045,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_git_tag(self, sha): """ - :calls: `GET /repos/:owner/:repo/git/tags/:sha `_ + :calls: `GET /repos/:owner/:repo/git/tags/:sha `_ :param sha: string :rtype: :class:`github.GitTag.GitTag` """ @@ -1060,7 +1060,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_git_tree(self, sha, recursive=github.GithubObject.NotSet): """ - :calls: `GET /repos/:owner/:repo/git/trees/:sha `_ + :calls: `GET /repos/:owner/:repo/git/trees/:sha `_ :param sha: string :param recursive: bool :rtype: :class:`github.GitTree.GitTree` @@ -1080,7 +1080,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_hook(self, id): """ - :calls: `GET /repos/:owner/:repo/hooks/:id `_ + :calls: `GET /repos/:owner/:repo/hooks/:id `_ :param id: integer :rtype: :class:`github.Hook.Hook` """ @@ -1095,7 +1095,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_hooks(self): """ - :calls: `GET /repos/:owner/:repo/hooks `_ + :calls: `GET /repos/:owner/:repo/hooks `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Hook.Hook` """ return github.PaginatedList.PaginatedList( @@ -1107,7 +1107,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_issue(self, number): """ - :calls: `GET /repos/:owner/:repo/issues/:number `_ + :calls: `GET /repos/:owner/:repo/issues/:number `_ :param number: integer :rtype: :class:`github.Issue.Issue` """ @@ -1122,7 +1122,7 @@ class Repository(github.GithubObject.CompletableGithubObject): 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): """ - :calls: `GET /repos/:owner/:repo/issues `_ + :calls: `GET /repos/:owner/:repo/issues `_ :param milestone: :class:`github.Milestone.Milestone` or "none" or "*" :param state: string :param assignee: :class:`github.NamedUser.NamedUser` or "none" or "*" @@ -1173,7 +1173,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_issues_comments(self, sort=github.GithubObject.NotSet, direction=github.GithubObject.NotSet, since=github.GithubObject.NotSet): """ - :calls: `GET /repos/:owner/:repo/issues/comments `_ + :calls: `GET /repos/:owner/:repo/issues/comments `_ :param sort: string :param direction: string :param since: datetime.datetime @@ -1198,7 +1198,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_issues_event(self, id): """ - :calls: `GET /repos/:owner/:repo/issues/events/:id `_ + :calls: `GET /repos/:owner/:repo/issues/events/:id `_ :param id: integer :rtype: :class:`github.IssueEvent.IssueEvent` """ @@ -1213,7 +1213,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_issues_events(self): """ - :calls: `GET /repos/:owner/:repo/issues/events `_ + :calls: `GET /repos/:owner/:repo/issues/events `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.IssueEvent.IssueEvent` """ return github.PaginatedList.PaginatedList( @@ -1225,7 +1225,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_key(self, id): """ - :calls: `GET /repos/:owner/:repo/keys/:id `_ + :calls: `GET /repos/:owner/:repo/keys/:id `_ :param id: integer :rtype: :class:`github.RepositoryKey.RepositoryKey` """ @@ -1240,7 +1240,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_keys(self): """ - :calls: `GET /repos/:owner/:repo/keys `_ + :calls: `GET /repos/:owner/:repo/keys `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.RepositoryKey.RepositoryKey` """ return github.PaginatedList.PaginatedList( @@ -1252,7 +1252,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_label(self, name): """ - :calls: `GET /repos/:owner/:repo/labels/:name `_ + :calls: `GET /repos/:owner/:repo/labels/:name `_ :param name: string :rtype: :class:`github.Label.Label` """ @@ -1267,7 +1267,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_labels(self): """ - :calls: `GET /repos/:owner/:repo/labels `_ + :calls: `GET /repos/:owner/:repo/labels `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Label.Label` """ return github.PaginatedList.PaginatedList( @@ -1279,7 +1279,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_languages(self): """ - :calls: `GET /repos/:owner/:repo/languages `_ + :calls: `GET /repos/:owner/:repo/languages `_ :rtype: dict of string to integer """ headers, data = self._requester.requestJsonAndCheck( @@ -1292,7 +1292,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_milestone(self, number): """ - :calls: `GET /repos/:owner/:repo/milestones/:number `_ + :calls: `GET /repos/:owner/:repo/milestones/:number `_ :param number: integer :rtype: :class:`github.Milestone.Milestone` """ @@ -1307,7 +1307,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_milestones(self, state=github.GithubObject.NotSet, sort=github.GithubObject.NotSet, direction=github.GithubObject.NotSet): """ - :calls: `GET /repos/:owner/:repo/milestones `_ + :calls: `GET /repos/:owner/:repo/milestones `_ :param state: string :param sort: string :param direction: string @@ -1332,7 +1332,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_network_events(self): """ - :calls: `GET /networks/:owner/:repo/events `_ + :calls: `GET /networks/:owner/:repo/events `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Event.Event` """ return github.PaginatedList.PaginatedList( @@ -1344,7 +1344,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_pull(self, number): """ - :calls: `GET /repos/:owner/:repo/pulls/:number `_ + :calls: `GET /repos/:owner/:repo/pulls/:number `_ :param number: integer :rtype: :class:`github.PullRequest.PullRequest` """ @@ -1359,7 +1359,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_pulls(self, state=github.GithubObject.NotSet): """ - :calls: `GET /repos/:owner/:repo/pulls `_ + :calls: `GET /repos/:owner/:repo/pulls `_ :param state: string :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.PullRequest.PullRequest` """ @@ -1376,7 +1376,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_pulls_comments(self, sort=github.GithubObject.NotSet, direction=github.GithubObject.NotSet, since=github.GithubObject.NotSet): """ - :calls: `GET /repos/:owner/:repo/pulls/comments `_ + :calls: `GET /repos/:owner/:repo/pulls/comments `_ :param sort: string :param direction: string :param since: datetime.datetime @@ -1386,7 +1386,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_pulls_review_comments(self, sort=github.GithubObject.NotSet, direction=github.GithubObject.NotSet, since=github.GithubObject.NotSet): """ - :calls: `GET /repos/:owner/:repo/pulls/comments `_ + :calls: `GET /repos/:owner/:repo/pulls/comments `_ :param sort: string :param direction: string :param since: datetime.datetime @@ -1411,7 +1411,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_readme(self, ref=github.GithubObject.NotSet): """ - :calls: `GET /repos/:owner/:repo/readme `_ + :calls: `GET /repos/:owner/:repo/readme `_ :param ref: string :rtype: :class:`github.ContentFile.ContentFile` """ @@ -1429,7 +1429,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_stargazers(self): """ - :calls: `GET /repos/:owner/:repo/stargazers `_ + :calls: `GET /repos/:owner/:repo/stargazers `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser` """ return github.PaginatedList.PaginatedList( @@ -1441,7 +1441,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_subscribers(self): """ - :calls: `GET /repos/:owner/:repo/subscribers `_ + :calls: `GET /repos/:owner/:repo/subscribers `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser` """ return github.PaginatedList.PaginatedList( @@ -1453,7 +1453,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_tags(self): """ - :calls: `GET /repos/:owner/:repo/tags `_ + :calls: `GET /repos/:owner/:repo/tags `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Tag.Tag` """ return github.PaginatedList.PaginatedList( @@ -1465,7 +1465,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_teams(self): """ - :calls: `GET /repos/:owner/:repo/teams `_ + :calls: `GET /repos/:owner/:repo/teams `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Team.Team` """ return github.PaginatedList.PaginatedList( @@ -1477,7 +1477,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_watchers(self): """ - :calls: `GET /repos/:owner/:repo/watchers `_ + :calls: `GET /repos/:owner/:repo/watchers `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser` """ return github.PaginatedList.PaginatedList( @@ -1489,7 +1489,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def has_in_assignees(self, assignee): """ - :calls: `GET /repos/:owner/:repo/assignees/:assignee `_ + :calls: `GET /repos/:owner/:repo/assignees/:assignee `_ :param assignee: :class:`github.NamedUser.NamedUser` :rtype: bool """ @@ -1504,7 +1504,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def has_in_collaborators(self, collaborator): """ - :calls: `GET /repos/:owner/:repo/collaborators/:user `_ + :calls: `GET /repos/:owner/:repo/collaborators/:user `_ :param collaborator: :class:`github.NamedUser.NamedUser` :rtype: bool """ @@ -1519,7 +1519,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def legacy_search_issues(self, state, keyword): """ - :calls: `GET /legacy/issues/search/:owner/:repository/:state/:keyword `_ + :calls: `GET /legacy/issues/search/:owner/:repository/:state/:keyword `_ :param state: "open" or "closed" :param keyword: string :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Issue.Issue` @@ -1539,7 +1539,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def merge(self, base, head, commit_message=github.GithubObject.NotSet): """ - :calls: `POST /repos/:owner/:repo/merges `_ + :calls: `POST /repos/:owner/:repo/merges `_ :param base: string :param head: string :param commit_message: string @@ -1567,7 +1567,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def remove_from_collaborators(self, collaborator): """ - :calls: `DELETE /repos/:owner/:repo/collaborators/:user `_ + :calls: `DELETE /repos/:owner/:repo/collaborators/:user `_ :param collaborator: :class:`github.NamedUser.NamedUser` :rtype: None """ @@ -1581,7 +1581,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def subscribe_to_hub(self, event, callback, secret=github.GithubObject.NotSet): """ - :calls: `POST /hub `_ + :calls: `POST /hub `_ :param event: string :param callback: string :param secret: string @@ -1591,7 +1591,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def unsubscribe_from_hub(self, event, callback): """ - :calls: `POST /hub `_ + :calls: `POST /hub `_ :param event: string :param callback: string :param secret: string diff --git a/github/RepositoryKey.py b/github/RepositoryKey.py index 00da76b8..750541b2 100644 --- a/github/RepositoryKey.py +++ b/github/RepositoryKey.py @@ -83,7 +83,7 @@ class RepositoryKey(github.GithubObject.CompletableGithubObject): def delete(self): """ - :calls: `DELETE /repos/:owner/:repo/keys/:id `_ + :calls: `DELETE /repos/:owner/:repo/keys/:id `_ :rtype: None """ headers, data = self._requester.requestJsonAndCheck( @@ -95,7 +95,7 @@ class RepositoryKey(github.GithubObject.CompletableGithubObject): def edit(self, title=github.GithubObject.NotSet, key=github.GithubObject.NotSet): """ - :calls: `PATCH /repos/:owner/:repo/keys/:id `_ + :calls: `PATCH /repos/:owner/:repo/keys/:id `_ :param title: string :param key: string :rtype: None diff --git a/github/Team.py b/github/Team.py index 4c570426..b6d681d6 100644 --- a/github/Team.py +++ b/github/Team.py @@ -86,7 +86,7 @@ class Team(github.GithubObject.CompletableGithubObject): def add_to_members(self, member): """ - :calls: `PUT /teams/:id/members/:user `_ + :calls: `PUT /teams/:id/members/:user `_ :param member: :class:`github.NamedUser.NamedUser` :rtype: None """ @@ -100,7 +100,7 @@ class Team(github.GithubObject.CompletableGithubObject): def add_to_repos(self, repo): """ - :calls: `PUT /teams/:id/repos/:org/:repo `_ + :calls: `PUT /teams/:id/repos/:org/:repo `_ :param repo: :class:`github.Repository.Repository` :rtype: None """ @@ -114,7 +114,7 @@ class Team(github.GithubObject.CompletableGithubObject): def delete(self): """ - :calls: `DELETE /teams/:id `_ + :calls: `DELETE /teams/:id `_ :rtype: None """ headers, data = self._requester.requestJsonAndCheck( @@ -126,7 +126,7 @@ class Team(github.GithubObject.CompletableGithubObject): def edit(self, name, permission=github.GithubObject.NotSet): """ - :calls: `PATCH /teams/:id `_ + :calls: `PATCH /teams/:id `_ :param name: string :param permission: string :rtype: None @@ -148,7 +148,7 @@ class Team(github.GithubObject.CompletableGithubObject): def get_members(self): """ - :calls: `GET /teams/:id/members `_ + :calls: `GET /teams/:id/members `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser` """ return github.PaginatedList.PaginatedList( @@ -160,7 +160,7 @@ class Team(github.GithubObject.CompletableGithubObject): def get_repos(self): """ - :calls: `GET /teams/:id/repos `_ + :calls: `GET /teams/:id/repos `_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Repository.Repository` """ return github.PaginatedList.PaginatedList( @@ -172,7 +172,7 @@ class Team(github.GithubObject.CompletableGithubObject): def has_in_members(self, member): """ - :calls: `GET /teams/:id/members/:user `_ + :calls: `GET /teams/:id/members/:user `_ :param member: :class:`github.NamedUser.NamedUser` :rtype: bool """ @@ -187,7 +187,7 @@ class Team(github.GithubObject.CompletableGithubObject): def has_in_repos(self, repo): """ - :calls: `GET /teams/:id/repos/:owner/:repo `_ + :calls: `GET /teams/:id/repos/:owner/:repo `_ :param repo: :class:`github.Repository.Repository` :rtype: bool """ @@ -202,7 +202,7 @@ class Team(github.GithubObject.CompletableGithubObject): def remove_from_members(self, member): """ - :calls: `DELETE /teams/:id/members/:user `_ + :calls: `DELETE /teams/:id/members/:user `_ :param member: :class:`github.NamedUser.NamedUser` :rtype: None """ @@ -216,7 +216,7 @@ class Team(github.GithubObject.CompletableGithubObject): def remove_from_repos(self, repo): """ - :calls: `DELETE /teams/:id/repos/:owner/:repo `_ + :calls: `DELETE /teams/:id/repos/:owner/:repo `_ :param repo: :class:`github.Repository.Repository` :rtype: None """ diff --git a/github/UserKey.py b/github/UserKey.py index 2ff2f687..222cd1a5 100644 --- a/github/UserKey.py +++ b/github/UserKey.py @@ -74,7 +74,7 @@ class UserKey(github.GithubObject.CompletableGithubObject): def delete(self): """ - :calls: `DELETE /user/keys/:id `_ + :calls: `DELETE /user/keys/:id `_ :rtype: None """ headers, data = self._requester.requestJsonAndCheck( @@ -86,7 +86,7 @@ class UserKey(github.GithubObject.CompletableGithubObject): def edit(self, title=github.GithubObject.NotSet, key=github.GithubObject.NotSet): """ - :calls: `PATCH /user/keys/:id `_ + :calls: `PATCH /user/keys/:id `_ :param title: string :param key: string :rtype: None From 51a9ef2439e76678c1a49e858cc106d56e622741 Mon Sep 17 00:00:00 2001 From: Vincent Jacques Date: Wed, 17 Jul 2013 09:41:16 +0200 Subject: [PATCH 8/8] Update readme with missing URLs --- README.rst | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index fb65f1c3..b179bd1f 100644 --- a/README.rst +++ b/README.rst @@ -1,7 +1,7 @@ This is a Python (2 and 3) library to access the `Github API v3 `_. With it, you can manage your `Github `_ resources (repositories, user profiles, organizations, etc.) from Python scripts. -It covers the **full** API, and all methods are tested against the real Github site. +It covers the **full** API (except recent additions, see "What's missing" bellow), and all methods are tested against the real Github site. Should you have any question, any remark, or if you find a bug, or if there is something you can do with the API but not with PyGithub, please `open an issue `_. @@ -24,6 +24,62 @@ That's because I'm traveling a lot this summer. Please be patient. * `Implement `_ API ``/user`` in ``Github.get_users``. Thank you `rakeshcusat `_ for asking * `Improve `_ the documentation. Thank you `martinqt `_ +What's missing? +=============== + +We now have automated ways to list URLs documented in `the reference of Github API v3 `_ and not covered by PyGithub. + +Github API v3 URLs not (yet) covered by PyGithub +------------------------------------------------ + +* ``/applications/:client_id/tokens/:access_token`` (GET) +* ``/feeds`` (GET) +* ``/gists/:id/forks`` (POST) + + * instead, ``Gist.create_fork`` calls the old URL ``/gists/:id/fork`` + +* ``/meta`` (GET) +* ``/notifications`` (PUT) +* ``/notifications/emails`` (GET) +* ``/notifications/emails`` (PATCH) +* ``/notifications/global/emails`` (GET) +* ``/notifications/global/emails`` (PUT) +* ``/notifications/organization/:org/emails`` (GET) +* ``/notifications/organization/:org/emails`` (PUT) +* ``/notifications/settings`` (GET) +* ``/notifications/settings`` (PATCH) +* ``/notifications/threads/:id`` (PATCH) +* ``/notifications/threads/:id/subscription`` (DELETE) +* ``/notifications/threads/:id/subscription`` (GET) +* ``/notifications/threads/:id/subscription`` (PUT) +* ``/rate_limit`` (GET) + + * should be called in method ``Github.get_rate_limit``. See also ``Github.rate_limiting`` + +* ``/repos/:owner/:repo/contents/:path`` (DELETE) +* ``/repos/:owner/:repo/contents/:path`` (PUT) +* ``/repos/:owner/:repo/hooks/:id/tests`` (POST) + + * instead, ``Hook.test`` calls the old URL ``/repos/:owner/:repo/hooks/:id/test`` + +* ``/repos/:owner/:repo/notifications`` (GET) +* ``/repos/:owner/:repo/notifications`` (PUT) +* ``/repos/:owner/:repo/stats/code_frequency`` (GET) +* ``/repos/:owner/:repo/stats/commit_activity`` (GET) +* ``/repos/:owner/:repo/stats/contributors`` (GET) +* ``/repos/:owner/:repo/stats/participation`` (GET) +* ``/repos/:owner/:repo/stats/punch_card`` (GET) +* ``/repos/:owner/:repo/subscription`` (DELETE) +* ``/repos/:owner/:repo/subscription`` (GET) +* ``/repos/:owner/:repo/subscription`` (PUT) +* ``/repositories`` (GET) + + * should be called in method ``Github.get_repos`` + +* ``/users/:user/following/:target_user`` (GET) + + * should be called in method ``NamedUser.has_in_following`` + Documentation =============