Skip to content

Commit 8160a3d

Browse files
committed
Documentation: update /api/v3/remote/ listing
1 parent 2d1ff96 commit 8160a3d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

docs/api/v3.rst

+7-7
Original file line numberDiff line numberDiff line change
@@ -1713,12 +1713,12 @@ Remote Repository listing
17131713

17141714
.. code-tab:: bash
17151715

1716-
$ curl -H "Authorization: Token <token>" https://readthedocs.org/api/v3/remote/repositories/?expand=project,organization
1716+
$ curl -H "Authorization: Token <token>" https://readthedocs.org/api/v3/remote/repositories/?expand=projects,remote_organization
17171717

17181718
.. code-tab:: python
17191719

17201720
import requests
1721-
URL = 'https://readthedocs.org/api/v3/remote/repositories/?expand=project,organization'
1721+
URL = 'https://readthedocs.org/api/v3/remote/repositories/?expand=projects,remote_organization'
17221722
TOKEN = '<token>'
17231723
HEADERS = {'Authorization': f'token {TOKEN}'}
17241724
response = requests.get(URL, headers=HEADERS)
@@ -1730,11 +1730,11 @@ Remote Repository listing
17301730

17311731
{
17321732
"count": 20,
1733-
"next": "api/v3/remote/repositories/?expand=project,organization&limit=10&offset=10",
1733+
"next": "api/v3/remote/repositories/?expand=projects,remote_organization&limit=10&offset=10",
17341734
"previous": null,
17351735
"results": [
17361736
{
1737-
"organization": {
1737+
"remote_organization": {
17381738
"avatar_url": "https://avatars.githubusercontent.com/u/12345?v=4",
17391739
"created": "2019-04-29T10:00:00Z",
17401740
"modified": "2019-04-29T12:00:00Z",
@@ -1744,7 +1744,7 @@ Remote Repository listing
17441744
"url": "https://github.com/organization",
17451745
"vcs_provider": "github"
17461746
},
1747-
"project": {
1747+
"project": [{
17481748
"id": 12345,
17491749
"name": "project",
17501750
"slug": "project",
@@ -1787,7 +1787,7 @@ Remote Repository listing
17871787
"redirects": "/api/v3/projects/project/redirects/",
17881788
"translations": "/api/v3/projects/project/translations/"
17891789
}
1790-
}
1790+
}],
17911791
"avatar_url": "https://avatars3.githubusercontent.com/u/test-organization?v=4",
17921792
"clone_url": "https://github.com/organization/project.git",
17931793
"created": "2019-04-29T10:00:00Z",
@@ -1814,7 +1814,7 @@ Remote Repository listing
18141814
:query string vcs_provider: return remote repositories for specific vcs provider (``github``, ``gitlab`` or ``bitbucket``)
18151815
:query string organization: return remote repositories for specific remote organization (using remote organization ``slug``)
18161816
:query string expand: allows to add/expand some extra fields in the response.
1817-
Allowed values are ``project`` and ``organization``.
1817+
Allowed values are ``projects`` and ``remote_organization``.
18181818
Multiple fields can be passed separated by commas.
18191819

18201820
:requestheader Authorization: token to authenticate.

0 commit comments

Comments
 (0)