Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MRG] rename variable and restructure API docs #860

Merged
merged 3 commits into from
May 26, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 24 additions & 18 deletions doc/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,33 @@ There's one API endpoint, which is:

::

/build/<provider>/<spec>
/build/<provider_prefix>/<spec>

Even though it says **build** it is actually performs **launch**.
Even though it says **build** it actually performs **launch**.

Provider
--------
**provider_prefix** identifies the provider.
**spec** defines the source of the computing environment to be built and
served using the given provider.
See :ref:`providers-section` for supported inputs.

.. _providers-section:

Provider is a supported provider, and **spec** is the specification for
the given provider.
Providers
---------

Currently supported providers and their specs are:
Currently supported providers, their prefixes and specs are:

+------------+-----------+-------------------------------------------------------------+----------------------------+
| Provider | prefix | spec | notes |
+============+===========+=============================================================+============================+
| GitHub | ``gh`` | ``<user>/<repo>/<commit-sha-or-tag-or-branch>`` | |
+------------+-----------+-------------------------------------------------------------+----------------------------+
| Git | ``git`` | ``<url-escaped-url>/<commit-sha>`` | arbitrary HTTP git repos |
+------------+-----------+-------------------------------------------------------------+----------------------------+
| GitLab | ``gl`` | ``<url-escaped-namespace>/<commit-sha-or-tag-or-branch>`` | |
+------------+-----------+-------------------------------------------------------------+----------------------------+
+------------+--------------------+-------------------------------------------------------------+----------------------------+
| Provider | provider_prefix | spec | notes |
+============+====================+=============================================================+============================+
| GitHub | ``gh`` | ``<user>/<repo>/<commit-sha-or-tag-or-branch>`` | |
+------------+--------------------+-------------------------------------------------------------+----------------------------+
| Git | ``git`` | ``<url-escaped-url>/<commit-sha>`` | arbitrary HTTP git repos |
+------------+--------------------+-------------------------------------------------------------+----------------------------+
| GitLab | ``gl`` | ``<url-escaped-namespace>/<commit-sha-or-tag-or-branch>`` | |
+------------+--------------------+-------------------------------------------------------------+----------------------------+
| Gist | ``gist`` | ``<github-username>/<gist-id><commit-sha-or-tag>`` | |
+------------+--------------------+-------------------------------------------------------------+----------------------------+
nuest marked this conversation as resolved.
Show resolved Hide resolved

Next, construct an appropriate URL and send a request.

Expand Down Expand Up @@ -125,7 +131,7 @@ Launching

When the repo has been built, and we're in the process of waiting for
the hub to launch. This could end up succeeding and emitting a 'ready'
event or failing and emitting a 'failure' event.
event or failing and emitting a 'failed' event.

::

Expand All @@ -137,7 +143,7 @@ Ready
When your notebook is ready! You get a endpoint URL and a token used to
access it. You can access the notebook / API by using the token in one
of the ways the `notebook accepts security
tokens <http://jupyter-notebook.readthedocs.io/en/stable/security.html>`__
tokens <http://jupyter-notebook.readthedocs.io/en/stable/security.html>`__.

::

Expand Down