Update API documentation

pull/28/head
knotteye 3 years ago
parent 21a85fa26c
commit bcba160146
  1. 8
      docs/REST.md

@ -55,7 +55,7 @@ play from: rtmp://example.com/live/username or https://example.com/live/username
## /api/users/live/
Returns the usernames and stream titles of 10 users who are currently streaming
Returns the usernames and stream titles of 10 users who are currently streaming, and how many viewers they have.
**Method**: POST
@ -80,7 +80,7 @@ The array will be wrapped in a JSON object under the key 'users'.
Same as above, but returns all users regardless of whether they are streaming and if they're streaming or not. Also returns a value 'live' indicating whether a user is currently streaming.
**Example**: `{users: [{username:"foo", title:"bar", live:1}] }`
**Example**: `{users: [{username:"foo", title:"bar", live:1, viewers:10}] }`
@ -217,9 +217,9 @@ Get information about the specified user.
**Parameters**: user
**Response**: Returns a JSON object with available information about the user. If the user is authenticated and searching for their own information, will return all available information. Otherwise it will return only the stream title, bio, and whether the stream is live. In the case of searching for a user that does not exist, the returned object will contain only the username searched for.
**Response**: Returns a JSON object with available information about the user. If the user is authenticated and searching for their own information, will return all available information. Otherwise it will return only the stream title, bio, viewers and whether the stream is live. In the case of searching for a user that does not exist, the returned object will contain only the username searched for.
**Example**: `{username: "foo", title: "bar", about: "This is an example bio", live: 0}`
**Example**: `{username: "foo", title: "bar", about: "This is an example bio", live: 0, viewers: 10}`