Merge branch 'topic/CompareToReferenceDoc' into develop

This commit is contained in:
Vincent Jacques
2013-07-17 09:42:18 +02:00
30 changed files with 482 additions and 884 deletions
+1
View File
@@ -27,3 +27,4 @@ GithubCredentials.py
/MANIFEST
/PyGithub.egg-info/
/.coverage
/developer.github.com/
+57 -1
View File
@@ -1,7 +1,7 @@
This is a Python (2 and 3) library to access the `Github API v3 <http://developer.github.com/v3>`_.
With it, you can manage your `Github <http://github.com>`_ 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 <https://github.com/jacquev6/PyGithub/issues>`_.
@@ -24,6 +24,62 @@ That's because I'm traveling a lot this summer. Please be patient.
* `Implement <https://github.com/jacquev6/PyGithub/issues/173>`_ API ``/user`` in ``Github.get_users``. Thank you `rakeshcusat <https://github.com/rakeshcusat>`_ for asking
* `Improve <https://github.com/jacquev6/PyGithub/pull/171>`_ the documentation. Thank you `martinqt <https://github.com/martinqt>`_
What's missing?
===============
We now have automated ways to list URLs documented in `the reference of Github API v3 <http://developer.github.com>`_ 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
=============
+3 -2
View File
@@ -21,5 +21,6 @@
################################################################################
/build/
github_objects.rst
contributing.rst
/github_objects.rst
/contributing.rst
/apis.rst
-638
View File
@@ -1,638 +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/: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`
* ``/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/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`
* ``/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: see ``/markdown``
* ``/networks/:user/: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: :meth:Ngithub.ot ot implemented, see `Github.rate_limiting`
* ``/repos/:user/: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``
* GET: :meth:`github.Repository.Repository.get_archive_link`
* ``/repos/:user/:repo/assignees``
* GET: :meth:`github.Repository.Repository.get_assignees`
* ``/repos/:user/:repo/assignees/:assignee``
* GET: :meth:`github.Repository.Repository.has_in_assignees`
* ``/repos/:user/:repo/branches``
* GET: :meth:`github.Repository.Repository.get_branches`
* ``/repos/:user/:repo/branches/:branch``
* GET: :meth:`github.Repository.Repository.get_branch`
* ``/repos/:user/:repo/collaborators``
* GET: :meth:`github.Repository.Repository.get_collaborators`
* ``/repos/:user/: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``
* GET: :meth:`github.Repository.Repository.get_comments`
* ``/repos/:user/: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``
* GET: :meth:`github.Repository.Repository.get_commits`
* ``/repos/:user/:repo/commits/:sha``
* GET: :meth:`github.Repository.Repository.get_commit`
* ``/repos/:user/:repo/commits/:sha/comments``
* GET: :meth:`github.Commit.Commit.get_comments`
* POST: :meth:`github.Commit.Commit.create_comment`
* ``/repos/:user/:repo/compare/:base...:head``
* GET: :meth:`github.Repository.Repository.compare`
* ``/repos/:user/: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``
* GET: :meth:`github.Repository.Repository.get_contributors`
* ``/repos/:user/:repo/downloads``
* GET: :meth:`github.Repository.Repository.get_downloads`
* POST: :meth:`github.Repository.Repository.create_download`
* ``/repos/:user/:repo/downloads/:id``
* GET: :meth:`github.Repository.Repository.get_download`
* DELETE: :meth:`github.Download.Download.delete`
* ``/repos/:user/:repo/events``
* GET: :meth:`github.Repository.Repository.get_events`
* ``/repos/:user/: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``
* POST: :meth:`github.Repository.Repository.create_git_blob`
* ``/repos/:user/:repo/git/blobs/:sha``
* GET: :meth:`github.Repository.Repository.get_git_blob`
* ``/repos/:user/:repo/git/commits``
* POST: :meth:`github.Repository.Repository.create_git_commit`
* ``/repos/:user/:repo/git/commits/:sha``
* GET: :meth:`github.Repository.Repository.get_git_commit`
* ``/repos/:user/: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``
* 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``
* POST: :meth:`github.Repository.Repository.create_git_tag`
* ``/repos/:user/:repo/git/tags/:sha``
* GET: :meth:`github.Repository.Repository.get_git_tag`
* ``/repos/:user/:repo/git/trees``
* POST: :meth:`github.Repository.Repository.create_git_tree`
* ``/repos/:user/:repo/git/trees/:sha``
* GET: :meth:`github.Repository.Repository.get_git_tree`
* ``/repos/:user/:repo/hooks``
* GET: :meth:`github.Repository.Repository.get_hooks`
* POST: :meth:`github.Repository.Repository.create_hook`
* ``/repos/:user/: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``
* POST: :meth:`github.Hook.Hook.test`
* ``/repos/:user/:repo/issues``
* GET: :meth:`github.Repository.Repository.get_issues`
* POST: :meth:`github.Repository.Repository.create_issue`
* ``/repos/:user/:repo/issues/:number``
* GET: :meth:`github.Repository.Repository.get_issue`
* PATCH: :meth:`github.Issue.Issue.edit`
* ``/repos/:user/: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``
* 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``
* DELETE: :meth:`github.Issue.Issue.remove_from_labels`
* ``/repos/:user/:repo/issues/comments``
* GET: :meth:`github.Repository.Repository.get_issues_comments`
* ``/repos/:user/: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``
* GET: :meth:`github.Repository.Repository.get_issues_events`
* ``/repos/:user/:repo/issues/events/:id``
* GET: :meth:`github.Repository.Repository.get_issues_event`
* ``/repos/:user/:repo/keys``
* GET: :meth:`github.Repository.Repository.get_keys`
* POST: :meth:`github.Repository.Repository.create_key`
* ``/repos/:user/: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``
* GET: :meth:`github.Repository.Repository.get_labels`
* POST: :meth:`github.Repository.Repository.create_label`
* ``/repos/:user/: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``
* GET: :meth:`github.Repository.Repository.get_languages`
* ``/repos/:user/:repo/merges``
* POST: :meth:`github.Repository.Repository.merge`
* ``/repos/:user/:repo/milestones``
* GET: :meth:`github.Repository.Repository.get_milestones`
* POST: :meth:`github.Repository.Repository.create_milestone`
* ``/repos/:user/: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``
* GET: :meth:`github.Milestone.Milestone.get_labels`
* ``/repos/:user/:repo/pulls``
* GET: :meth:`github.Repository.Repository.get_pulls`
* POST: :meth:`github.Repository.Repository.create_pull`
* ``/repos/:user/:repo/pulls/:number``
* GET: :meth:`github.Repository.Repository.get_pull`
* PATCH: :meth:`github.PullRequest.PullRequest.edit`
* ``/repos/:user/: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``
* GET: :meth:`github.PullRequest.PullRequest.get_commits`
* ``/repos/:user/:repo/pulls/:number/files``
* GET: :meth:`github.PullRequest.PullRequest.get_files`
* ``/repos/:user/:repo/pulls/:number/merge``
* GET: :meth:`github.PullRequest.PullRequest.is_merged`
* PUT: :meth:`github.PullRequest.PullRequest.merge`
* ``/repos/:user/: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``
* 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``
* GET: :meth:`github.Repository.Repository.get_readme`
* ``/repos/:user/:repo/stargazers``
* GET: :meth:`github.Repository.Repository.get_stargazers`
* ``/repos/:user/:repo/statuses/:sha``
* GET: :meth:`github.Commit.Commit.get_statuses`
* POST: :meth:`github.Commit.Commit.create_status`
* ``/repos/:user/:repo/subscribers``
* GET: :meth:`github.Repository.Repository.get_subscribers`
* ``/repos/:user/:repo/tags``
* GET: :meth:`github.Repository.Repository.get_tags`
* ``/repos/:user/:repo/teams``
* GET: :meth:`github.Repository.Repository.get_teams`
* ``/repos/:user/: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/:user/: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``
* 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/:user/: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/:user/: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/:user/: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`
+4 -4
View File
@@ -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 <https://github.com/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 <https://github.com/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 <https://github.com/jacquev6/PyGithub/issues?milestone-17&state-closed>`_ (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
+79 -15
View File
@@ -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")
+41 -41
View File
@@ -247,7 +247,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
def add_to_emails(self, *emails):
"""
:calls: `POST /user/emails <http://developer.github.com/v3/todo>`_
:calls: `POST /user/emails <http://developer.github.com/v3/users/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 <http://developer.github.com/v3/todo>`_
:calls: `PUT /user/following/:user <http://developer.github.com/v3/users/followers>`_
: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/:user/:repo <http://developer.github.com/v3/todo>`_
:calls: `PUT /user/starred/:owner/:repo <http://developer.github.com/v3/activity/starring>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `PUT /user/subscriptions/:owner/:repo <http://developer.github.com/v3/activity/watching>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `PUT /user/watched/:owner/:repo <http://developer.github.com/v3/activity/starring>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `POST /authorizations <http://developer.github.com/v3/oauth>`_
: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/:user/:repo/forks <http://developer.github.com/v3/todo>`_
:calls: `POST /repos/:owner/:repo/forks <http://developer.github.com/v3/repos/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 <http://developer.github.com/v3/todo>`_
:calls: `POST /gists <http://developer.github.com/v3/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 <http://developer.github.com/v3/todo>`_
:calls: `POST /user/keys <http://developer.github.com/v3/users/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 <http://developer.github.com/v3/todo>`_
:calls: `POST /user/repos <http://developer.github.com/v3/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 <http://developer.github.com/v3/todo>`_
:calls: `PATCH /user <http://developer.github.com/v3/users>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /authorizations/:id <http://developer.github.com/v3/oauth>`_
:param id: integer
:rtype: :class:`github.Authorization.Authorization`
"""
@@ -520,7 +520,7 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
def get_authorizations(self):
"""
:calls: `GET /authorizations <http://developer.github.com/v3/todo>`_
:calls: `GET /authorizations <http://developer.github.com/v3/oauth>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /user/emails <http://developer.github.com/v3/users/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 <http://developer.github.com/v3/todo>`_
:calls: `GET /events <http://developer.github.com/v3/activity/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 <http://developer.github.com/v3/todo>`_
:calls: `GET /user/followers <http://developer.github.com/v3/users/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 <http://developer.github.com/v3/todo>`_
:calls: `GET /user/following <http://developer.github.com/v3/users/followers>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /gists <http://developer.github.com/v3/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 <http://developer.github.com/v3/issues/#list-issues>`_
:calls: `GET /issues <http://developer.github.com/v3/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 <http://developer.github.com/v3/issues/#list-issues>`_
:calls: `GET /user/issues <http://developer.github.com/v3/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 <http://developer.github.com/v3/todo>`_
:calls: `GET /user/keys/:id <http://developer.github.com/v3/users/keys>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /user/keys <http://developer.github.com/v3/users/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 <http://developer.github.com/v3/activity/notifications/#view-a-single-thread>`_
:calls: `GET /notifications/threads/:id <http://developer.github.com/v3/activity/notifications>`_
: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 <http://developer.github.com/v3/activity/notifications/#list-your-notifications>`_
:calls: `GET /notifications <http://developer.github.com/v3/activity/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 <http://developer.github.com/v3/todo>`_
:calls: `GET /users/:user/events/orgs/:org <http://developer.github.com/v3/activity/events>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /user/orgs <http://developer.github.com/v3/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/:user/:repo <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo <http://developer.github.com/v3/repos>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /user/repos <http://developer.github.com/v3/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 <http://developer.github.com/v3/todo>`_
:calls: `GET /user/starred <http://developer.github.com/v3/activity/starring>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /gists/starred <http://developer.github.com/v3/gists>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /user/subscriptions <http://developer.github.com/v3/activity/watching>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /user/watched <http://developer.github.com/v3/activity/starring>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /user/following/:user <http://developer.github.com/v3/users/followers>`_
: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/:user/:repo <http://developer.github.com/v3/todo>`_
:calls: `GET /user/starred/:owner/:repo <http://developer.github.com/v3/activity/starring>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /user/subscriptions/:owner/:repo <http://developer.github.com/v3/activity/watching>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /user/watched/:owner/:repo <http://developer.github.com/v3/activity/starring>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `DELETE /user/emails <http://developer.github.com/v3/users/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 <http://developer.github.com/v3/todo>`_
:calls: `DELETE /user/following/:user <http://developer.github.com/v3/users/followers>`_
: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/:user/:repo <http://developer.github.com/v3/todo>`_
:calls: `DELETE /user/starred/:owner/:repo <http://developer.github.com/v3/activity/starring>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `DELETE /user/subscriptions/:owner/:repo <http://developer.github.com/v3/activity/watching>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `DELETE /user/watched/:owner/:repo <http://developer.github.com/v3/activity/starring>`_
:param watched: :class:`github.Repository.Repository`
:rtype: None
"""
+2 -2
View File
@@ -107,7 +107,7 @@ class Authorization(github.GithubObject.CompletableGithubObject):
def delete(self):
"""
:calls: `DELETE /authorizations/:id <http://developer.github.com/v3/todo>`_
:calls: `DELETE /authorizations/:id <http://developer.github.com/v3/oauth>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `PATCH /authorizations/:id <http://developer.github.com/v3/oauth>`_
:param scopes: list of string
:param add_scopes: list of string
:param remove_scopes: list of string
+4 -4
View File
@@ -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 <http://developer.github.com/v3/todo>`_
:calls: `POST /repos/:owner/:repo/commits/:sha/comments <http://developer.github.com/v3/repos/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 <http://developer.github.com/v3/todo>`_
:calls: `POST /repos/:owner/:repo/statuses/:sha <http://developer.github.com/v3/repos/statuses>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo/commits/:sha/comments <http://developer.github.com/v3/repos/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 <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo/statuses/:ref <http://developer.github.com/v3/repos/statuses>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.CommitStatus.CommitStatus`
"""
return github.PaginatedList.PaginatedList(
+2 -2
View File
@@ -123,7 +123,7 @@ class CommitComment(github.GithubObject.CompletableGithubObject):
def delete(self):
"""
:calls: `DELETE /repos/:user/:repo/comments/:id <http://developer.github.com/v3/todo>`_
:calls: `DELETE /repos/:owner/:repo/comments/:id <http://developer.github.com/v3/repos/comments>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `PATCH /repos/:owner/:repo/comments/:id <http://developer.github.com/v3/repos/comments>`_
:param body: string
:rtype: None
"""
+1 -1
View File
@@ -193,7 +193,7 @@ class Download(github.GithubObject.CompletableGithubObject):
def delete(self):
"""
:calls: `DELETE /repos/:user/:repo/downloads/:id <http://developer.github.com/v3/todo>`_
:calls: `DELETE /repos/:owner/:repo/downloads/:id <http://developer.github.com/v3/repos/downloads>`_
:rtype: None
"""
headers, data = self._requester.requestJsonAndCheck(
+8 -8
View File
@@ -160,7 +160,7 @@ class Gist(github.GithubObject.CompletableGithubObject):
def create_comment(self, body):
"""
:calls: `POST /gists/:id/comments <http://developer.github.com/v3/todo>`_
:calls: `POST /gists/:gist_id/comments <http://developer.github.com/v3/gists/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 <http://developer.github.com/v3/todo>`_
:calls: `DELETE /gists/:id <http://developer.github.com/v3/gists>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `PATCH /gists/:id <http://developer.github.com/v3/gists>`_
: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/comments/:id <http://developer.github.com/v3/todo>`_
:calls: `GET /gists/:gist_id/comments/:id <http://developer.github.com/v3/gists/comments>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /gists/:gist_id/comments <http://developer.github.com/v3/gists/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 <http://developer.github.com/v3/todo>`_
:calls: `GET /gists/:id/star <http://developer.github.com/v3/gists>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `DELETE /gists/:id/star <http://developer.github.com/v3/gists>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `PUT /gists/:id/star <http://developer.github.com/v3/gists>`_
:rtype: None
"""
headers, data = self._requester.requestJsonAndCheck(
+2 -2
View File
@@ -83,7 +83,7 @@ class GistComment(github.GithubObject.CompletableGithubObject):
def delete(self):
"""
:calls: `DELETE /gists/comments/:id <http://developer.github.com/v3/todo>`_
:calls: `DELETE /gists/:gist_id/comments/:id <http://developer.github.com/v3/gists/comments>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `PATCH /gists/:gist_id/comments/:id <http://developer.github.com/v3/gists/comments>`_
:param body: string
:rtype: None
"""
+2 -2
View File
@@ -59,7 +59,7 @@ class GitRef(github.GithubObject.CompletableGithubObject):
def delete(self):
"""
:calls: `DELETE /repos/:user/:repo/git/refs/:ref <http://developer.github.com/v3/todo>`_
:calls: `DELETE /repos/:owner/:repo/git/refs/:ref <http://developer.github.com/v3/git/refs>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `PATCH /repos/:owner/:repo/git/refs/:ref <http://developer.github.com/v3/git/refs>`_
:param sha: string
:param force: bool
:rtype: None
+3 -3
View File
@@ -107,7 +107,7 @@ class Hook(github.GithubObject.CompletableGithubObject):
def delete(self):
"""
:calls: `DELETE /repos/:user/:repo/hooks/:id <http://developer.github.com/v3/todo>`_
:calls: `DELETE /repos/:owner/:repo/hooks/:id <http://developer.github.com/v3/repos/hooks>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `PATCH /repos/:owner/:repo/hooks/:id <http://developer.github.com/v3/repos/hooks>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `POST /repos/:owner/:repo/hooks/:id/test <http://developer.github.com/v3/todo>`_
:rtype: None
"""
headers, data = self._requester.requestJsonAndCheck(
+10 -10
View File
@@ -188,7 +188,7 @@ class Issue(github.GithubObject.CompletableGithubObject):
def add_to_labels(self, *labels):
"""
:calls: `POST /repos/:user/:repo/issues/:number/labels <http://developer.github.com/v3/todo>`_
:calls: `POST /repos/:owner/:repo/issues/:number/labels <http://developer.github.com/v3/issues/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 <http://developer.github.com/v3/todo>`_
:calls: `POST /repos/:owner/:repo/issues/:number/comments <http://developer.github.com/v3/issues/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 <http://developer.github.com/v3/todo>`_
:calls: `DELETE /repos/:owner/:repo/issues/:number/labels <http://developer.github.com/v3/issues/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 <http://developer.github.com/v3/todo>`_
:calls: `PATCH /repos/:owner/:repo/issues/:number <http://developer.github.com/v3/issues>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo/issues/comments/:id <http://developer.github.com/v3/issues/comments>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo/issues/:number/comments <http://developer.github.com/v3/issues/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 <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo/issues/:issue_number/events <http://developer.github.com/v3/issues/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 <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo/issues/:number/labels <http://developer.github.com/v3/issues/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 <http://developer.github.com/v3/todo>`_
:calls: `DELETE /repos/:owner/:repo/issues/:number/labels/:name <http://developer.github.com/v3/issues/labels>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `PUT /repos/:owner/:repo/issues/:number/labels <http://developer.github.com/v3/issues/labels>`_
:param label: :class:`github.Label.Label`
:rtype: None
"""
+2 -2
View File
@@ -92,7 +92,7 @@ class IssueComment(github.GithubObject.CompletableGithubObject):
def delete(self):
"""
:calls: `DELETE /repos/:user/:repo/issues/comments/:id <http://developer.github.com/v3/todo>`_
:calls: `DELETE /repos/:owner/:repo/issues/comments/:id <http://developer.github.com/v3/issues/comments>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `PATCH /repos/:owner/:repo/issues/comments/:id <http://developer.github.com/v3/issues/comments>`_
:param body: string
:rtype: None
"""
+2 -2
View File
@@ -60,7 +60,7 @@ class Label(github.GithubObject.CompletableGithubObject):
def delete(self):
"""
:calls: `DELETE /repos/:user/:repo/labels/:name <http://developer.github.com/v3/todo>`_
:calls: `DELETE /repos/:owner/:repo/labels/:name <http://developer.github.com/v3/issues/labels>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `PATCH /repos/:owner/:repo/labels/:name <http://developer.github.com/v3/issues/labels>`_
:param name: string
:param color: string
:rtype: None
+13 -13
View File
@@ -108,7 +108,7 @@ class Github(object):
def get_user(self, login=github.GithubObject.NotSet):
"""
:calls: `GET /users/:user <http://developer.github.com/v3/users/#get-a-single-user>`_ or `GET /user <http://developer.github.com/v3/users/#get-the-authenticated-user>`_
:calls: `GET /users/:user <http://developer.github.com/v3/users>`_ or `GET /user <http://developer.github.com/v3/users>`_
: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 <http://developer.github.com/v3/users/#get-all-users>`_
:calls: `GET /users <http://developer.github.com/v3/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 <http://developer.github.com/v3/todo>`_
:calls: `GET /orgs/:org <http://developer.github.com/v3/orgs>`_
:param login: string
:rtype: :class:`github.Organization.Organization`
"""
@@ -158,7 +158,7 @@ class Github(object):
def get_repo(self, full_name):
"""
:calls: `GET /repos/:user/:repo <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo <http://developer.github.com/v3/repos>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /gists/:id <http://developer.github.com/v3/gists>`_
:param id: string
:rtype: :class:`github.Gist.Gist`
"""
@@ -187,7 +187,7 @@ class Github(object):
def get_gists(self):
"""
:calls: `GET /gists/public <http://developer.github.com/v3/todo>`_
:calls: `GET /gists/public <http://developer.github.com/v3/gists>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /legacy/repos/search/:keyword <http://developer.github.com/v3/search>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /legacy/user/search/:keyword <http://developer.github.com/v3/search>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /legacy/user/email/:email <http://developer.github.com/v3/search>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `POST /markdown <http://developer.github.com/v3/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 <http://developer.github.com/v3/todo>`_
:calls: `GET /hooks <http://developer.github.com/>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /gitignore/templates <http://developer.github.com/v3/gitignore>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /gitignore/templates/:name <http://developer.github.com/v3/gitignore>`_
:rtype: :class:`github.GitignoreTemplate.GitignoreTemplate`
"""
assert isinstance(name, (str, unicode)), name
+3 -3
View File
@@ -128,7 +128,7 @@ class Milestone(github.GithubObject.CompletableGithubObject):
def delete(self):
"""
:calls: `DELETE /repos/:user/:repo/milestones/:number <http://developer.github.com/v3/todo>`_
:calls: `DELETE /repos/:owner/:repo/milestones/:number <http://developer.github.com/v3/issues/milestones>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `PATCH /repos/:owner/:repo/milestones/:number <http://developer.github.com/v3/issues/milestones>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo/milestones/:number/labels <http://developer.github.com/v3/issues/labels>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Label.Label`
"""
return github.PaginatedList.PaginatedList(
+14 -14
View File
@@ -275,7 +275,7 @@ class NamedUser(github.GithubObject.CompletableGithubObject):
def get_events(self):
"""
:calls: `GET /users/:user/events <http://developer.github.com/v3/todo>`_
:calls: `GET /users/:user/events <http://developer.github.com/v3/activity/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 <http://developer.github.com/v3/todo>`_
:calls: `GET /users/:user/followers <http://developer.github.com/v3/users/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 <http://developer.github.com/v3/todo>`_
:calls: `GET /users/:user/following <http://developer.github.com/v3/users/followers>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /users/:user/gists <http://developer.github.com/v3/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 <http://developer.github.com/v3/todo>`_
:calls: `GET /users/:user/keys <http://developer.github.com/v3/users/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 <http://developer.github.com/v3/todo>`_
:calls: `GET /users/:user/orgs <http://developer.github.com/v3/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 <http://developer.github.com/v3/todo>`_
:calls: `GET /users/:user/events/public <http://developer.github.com/v3/activity/events>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /users/:user/received_events/public <http://developer.github.com/v3/activity/events>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /users/:user/received_events <http://developer.github.com/v3/activity/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/:user/:repo <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo <http://developer.github.com/v3/repos>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /users/:user/repos <http://developer.github.com/v3/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 <http://developer.github.com/v3/todo>`_
:calls: `GET /users/:user/starred <http://developer.github.com/v3/activity/starring>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /users/:user/subscriptions <http://developer.github.com/v3/activity/watching>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /users/:user/watched <http://developer.github.com/v3/activity/starring>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Repository.Repository`
"""
return github.PaginatedList.PaginatedList(
+17 -17
View File
@@ -236,7 +236,7 @@ class Organization(github.GithubObject.CompletableGithubObject):
def add_to_public_members(self, public_member):
"""
:calls: `PUT /orgs/:org/public_members/:user <http://developer.github.com/v3/todo>`_
:calls: `PUT /orgs/:org/public_members/:user <http://developer.github.com/v3/orgs/members>`_
: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/:user/:repo/forks <http://developer.github.com/v3/todo>`_
:calls: `POST /repos/:owner/:repo/forks <http://developer.github.com/v3/repos/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 <http://developer.github.com/v3/todo>`_
:calls: `POST /orgs/:org/repos <http://developer.github.com/v3/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 <http://developer.github.com/v3/todo>`_
:calls: `POST /orgs/:org/teams <http://developer.github.com/v3/orgs/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 <http://developer.github.com/v3/todo>`_
:calls: `PATCH /orgs/:org <http://developer.github.com/v3/orgs>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /orgs/:org/events <http://developer.github.com/v3/activity/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 <http://developer.github.com/v3/issues/#list-issues>`_
:calls: `GET /orgs/:org/issues <http://developer.github.com/v3/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 <http://developer.github.com/v3/todo>`_
:calls: `GET /orgs/:org/members <http://developer.github.com/v3/orgs/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 <http://developer.github.com/v3/todo>`_
:calls: `GET /orgs/:org/public_members <http://developer.github.com/v3/orgs/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/:user/:repo <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo <http://developer.github.com/v3/repos>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /orgs/:org/repos <http://developer.github.com/v3/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 <http://developer.github.com/v3/todo>`_
:calls: `GET /teams/:id <http://developer.github.com/v3/orgs/teams>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /orgs/:org/teams <http://developer.github.com/v3/orgs/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 <http://developer.github.com/v3/todo>`_
:calls: `GET /orgs/:org/members/:user <http://developer.github.com/v3/orgs/members>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /orgs/:org/public_members/:user <http://developer.github.com/v3/orgs/members>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `DELETE /orgs/:org/members/:user <http://developer.github.com/v3/orgs/members>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `DELETE /orgs/:org/public_members/:user <http://developer.github.com/v3/orgs/members>`_
:param public_member: :class:`github.NamedUser.NamedUser`
:rtype: None
"""
+14 -14
View File
@@ -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 <http://developer.github.com/v3/todo>`_
:calls: `POST /repos/:owner/:repo/pulls/:number/comments <http://developer.github.com/v3/pulls/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 <http://developer.github.com/v3/todo>`_
:calls: `POST /repos/:owner/:repo/pulls/:number/comments <http://developer.github.com/v3/pulls/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 <http://developer.github.com/v3/todo>`_
:calls: `POST /repos/:owner/:repo/issues/:number/comments <http://developer.github.com/v3/issues/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 <http://developer.github.com/v3/todo>`_
:calls: `PATCH /repos/:owner/:repo/pulls/:number <http://developer.github.com/v3/pulls>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo/pulls/comments/:number <http://developer.github.com/v3/pulls/comments>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo/pulls/comments/:number <http://developer.github.com/v3/pulls/comments>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo/pulls/:number/comments <http://developer.github.com/v3/pulls/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 <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo/pulls/:number/comments <http://developer.github.com/v3/pulls/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 <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo/pulls/:number/commits <http://developer.github.com/v3/pulls>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo/pulls/:number/files <http://developer.github.com/v3/pulls>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo/issues/comments/:id <http://developer.github.com/v3/issues/comments>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo/issues/:number/comments <http://developer.github.com/v3/issues/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 <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo/pulls/:number/merge <http://developer.github.com/v3/pulls>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `PUT /repos/:owner/:repo/pulls/:number/merge <http://developer.github.com/v3/pulls>`_
:param commit_message: string
:rtype: :class:`github.PullRequestMergeStatus.PullRequestMergeStatus`
"""
+2 -2
View File
@@ -133,7 +133,7 @@ class PullRequestComment(github.GithubObject.CompletableGithubObject):
def delete(self):
"""
:calls: `DELETE /repos/:user/:repo/pulls/comments/:number <http://developer.github.com/v3/todo>`_
:calls: `DELETE /repos/:owner/:repo/pulls/comments/:number <http://developer.github.com/v3/pulls/comments>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `PATCH /repos/:owner/:repo/pulls/comments/:number <http://developer.github.com/v3/pulls/comments>`_
:param body: string
:rtype: None
"""
+71 -68
View File
@@ -308,7 +308,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
def add_to_collaborators(self, collaborator):
"""
:calls: `PUT /repos/:user/:repo/collaborators/:user <http://developer.github.com/v3/todo>`_
:calls: `PUT /repos/:owner/:repo/collaborators/:user <http://developer.github.com/v3/repos/collaborators>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo/compare/:base...:head <http://developer.github.com/v3/repos/commits>`_
:param base: string
:param head: string
:rtype: :class:`github.Comparison.Comparison`
@@ -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 <http://developer.github.com/v3/todo>`_
:calls: `POST /repos/:owner/:repo/downloads <http://developer.github.com/v3/repos/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 <http://developer.github.com/v3/todo>`_
:calls: `POST /repos/:owner/:repo/git/blobs <http://developer.github.com/v3/git/blobs>`_
:param content: string
:param encoding: string
:rtype: :class:`github.GitBlob.GitBlob`
@@ -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 <http://developer.github.com/v3/todo>`_
:calls: `POST /repos/:owner/:repo/git/commits <http://developer.github.com/v3/git/commits>`_
:param message: string
:param tree: :class:`github.GitTree.GitTree`
:param parents: list of :class:`github.GitCommit.GitCommit`
@@ -421,7 +421,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
def create_git_ref(self, ref, sha):
"""
:calls: `POST /repos/:user/:repo/git/refs <http://developer.github.com/v3/todo>`_
:calls: `POST /repos/:owner/:repo/git/refs <http://developer.github.com/v3/git/refs>`_
:param ref: string
:param sha: string
:rtype: :class:`github.GitRef.GitRef`
@@ -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 <http://developer.github.com/v3/todo>`_
:calls: `POST /repos/:owner/:repo/git/tags <http://developer.github.com/v3/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 <http://developer.github.com/v3/todo>`_
:calls: `POST /repos/:owner/:repo/git/trees <http://developer.github.com/v3/git/trees>`_
:param tree: list of :class:`github.InputGitTreeElement.InputGitTreeElement`
:param base_tree: :class:`github.GitTree.GitTree`
:rtype: :class:`github.GitTree.GitTree`
@@ -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 <http://developer.github.com/v3/todo>`_
:calls: `POST /repos/:owner/:repo/hooks <http://developer.github.com/v3/repos/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 <http://developer.github.com/v3/todo>`_
:calls: `POST /repos/:owner/:repo/issues <http://developer.github.com/v3/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 <http://developer.github.com/v3/todo>`_
:calls: `POST /repos/:owner/:repo/keys <http://developer.github.com/v3/repos/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 <http://developer.github.com/v3/todo>`_
:calls: `POST /repos/:owner/:repo/labels <http://developer.github.com/v3/issues/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 <http://developer.github.com/v3/todo>`_
:calls: `POST /repos/:owner/:repo/milestones <http://developer.github.com/v3/issues/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 <http://developer.github.com/v3/todo>`_
:calls: `POST /repos/:owner/:repo/pulls <http://developer.github.com/v3/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 <http://developer.github.com/v3/todo>`_
:calls: `DELETE /repos/:owner/:repo <http://developer.github.com/v3/repos>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `PATCH /repos/:owner/:repo <http://developer.github.com/v3/repos>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo/:archive_format/:ref <http://developer.github.com/v3/repos/contents>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo/assignees <http://developer.github.com/v3/issues/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 <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo/branches/:branch <http://developer.github.com/v3/repos>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo/branches <http://developer.github.com/v3/repos>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo/collaborators <http://developer.github.com/v3/repos/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 <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo/comments/:id <http://developer.github.com/v3/repos/comments>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo/comments <http://developer.github.com/v3/repos/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 <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo/commits/:sha <http://developer.github.com/v3/repos/commits>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo/commits <http://developer.github.com/v3/repos/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 <http://developer.github.com/v3/repos/contents>`_
: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 <http://developer.github.com/v3/repos/contents>`_
: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 <http://developer.github.com/v3/repos/contents>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo/contributors <http://developer.github.com/v3/repos>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo/downloads/:id <http://developer.github.com/v3/repos/downloads>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo/downloads <http://developer.github.com/v3/repos/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 <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo/events <http://developer.github.com/v3/activity/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 <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo/forks <http://developer.github.com/v3/repos/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 <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo/git/blobs/:sha <http://developer.github.com/v3/git/blobs>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo/git/commits/:sha <http://developer.github.com/v3/git/commits>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo/git/refs/:ref <http://developer.github.com/v3/git/refs>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo/git/refs <http://developer.github.com/v3/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 <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo/git/tags/:sha <http://developer.github.com/v3/git/tags>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo/git/trees/:sha <http://developer.github.com/v3/git/trees>`_
:param sha: string
:param recursive: bool
:rtype: :class:`github.GitTree.GitTree`
@@ -1077,7 +1080,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
def get_hook(self, id):
"""
:calls: `GET /repos/:user/:repo/hooks/:id <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo/hooks/:id <http://developer.github.com/v3/repos/hooks>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo/hooks <http://developer.github.com/v3/repos/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 <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo/issues/:number <http://developer.github.com/v3/issues>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo/issues <http://developer.github.com/v3/issues>`_
:param milestone: :class:`github.Milestone.Milestone` or "none" or "*"
:param state: string
:param assignee: :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 <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo/issues/comments <http://developer.github.com/v3/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 <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo/issues/events/:id <http://developer.github.com/v3/issues/events>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo/issues/events <http://developer.github.com/v3/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 <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo/keys/:id <http://developer.github.com/v3/repos/keys>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo/keys <http://developer.github.com/v3/repos/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 <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo/labels/:name <http://developer.github.com/v3/issues/labels>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo/labels <http://developer.github.com/v3/issues/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 <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo/languages <http://developer.github.com/v3/repos>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo/milestones/:number <http://developer.github.com/v3/issues/milestones>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo/milestones <http://developer.github.com/v3/issues/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 <http://developer.github.com/v3/todo>`_
:calls: `GET /networks/:owner/:repo/events <http://developer.github.com/v3/activity/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 <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo/pulls/:number <http://developer.github.com/v3/pulls>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo/pulls <http://developer.github.com/v3/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 <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo/pulls/comments <http://developer.github.com/v3/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 <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo/pulls/comments <http://developer.github.com/v3/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 <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo/readme <http://developer.github.com/v3/repos/contents>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo/stargazers <http://developer.github.com/v3/activity/starring>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo/subscribers <http://developer.github.com/v3/activity/watching>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo/tags <http://developer.github.com/v3/repos>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo/teams <http://developer.github.com/v3/repos>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo/watchers <http://developer.github.com/v3/activity/starring>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo/assignees/:assignee <http://developer.github.com/v3/issues/assignees>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /repos/:owner/:repo/collaborators/:user <http://developer.github.com/v3/repos/collaborators>`_
:param collaborator: :class:`github.NamedUser.NamedUser`
:rtype: bool
"""
@@ -1516,7 +1519,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
def legacy_search_issues(self, state, keyword):
"""
:calls: `GET /legacy/issues/search/:owner/:repository/:state/:keyword <http://developer.github.com/v3/todo>`_
:calls: `GET /legacy/issues/search/:owner/:repository/:state/:keyword <http://developer.github.com/v3/search>`_
:param state: "open" or "closed"
:param keyword: string
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Issue.Issue`
@@ -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 <http://developer.github.com/v3/todo>`_
:calls: `POST /repos/:owner/:repo/merges <http://developer.github.com/v3/repos/merging>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `DELETE /repos/:owner/:repo/collaborators/:user <http://developer.github.com/v3/repos/collaborators>`_
:param collaborator: :class:`github.NamedUser.NamedUser`
:rtype: None
"""
@@ -1578,7 +1581,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
def subscribe_to_hub(self, event, callback, secret=github.GithubObject.NotSet):
"""
:calls: `POST /hub <http://developer.github.com/v3/todo>`_
:calls: `POST /hub <http://developer.github.com/>`_
:param event: string
:param callback: string
:param secret: string
@@ -1588,7 +1591,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
def unsubscribe_from_hub(self, event, callback):
"""
:calls: `POST /hub <http://developer.github.com/v3/todo>`_
:calls: `POST /hub <http://developer.github.com/>`_
:param event: string
:param callback: string
:param secret: string
+2 -2
View File
@@ -83,7 +83,7 @@ class RepositoryKey(github.GithubObject.CompletableGithubObject):
def delete(self):
"""
:calls: `DELETE /repos/:user/:repo/keys/:id <http://developer.github.com/v3/keys>`_
:calls: `DELETE /repos/:owner/:repo/keys/:id <http://developer.github.com/v3/repos/keys>`_
: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 <http://developer.github.com/v3/keys>`_
:calls: `PATCH /repos/:owner/:repo/keys/:id <http://developer.github.com/v3/repos/keys>`_
:param title: string
:param key: string
:rtype: None
+10 -10
View File
@@ -86,7 +86,7 @@ class Team(github.GithubObject.CompletableGithubObject):
def add_to_members(self, member):
"""
:calls: `PUT /teams/:id/members/:user <http://developer.github.com/v3/todo>`_
:calls: `PUT /teams/:id/members/:user <http://developer.github.com/v3/orgs/teams>`_
: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/:user/:repo <http://developer.github.com/v3/todo>`_
:calls: `PUT /teams/:id/repos/:org/:repo <http://developer.github.com/v3/orgs/teams>`_
:param repo: :class:`github.Repository.Repository`
:rtype: None
"""
@@ -114,7 +114,7 @@ class Team(github.GithubObject.CompletableGithubObject):
def delete(self):
"""
:calls: `DELETE /teams/:id <http://developer.github.com/v3/todo>`_
:calls: `DELETE /teams/:id <http://developer.github.com/v3/orgs/teams>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `PATCH /teams/:id <http://developer.github.com/v3/orgs/teams>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /teams/:id/members <http://developer.github.com/v3/orgs/teams>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /teams/:id/repos <http://developer.github.com/v3/orgs/teams>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `GET /teams/:id/members/:user <http://developer.github.com/v3/orgs/teams>`_
: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/:user/:repo <http://developer.github.com/v3/todo>`_
:calls: `GET /teams/:id/repos/:owner/:repo <http://developer.github.com/v3/orgs/teams>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `DELETE /teams/:id/members/:user <http://developer.github.com/v3/orgs/teams>`_
: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/:user/:repo <http://developer.github.com/v3/todo>`_
:calls: `DELETE /teams/:id/repos/:owner/:repo <http://developer.github.com/v3/orgs/teams>`_
:param repo: :class:`github.Repository.Repository`
:rtype: None
"""
+2 -2
View File
@@ -74,7 +74,7 @@ class UserKey(github.GithubObject.CompletableGithubObject):
def delete(self):
"""
:calls: `DELETE /user/keys/:id <http://developer.github.com/v3/todo>`_
:calls: `DELETE /user/keys/:id <http://developer.github.com/v3/users/keys>`_
: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 <http://developer.github.com/v3/todo>`_
:calls: `PATCH /user/keys/:id <http://developer.github.com/v3/users/keys>`_
:param title: string
:param key: string
:rtype: None
+12
View File
@@ -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
+99
View File
@@ -0,0 +1,99 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
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 = {
("/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 = 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"):
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]
docUrl = "http://developer.github.com/" + filename[29:-3] ### @todo + "#" + section
urls[url] = docUrl
for url in undocumentedUrls:
urls[url] = "http://developer.github.com/"
for url in uninterestingUrls:
del urls[url]
return urls
def parseLibrary():
urls = dict()
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, apiUrl, docUrl = part.split(" ")
docUrl = docUrl[1:-1]
urls[(apiUrl, verb)] = docUrl
return urls
def printUrls(title, urls):
if len(urls) > 0:
print len(urls), "URLs", title + ":"
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", 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__":
main()