From bee738fa44cf2175102b8c86ccf57e0a82784236 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Mon, 30 Oct 2017 09:04:23 +0100 Subject: Fix tabs vs spaces, move ToC --- rest/index.rst | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) (limited to 'rest') 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" + } -- cgit v1.2.3