Update most URLs to docs.github.com (#1896)

Now that GitHub have moved their documentation from
developer.github.com, we should update our links. I have also tried to
update the call strings to their new format, but since it was done via
regex, some of them may not match exactly.
This commit is contained in:
Steve Kowalik
2021-03-26 20:43:48 +11:00
committed by GitHub
parent ad124ef481
commit babcbcd04f
80 changed files with 529 additions and 530 deletions
+29 -29
View File
@@ -197,7 +197,7 @@ class Github:
"""
Rate limit status for different resources (core/search/graphql).
:calls: `GET /rate_limit <http://developer.github.com/v3/rate_limit>`_
:calls: `GET /rate_limit <http://docs.github.com/en/rest/reference/rate_limit>`_
:rtype: :class:`github.RateLimit.RateLimit`
"""
headers, data = self.__requester.requestJsonAndCheck("GET", "/rate_limit")
@@ -212,7 +212,7 @@ class Github:
def get_license(self, key=github.GithubObject.NotSet):
"""
:calls: `GET /license/:license <https://developer.github.com/v3/licenses/#get-an-individual-license>`_
:calls: `GET /license/{license} <https://docs.github.com/en/rest/reference/licenses#get-an-individual-license>`_
:param key: string
:rtype: :class:`github.License.License`
"""
@@ -223,7 +223,7 @@ class Github:
def get_licenses(self):
"""
:calls: `GET /licenses <https://developer.github.com/v3/licenses/#list-all-licenses>`_
:calls: `GET /licenses <https://docs.github.com/en/rest/reference/licenses#list-all-licenses>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.License.License`
"""
@@ -235,7 +235,7 @@ class Github:
def get_events(self):
"""
:calls: `GET /events <https://developer.github.com/v3/activity/events/#list-public-events>`_
:calls: `GET /events <https://docs.github.com/en/rest/reference/activity/events#list-public-events>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Event.Event`
"""
@@ -245,7 +245,7 @@ class Github:
def get_user(self, login=github.GithubObject.NotSet):
"""
:calls: `GET /users/:user <http://developer.github.com/v3/users>`_ or `GET /user <http://developer.github.com/v3/users>`_
:calls: `GET /users/{user} <http://docs.github.com/en/rest/reference/users>`_ or `GET /user <http://docs.github.com/en/rest/reference/users>`_
:param login: string
:rtype: :class:`github.NamedUser.NamedUser` or :class:`github.AuthenticatedUser.AuthenticatedUser`
"""
@@ -264,7 +264,7 @@ class Github:
def get_user_by_id(self, user_id):
"""
:calls: `GET /user/:id <http://developer.github.com/v3/users>`_
:calls: `GET /user/{id} <http://docs.github.com/en/rest/reference/users>`_
:param user_id: int
:rtype: :class:`github.NamedUser.NamedUser`
"""
@@ -276,7 +276,7 @@ class Github:
def get_users(self, since=github.GithubObject.NotSet):
"""
:calls: `GET /users <http://developer.github.com/v3/users>`_
:calls: `GET /users <http://docs.github.com/en/rest/reference/users>`_
:param since: integer
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser`
"""
@@ -290,7 +290,7 @@ class Github:
def get_organization(self, login):
"""
:calls: `GET /orgs/:org <http://developer.github.com/v3/orgs>`_
:calls: `GET /orgs/{org} <http://docs.github.com/en/rest/reference/orgs>`_
:param login: string
:rtype: :class:`github.Organization.Organization`
"""
@@ -302,7 +302,7 @@ class Github:
def get_organizations(self, since=github.GithubObject.NotSet):
"""
:calls: `GET /organizations <http://developer.github.com/v3/orgs#list-all-organizations>`_
:calls: `GET /organizations <http://docs.github.com/en/rest/reference/orgs#list-all-organizations>`_
:param since: integer
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Organization.Organization`
"""
@@ -319,7 +319,7 @@ class Github:
def get_repo(self, full_name_or_id, lazy=False):
"""
:calls: `GET /repos/:owner/:repo <http://developer.github.com/v3/repos>`_ or `GET /repositories/:id <http://developer.github.com/v3/repos>`_
:calls: `GET /repos/{owner}/{repo} <http://docs.github.com/en/rest/reference/repos>`_ or `GET /repositories/{id} <http://docs.github.com/en/rest/reference/repos>`_
:rtype: :class:`github.Repository.Repository`
"""
assert isinstance(full_name_or_id, (str, int)), full_name_or_id
@@ -336,7 +336,7 @@ class Github:
self, since=github.GithubObject.NotSet, visibility=github.GithubObject.NotSet
):
"""
:calls: `GET /repositories <http://developer.github.com/v3/repos/#list-all-public-repositories>`_
:calls: `GET /repositories <http://docs.github.com/en/rest/reference/repos#list-all-public-repositories>`_
:param since: integer
:param visibility: string ('all','public')
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Repository.Repository`
@@ -357,7 +357,7 @@ class Github:
def get_project(self, id):
"""
:calls: `GET /projects/:project_id <https://developer.github.com/v3/projects/#get-a-project>`_
:calls: `GET /projects/{project_id} <https://docs.github.com/en/rest/reference/projects#get-a-project>`_
:rtype: :class:`github.Project.Project`
:param id: integer
"""
@@ -370,7 +370,7 @@ class Github:
def get_project_column(self, id):
"""
:calls: `GET /projects/columns/:column_id <https://developer.github.com/v3/projects/columns/#get-a-project-column>`_
:calls: `GET /projects/columns/{column_id} <https://docs.github.com/en/rest/reference/projects/columns#get-a-project-column>`_
:rtype: :class:`github.ProjectColumn.ProjectColumn`
:param id: integer
"""
@@ -385,7 +385,7 @@ class Github:
def get_gist(self, id):
"""
:calls: `GET /gists/:id <http://developer.github.com/v3/gists>`_
:calls: `GET /gists/{id} <http://docs.github.com/en/rest/reference/gists>`_
:param id: string
:rtype: :class:`github.Gist.Gist`
"""
@@ -395,7 +395,7 @@ class Github:
def get_gists(self, since=github.GithubObject.NotSet):
"""
:calls: `GET /gists/public <http://developer.github.com/v3/gists>`_
:calls: `GET /gists/public <http://docs.github.com/en/rest/reference/gists>`_
:param since: datetime.datetime format YYYY-MM-DDTHH:MM:SSZ
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Gist.Gist`
"""
@@ -417,7 +417,7 @@ class Github:
**qualifiers,
):
"""
:calls: `GET /search/repositories <http://developer.github.com/v3/search>`_
:calls: `GET /search/repositories <http://docs.github.com/en/rest/reference/search>`_
:param query: string
:param sort: string ('stars', 'forks', 'updated')
:param order: string ('asc', 'desc')
@@ -462,7 +462,7 @@ class Github:
**qualifiers,
):
"""
:calls: `GET /search/users <http://developer.github.com/v3/search>`_
:calls: `GET /search/users <http://docs.github.com/en/rest/reference/search>`_
:param query: string
:param sort: string ('followers', 'repositories', 'joined')
:param order: string ('asc', 'desc')
@@ -503,7 +503,7 @@ class Github:
**qualifiers,
):
"""
:calls: `GET /search/issues <http://developer.github.com/v3/search>`_
:calls: `GET /search/issues <http://docs.github.com/en/rest/reference/search>`_
:param query: string
:param sort: string ('comments', 'created', 'updated')
:param order: string ('asc', 'desc')
@@ -542,7 +542,7 @@ class Github:
**qualifiers,
):
"""
:calls: `GET /search/code <http://developer.github.com/v3/search>`_
:calls: `GET /search/code <http://docs.github.com/en/rest/reference/search>`_
:param query: string
:param sort: string ('indexed')
:param order: string ('asc', 'desc')
@@ -591,7 +591,7 @@ class Github:
**qualifiers,
):
"""
:calls: `GET /search/commits <http://developer.github.com/v3/search>`_
:calls: `GET /search/commits <http://docs.github.com/en/rest/reference/search>`_
:param query: string
:param sort: string ('author-date', 'committer-date')
:param order: string ('asc', 'desc')
@@ -631,7 +631,7 @@ class Github:
def search_topics(self, query, **qualifiers):
"""
:calls: `GET /search/topics <http://developer.github.com/v3/search>`_
:calls: `GET /search/topics <http://docs.github.com/en/rest/reference/search>`_
:param query: string
:param qualifiers: keyword dict query qualifiers
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Topic.Topic`
@@ -659,7 +659,7 @@ class Github:
def render_markdown(self, text, context=github.GithubObject.NotSet):
"""
:calls: `POST /markdown <http://developer.github.com/v3/markdown>`_
:calls: `POST /markdown <http://docs.github.com/en/rest/reference/markdown>`_
:param text: string
:param context: :class:`github.Repository.Repository`
:rtype: string
@@ -679,7 +679,7 @@ class Github:
def get_hook(self, name):
"""
:calls: `GET /hooks/:name <http://developer.github.com/v3/repos/hooks/>`_
:calls: `GET /hooks/{name} <http://docs.github.com/en/rest/reference/repos#hooks>`_
:param name: string
:rtype: :class:`github.HookDescription.HookDescription`
"""
@@ -693,7 +693,7 @@ class Github:
def get_hooks(self):
"""
:calls: `GET /hooks <http://developer.github.com/v3/repos/hooks/>`_
:calls: `GET /hooks <http://docs.github.com/en/rest/reference/repos#hooks>`_
:rtype: list of :class:`github.HookDescription.HookDescription`
"""
headers, data = self.__requester.requestJsonAndCheck("GET", "/hooks")
@@ -706,7 +706,7 @@ class Github:
def get_gitignore_templates(self):
"""
:calls: `GET /gitignore/templates <http://developer.github.com/v3/gitignore>`_
:calls: `GET /gitignore/templates <http://docs.github.com/en/rest/reference/gitignore>`_
:rtype: list of string
"""
headers, data = self.__requester.requestJsonAndCheck(
@@ -716,7 +716,7 @@ class Github:
def get_gitignore_template(self, name):
"""
:calls: `GET /gitignore/templates/:name <http://developer.github.com/v3/gitignore>`_
:calls: `GET /gitignore/templates/{name} <http://docs.github.com/en/rest/reference/gitignore>`_
:rtype: :class:`github.GitignoreTemplate.GitignoreTemplate`
"""
assert isinstance(name, str), name
@@ -729,7 +729,7 @@ class Github:
def get_emojis(self):
"""
:calls: `GET /emojis <http://developer.github.com/v3/emojis/>`_
:calls: `GET /emojis <http://docs.github.com/en/rest/reference/emojis>`_
:rtype: dictionary of type => url for emoji`
"""
headers, attributes = self.__requester.requestJsonAndCheck("GET", "/emojis")
@@ -778,7 +778,7 @@ class Github:
def get_app(self, slug=github.GithubObject.NotSet):
"""
:calls: `GET /apps/:slug <https://docs.github.com/en/rest/reference/apps>`_ or `GET /app <https://docs.github.com/en/rest/reference/apps>`_
:calls: `GET /apps/{slug} <https://docs.github.com/en/rest/reference/apps>`_ or `GET /app <https://docs.github.com/en/rest/reference/apps>`_
:param slug: string
:rtype: :class:`github.GithubApp.GithubApp`
"""
@@ -867,7 +867,7 @@ class GithubIntegration:
def get_installation(self, owner, repo):
"""
:calls: `GET /repos/:owner/:repo/installation <https://developer.github.com/v3/apps/#get-a-repository-installation>`_
:calls: `GET /repos/{owner}/{repo}/installation <https://docs.github.com/en/rest/reference/apps#get-a-repository-installation>`_
:param owner: str
:param repo: str
:rtype: :class:`github.Installation.Installation`