Change .. code:: to .. code-block::
Sphinx uses .. code-block:: directives to enable highlighting:
http://sphinx-doc.org/markup/code.html#directive-code-block
Use
for i in *.rst; do
sed -i 's/code::/code-block::/g' $i
done
to update these strings to enable proper highlighting.
Note: A have disabled the windows "bash" one, because the highlighting
is broken anyway...
This commit is contained in:
@@ -12,7 +12,7 @@ tree we want to dwell down (0 based, defaults to unlimited depth)
|
||||
Optional parameter ``prefix`` defines a prefix within the tree where to
|
||||
start building the structure.
|
||||
|
||||
.. code:: bash
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl -s http://localhost:8384/rest/db/browse?folder=default | json_pp
|
||||
{
|
||||
|
||||
@@ -4,7 +4,7 @@ GET /rest/db/completion
|
||||
Returns the completion percentage (0 to 100) for a given device and
|
||||
folder.Takes ``device`` and ``folder`` parameters.
|
||||
|
||||
.. code:: json
|
||||
.. code-block:: json
|
||||
|
||||
{
|
||||
"completion": 0
|
||||
|
||||
@@ -4,7 +4,7 @@ GET /rest/db/file
|
||||
Returns most data available about a given file, including version and
|
||||
availability.
|
||||
|
||||
.. code:: json
|
||||
.. code-block:: json
|
||||
|
||||
{
|
||||
"availability": [
|
||||
|
||||
@@ -7,7 +7,7 @@ provides a compiled version of all included ignore patterns in the form
|
||||
of regular expressions. Excluded items in the ``patterns`` field have a
|
||||
nonstandard ``(?exclude)`` marker in front of the regular expression.
|
||||
|
||||
.. code:: json
|
||||
.. code-block:: json
|
||||
|
||||
{
|
||||
"ignore": [
|
||||
|
||||
@@ -4,7 +4,7 @@ GET /rest/db/need
|
||||
Takes one parameter, ``folder``, and returns lists of files which are
|
||||
needed by this device in order for it to become in sync.
|
||||
|
||||
.. code:: bash
|
||||
.. code-block:: bash
|
||||
|
||||
{
|
||||
# Files currently being downloaded
|
||||
|
||||
@@ -3,7 +3,7 @@ POST /rest/db/prio
|
||||
|
||||
Moves the file to the top of the download queue.
|
||||
|
||||
.. code:: bash
|
||||
.. code-block:: bash
|
||||
|
||||
curl -X POST http://127.0.0.1:8384/rest/db/prio?folder=default&file=foo/bar
|
||||
|
||||
|
||||
@@ -16,6 +16,6 @@ question.
|
||||
Returns status 200 and no content upon success, or status 500 and a
|
||||
plain text error if an error occurred during scanning.
|
||||
|
||||
.. code:: bash
|
||||
.. code-block:: bash
|
||||
|
||||
curl -X POST http://127.0.0.1:8384/rest/db/scan?folder=default&sub=foo/bar
|
||||
|
||||
@@ -5,7 +5,7 @@ Returns information about the current status of a folder.
|
||||
|
||||
Parameters: ``folder``, the ID of a folder.
|
||||
|
||||
.. code:: bash
|
||||
.. code-block:: bash
|
||||
|
||||
{
|
||||
# latest version according to cluster:
|
||||
|
||||
@@ -4,7 +4,7 @@ GET /rest/stats/device
|
||||
Returns general statistics about devices. Currently, only contains the
|
||||
time the device was last seen.
|
||||
|
||||
.. code:: bash
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl -s http://localhost:8384/rest/stats/device | json
|
||||
{
|
||||
|
||||
@@ -4,7 +4,7 @@ GET /rest/stats/folder
|
||||
Returns general statistics about folders. Currently, only contains the
|
||||
last synced file.
|
||||
|
||||
.. code:: bash
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl -s http://localhost:8384/rest/stats/folder | json
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@ Verifies and formats a device ID. Accepts all currently valid formats
|
||||
with trivial substitutions). Takes one parameter, ``id``, and returns
|
||||
either a valid device ID in modern format, or an error.
|
||||
|
||||
.. code:: bash
|
||||
.. code-block:: bash
|
||||
|
||||
$ curl -s http://localhost:8384/rest/svc/deviceid?id=1234 | json
|
||||
{
|
||||
|
||||
@@ -4,6 +4,6 @@ GET /rest/svc/lang
|
||||
Returns a list of canonicalized localization codes, as picked up from
|
||||
the ``Accept-Language`` header sent by the browser.
|
||||
|
||||
.. code:: json
|
||||
.. code-block:: json
|
||||
|
||||
["sv_sv","sv","en_us","en"]
|
||||
|
||||
@@ -3,7 +3,7 @@ GET /rest/svc/report
|
||||
|
||||
Returns the data sent in the anonymous usage report.
|
||||
|
||||
.. code:: json
|
||||
.. code-block:: json
|
||||
|
||||
{
|
||||
"folderMaxFiles": 42106,
|
||||
|
||||
@@ -3,7 +3,7 @@ GET /rest/system/config
|
||||
|
||||
Returns the current configuration.
|
||||
|
||||
.. code:: bash
|
||||
.. code-block:: bash
|
||||
|
||||
{
|
||||
# etc
|
||||
|
||||
@@ -4,7 +4,7 @@ GET /rest/system/config/insync
|
||||
Returns whether the config is in sync, i.e. whether the running
|
||||
configuration is the same as that on disk.
|
||||
|
||||
.. code:: json
|
||||
.. code-block:: json
|
||||
|
||||
{
|
||||
"configInSync": true
|
||||
|
||||
@@ -4,7 +4,7 @@ GET /rest/system/connections
|
||||
Returns the list of current connections and some metadata associated
|
||||
with the connection/peer.
|
||||
|
||||
.. code:: json
|
||||
.. code-block:: json
|
||||
|
||||
{
|
||||
"connections": {
|
||||
|
||||
@@ -3,7 +3,7 @@ GET /rest/system/discovery
|
||||
|
||||
Returns the contents of the local discovery cache.
|
||||
|
||||
.. code:: json
|
||||
.. code-block:: json
|
||||
|
||||
{
|
||||
"LGFPDIT7SKNNJVJZA4FC7QNCRKCE753K72BW5QD2FOZ7FRFEP57Q": [
|
||||
|
||||
@@ -4,7 +4,7 @@ POST /rest/system/discovery/hint
|
||||
Post with the query parameters ``device`` and ``addr`` to add entries to
|
||||
the discovery cache.
|
||||
|
||||
.. code:: bash
|
||||
.. code-block:: bash
|
||||
|
||||
curl -X POST http://127.0.0.1:8384/rest/system/discovery/hint?device=LGFPDIT7SKNNJVJZA4FC7QNCRKCE753K72BW5QD2FOZ7FRFEP57Q\&addr=192.162.129.11:22000
|
||||
# Or with the X-API-Key header:
|
||||
|
||||
@@ -3,7 +3,7 @@ GET /rest/system/error
|
||||
|
||||
Returns the list of recent errors.
|
||||
|
||||
.. code:: json
|
||||
.. code-block:: json
|
||||
|
||||
{
|
||||
"errors": [
|
||||
|
||||
@@ -3,7 +3,7 @@ GET /rest/system/ping
|
||||
|
||||
Returns a ``{"ping": "pong"}`` object.
|
||||
|
||||
.. code:: json
|
||||
.. code-block:: json
|
||||
|
||||
{
|
||||
"ping": "pong"
|
||||
|
||||
@@ -3,7 +3,7 @@ GET /rest/system/status
|
||||
|
||||
Returns information about current system status and resource usage.
|
||||
|
||||
.. code:: json
|
||||
.. code-block:: json
|
||||
|
||||
{
|
||||
"alloc": 30618136,
|
||||
|
||||
@@ -4,7 +4,7 @@ GET /rest/system/upgrade
|
||||
Checks for a possible upgrade and returns an object describing the
|
||||
newest version and upgrade possibility.
|
||||
|
||||
.. code:: json
|
||||
.. code-block:: json
|
||||
|
||||
{
|
||||
"latest": "v0.10.27",
|
||||
|
||||
@@ -3,7 +3,7 @@ GET /rest/system/version
|
||||
|
||||
Returns the current Syncthing version information.
|
||||
|
||||
.. code:: json
|
||||
.. code-block:: json
|
||||
|
||||
{
|
||||
"arch": "amd64",
|
||||
|
||||
Reference in New Issue
Block a user