Skip to content

Commit 5e8d6b6

Browse files
committed
Merge branch 'master' into move-file-validations-out-of-the-config-module
2 parents fd40166 + a8335ba commit 5e8d6b6

File tree

148 files changed

+4133
-1358
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

148 files changed

+4133
-1358
lines changed

.github/FUNDING.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
custom: https://readthedocs.org/sustainability/

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ logs/*
2828
media/dash
2929
media/epub
3030
media/export
31+
media/html
3132
media/htmlzip
3233
media/json
3334
media/man

common

docs/api/v3.rst

+30-148
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,7 @@ Authentication and authorization
1414
--------------------------------
1515

1616
Requests to the Read the Docs public API are for public and private information.
17-
Some listing endpoints and some detailed ones are allowed to access without being authenticated.
18-
Although, all endpoints that perform non-readonly operations, require authentication.
19-
20-
21-
No authentication
22-
~~~~~~~~~~~~~~~~~
23-
24-
Some endpoints on read-only requests won't require any kind of authentication.
25-
Most of them are detailed information of specific listings for a particular object.
17+
All endpoints require authentication.
2618

2719

2820
Token
@@ -35,6 +27,10 @@ and have the same permissions that the user itself.
3527
Session
3628
~~~~~~~
3729

30+
.. warning::
31+
32+
Authentication via session is not enabled yet.
33+
3834
Session authentication is allowed on very specific endpoints,
3935
to allow hitting the API when reading documentation.
4036

@@ -77,13 +73,16 @@ Projects list
7773
:>json string previous: URI for previous set of projects.
7874
:>json array results: array of ``project`` objects.
7975

80-
:query string privacy_level: one of ``public``, ``private``, ``protected``.
76+
:query string name: name of the project.
77+
:query string name__contains: part of the name of the project.
78+
:query string slug: slug of the project.
79+
:query string slug__contains: part of the slug of the project.
8180
:query string language: language code as ``en``, ``es``, ``ru``, etc.
81+
:query string privacy_level: one of ``public``, ``private``, ``protected``.
8282
:query string programming_language: programming language code as ``py``, ``js``, etc.
83-
:query string repository_url: URL of the repository.
8483
:query string repository_type: one of ``git``, ``hg``, ``bzr``, ``svn``.
8584

86-
:requestheader Authorization: required token to authenticate.
85+
:requestheader Authorization: token to authenticate.
8786

8887

8988
Project details
@@ -97,7 +96,7 @@ Project details
9796

9897
.. sourcecode:: bash
9998

100-
$ curl https://readthedocs.org/api/v3/projects/pip/
99+
$ curl -H "Authorization: Token <token>" https://readthedocs.org/api/v3/projects/pip/
101100

102101
**Example response**:
103102

@@ -168,9 +167,7 @@ Project details
168167

169168
.. TODO: complete the returned data docs once agreed on this.
170169
171-
:query boolean inactive_versions: whether or not include inactive versions.
172-
173-
:requestheader Authorization: optional token to authenticate.
170+
:requestheader Authorization: token to authenticate.
174171

175172
:statuscode 200: Success
176173
:statuscode 404: There is no ``Project`` with this slug
@@ -199,7 +196,7 @@ Versions listing
199196

200197
.. sourcecode:: bash
201198

202-
$ curl https://readthedocs.org/api/v3/projects/pip/versions/
199+
$ curl -H "Authorization: Token <token>" https://readthedocs.org/api/v3/projects/pip/versions/
203200

204201
**Example response**:
205202

@@ -225,7 +222,7 @@ Versions listing
225222
:query boolean active: whether return active versions only
226223
:query boolean built: whether return only built version
227224

228-
:requestheader Authorization: optional token to authenticate.
225+
:requestheader Authorization: token to authenticate.
229226

230227

231228
Version detail
@@ -239,7 +236,7 @@ Version detail
239236

240237
.. sourcecode:: bash
241238

242-
$ curl https://readthedocs.org/api/v3/projects/pip/versions/stable/
239+
$ curl -H "Authorization: Token <token>" https://readthedocs.org/api/v3/projects/pip/versions/stable/
243240

244241
**Example response**:
245242

@@ -287,7 +284,7 @@ Version detail
287284
:>json string last_build: Build object representing the last build of this version
288285
:>json array downloads: URLs to downloads of this version's documentation
289286

290-
:requestheader Authorization: optional token to authenticate.
287+
:requestheader Authorization: token to authenticate.
291288

292289
:statuscode 200: Success
293290
:statuscode 404: There is no ``Version`` with this slug for this project
@@ -309,11 +306,7 @@ Version edit
309306
"privacy_level": "public"
310307
}
311308

312-
**Example response**:
313-
314-
`See Version details <#version-detail>`_
315-
316-
:requestheader Authorization: required token to authenticate.
309+
:requestheader Authorization: token to authenticate.
317310

318311
:statuscode 204: Edited sucessfully
319312
:statuscode 400: Some field is invalid
@@ -344,7 +337,7 @@ Build details
344337

345338
.. sourcecode:: bash
346339

347-
$ curl https://readthedocs.org/api/v3/projects/pip/builds/8592686/?include_config=true
340+
$ curl -H "Authorization: Token <token>" https://readthedocs.org/api/v3/projects/pip/builds/8592686/?expand=config
348341

349342
**Example response**:
350343

@@ -422,29 +415,12 @@ Build details
422415

423416
:query boolean include_config: whether or not include the configs used for this build. Default is ``false``
424417

425-
:requestheader Authorization: optional token to authenticate.
418+
:requestheader Authorization: token to authenticate.
426419

427420
:statuscode 200: Success
428421
:statuscode 404: There is no ``Build`` with this ID
429422

430423

431-
.. http:get:: /api/v3/projects/(str:project_slug)/builds/latest/
432-
433-
Retrieve details for latest build on this project.
434-
435-
**Example request**:
436-
437-
.. sourcecode:: bash
438-
439-
$ curl https://readthedocs.org/api/v3/projects/pip/builds/latest/
440-
441-
**Example response**:
442-
443-
`See Build details <#build-details>`_
444-
445-
:requestheader Authorization: optional token to authenticate.
446-
447-
448424
Builds listing
449425
++++++++++++++
450426

@@ -472,102 +448,28 @@ Builds listing
472448
:query string commit: commit hash to filter the builds returned by commit
473449
:query boolean running: whether or not to filter the builds returned by currently building
474450

475-
:requestheader Authorization: optional token to authenticate.
451+
:requestheader Authorization: token to authenticate.
476452

477453

478454
Build triggering
479455
++++++++++++++++
480456

481457

482-
.. http:post:: /api/v3/projects/(string:project_slug)/builds/
483-
484-
Trigger a new build for this project.
485-
486-
**Example request**:
487-
488-
.. sourcecode:: json
458+
.. http:post:: /api/v3/projects/(string:project_slug)/versions/(string:version_slug)/builds/
489459
490-
{
491-
"version": "latest",
492-
}
460+
Trigger a new build for the ``version_slug`` version of this project.
493461

494462
**Example response**:
495463

496464
`See Build details <#build-details>`_
497465

498-
:requestheader Authorization: required token to authenticate.
466+
:requestheader Authorization: token to authenticate.
499467

500-
:statuscode 201: Created sucessfully
468+
:statuscode 202: Accepted
501469
:statuscode 400: Some field is invalid
502470
:statuscode 401: Not valid permissions
503471

504472

505-
Build commands listing
506-
++++++++++++++++++++++
507-
508-
.. http:get:: /api/v3/projects/(str:project_slug)/builds/(int:build_id)/commands/
509-
510-
Retrieve build command list of a single build.
511-
512-
**Example request**:
513-
514-
.. sourcecode:: bash
515-
516-
$ curl https://readthedocs.org/api/v3/projects/pip/builds/719263915/commands/
517-
518-
**Example response**:
519-
520-
.. sourcecode:: json
521-
522-
{
523-
"count": 15,
524-
"next": "/api/v3/projects/pip/builds/719263915/commands/?limit=10&offset=10",
525-
"previous": null,
526-
"results": ["BUILDCOMMAND"]
527-
}
528-
529-
:requestheader Authorization: optional token to authenticate.
530-
531-
532-
Build command details
533-
+++++++++++++++++++++
534-
535-
.. http:get:: /api/v3/projects/(str:project_slug)/builds/(int:build_id)/commands/(int:buildcommand_id)
536-
537-
Retrieve build command detail.
538-
539-
**Example request**:
540-
541-
.. sourcecode:: bash
542-
543-
$ curl https://readthedocs.org/api/v3/projects/pip/builds/719263915/commands/9182639172/
544-
545-
**Example response**:
546-
547-
.. sourcecode:: json
548-
549-
{
550-
"id": 9182639172,
551-
"build": 719263915,
552-
"project": "pip",
553-
"version": "stable",
554-
"created": "2018-06-19T15:15:59+00:00",
555-
"finished": "2018-06-19T15:16:58+00:00",
556-
"duration": 59,
557-
"command": "cat docs/config.py",
558-
"output": "...",
559-
"exit_code": 0,
560-
"links": {
561-
"self": "/api/v3/projects/pip/builds/719263915/commands/9182639172/",
562-
"build": "/api/v3/projects/pip/builds/719263915/",
563-
"version": "/api/v3/projects/pip/versions/stable/",
564-
"project": "/api/v3/projects/pip/"
565-
}
566-
}
567-
568-
:requestheader Authorization: optional token to authenticate.
569-
570-
571473
Users
572474
~~~~~
573475

@@ -590,36 +492,16 @@ User detail
590492
.. sourcecode:: json
591493

592494
{
593-
"id": 25,
594495
"username": "humitos",
595496
"created": "2008-10-23T18:12:31+00:00",
596-
"last_login": "2010-10-23T18:12:31+00:00",
597-
"first_name": "Manuel",
598-
"last_name": "Kaufmann",
599-
"email": "[email protected]",
600-
"links": {
601-
"self": "/api/v3/users/humitos/",
602-
"projects": "/api/v3/projects/?user=humitos"
603-
}
497+
"last_login": "2010-10-23T18:12:31+00:00"
604498
}
605499

606-
.. TODO: considering that ``/api/v3/projects/`` will return only
607-
the projects for the authenticated user, the ``projects`` link
608-
here won't work.
609-
610-
On the other hand, ``/api/v3/projects/all/?user=humitos`` can't
611-
be used because we will be mixing ``all`` as project slug with
612-
our endpoint URL.
613-
614-
:>json integer id: ID for the user on the database.
615500
:>json string username: username for the user.
616501
:>json string created: date and time when the user was created.
617502
:>json string last_login: date and time for last time this user was logged in.
618-
:>json string first_name: first name of the user.
619-
:>json string last_name: last name of the user.
620-
:>json string email: email of the user.
621503

622-
:requestheader Authorization: required token to authenticate.
504+
:requestheader Authorization: token to authenticate.
623505

624506

625507
User listing
@@ -652,7 +534,7 @@ User listing
652534
:>json string previous: URI for previous set of users.
653535
:>json array results: array of ``user`` objects.
654536

655-
:requestheader Authorization: optional token to authenticate.
537+
:requestheader Authorization: token to authenticate.
656538

657539

658540
Subprojects
@@ -688,7 +570,7 @@ Subprojects listing
688570
:>json string previous: URI for previous set of projects.
689571
:>json array results: array of ``project`` objects.
690572

691-
:requestheader Authorization: required token to authenticate.
573+
:requestheader Authorization: token to authenticate.
692574

693575

694576
Translations
@@ -724,4 +606,4 @@ Translations listing
724606
:>json string previous: URI for previous set of projects.
725607
:>json array results: array of ``project`` objects.
726608

727-
:requestheader Authorization: required token to authenticate.
609+
:requestheader Authorization: token to authenticate.

docs/commercial/index.rst

+22-6
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,35 @@
11
Read the Docs Commercial Features
22
---------------------------------
33

4-
.. note:: These features are for our new commercial offering, `readthedocs.com`_.
4+
Read the Docs has a community solution for open source projects on `readthedocs.org`_
5+
and we offer commercial documentation building and hosting on `readthedocs.com`_.
6+
Features in this section are specific to our commercial offering.
57

8+
Private repositories and private documentation
9+
The largest difference between the community solution and our commercial offering
10+
is the ability to connect to private repositories,
11+
to restrict documentation access to certain users,
12+
or to share private documentation via private hyperlinks.
613

7-
All of the other features outlined in these docs work on both sites.
8-
Things inside this section are specific to our commercial offering.
14+
Additional build resources
15+
Do you have a complicated build process that uses large amounts
16+
of CPU, memory, disk, or networking resources?
17+
Our commercial offering has much higher default resources
18+
that result in faster documentation build times
19+
and we can increase it further for very demanding projects.
920

10-
The largest feature that is different is that documentation on `readthedocs.com`_ is **private**.
11-
If you have private code that you want documentation for,
12-
this is our solution.
21+
Priority support
22+
We have a dedicated support team that responds to support requests during business hours.
23+
If you need a quick turnaround, please signup for readthedocs.com.
1324

25+
Advertising-free
26+
All commercially hosted documentation is always ad-free.
27+
28+
.. _readthedocs.org: https://readthedocs.org
1429
.. _readthedocs.com: https://readthedocs.com
1530

1631
.. toctree::
32+
:caption: Additional commercial features
1733

1834
custom_domains
1935
organizations

docs/config-file/v2.rst

+4
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ Example:
8888
# Build all formats
8989
formats: all
9090
91+
.. note::
92+
93+
PDF/epub/htmlzip output is not supported when using MkDocs
94+
9195
python
9296
~~~~~~
9397

0 commit comments

Comments
 (0)