summaryrefslogtreecommitdiff
path: root/rest
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2017-10-30 09:04:23 +0100
committerLars-Dominik Braun <lars@6xq.net>2017-10-30 09:04:23 +0100
commitbee738fa44cf2175102b8c86ccf57e0a82784236 (patch)
tree8bc29fe73ab15c42217299477ebadd85e0d58237 /rest
parentbe650017d19c2d6c8d2731ff2535e71c04ed5eb6 (diff)
downloadpandora-apidoc-bee738fa44cf2175102b8c86ccf57e0a82784236.tar.gz
pandora-apidoc-bee738fa44cf2175102b8c86ccf57e0a82784236.tar.bz2
pandora-apidoc-bee738fa44cf2175102b8c86ccf57e0a82784236.zip
Fix tabs vs spaces, move ToC
Diffstat (limited to 'rest')
-rw-r--r--rest/index.rst52
1 files changed, 26 insertions, 26 deletions
diff --git a/rest/index.rst b/rest/index.rst
index e656e4b..cc380c9 100644
--- a/rest/index.rst
+++ b/rest/index.rst
@@ -2,17 +2,6 @@
REST API
========
-.. toctree::
- :maxdepth: 2
-
- authentication
- stations
- bookmarks
- account
- ads
- endpoints
- errorcodes
-
The Pandora REST API is used by modern Pandora apps including the website and
the various mobile apps provided by Pandora. The current REST API has multiple
versions and not all functionality seems to be supported for each version.
@@ -26,6 +15,17 @@ HTTPS. Requests require a ``Content-Type`` header of ``application/json``.
Response bodies are JSON-encoded values. Unlike the JSON v5 API there is no
requirement for time syncronization, Blowfish cryptography, or partner logins.
+.. toctree::
+ :maxdepth: 2
+
+ authentication
+ stations
+ bookmarks
+ account
+ ads
+ endpoints
+ errorcodes
+
.. _rest-csrf-token:
CSRF Token / Cookie
@@ -41,13 +41,13 @@ cookie in each request.
.. code:: http
- POST /api/v1/auth/login HTTP/1.1
- Host: www.pandora.com
+ POST /api/v1/auth/login HTTP/1.1
+ Host: www.pandora.com
Content-Type: application/json;charset=utf-8
- X-CsrfToken: 123456a7889b1c23
- X-AuthToken:
+ X-CsrfToken: 123456a7889b1c23
+ X-AuthToken:
- { "username": "foo", "password": "bar" }
+ { "username": "foo", "password": "bar" }
.. _rest-auth-token:
@@ -59,13 +59,13 @@ the auth token obtained during login. It is acceptable to include the
.. code:: http
- POST /api/v1/station/getStations HTTP/1.1
- Host: www.pandora.com
+ POST /api/v1/station/getStations HTTP/1.1
+ Host: www.pandora.com
Content-Type: application/json;charset=utf-8
- X-CsrfToken: 123456a7889b1c23
- X-AuthToken: dGhpcyBpcyBqdXN0IGFuIGV4YW1wbGUgY29kZQo=
+ X-CsrfToken: 123456a7889b1c23
+ X-AuthToken: dGhpcyBpcyBqdXN0IGFuIGV4YW1wbGUgY29kZQo=
- { "pageSize": 250 }
+ { "pageSize": 250 }
Errors
======
@@ -74,8 +74,8 @@ response body. Any responses with a 200 status code are successful.
.. code:: json
- {
- "errorCode": 0,
- "errorString": "INVALID_REQUEST",
- "message": "The request could not be validated"
- }
+ {
+ "errorCode": 0,
+ "errorString": "INVALID_REQUEST",
+ "message": "The request could not be validated"
+ }