Skip to content

Commit

Permalink
Remove author search, series search and update users online to remove…
Browse files Browse the repository at this point in the history
… mostRecent attribute
  • Loading branch information
advplyr committed Sep 26, 2023
1 parent 8e9729d commit 85cf561
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 300 deletions.
51 changes: 0 additions & 51 deletions source/includes/_authors.md
Original file line number Diff line number Diff line change
@@ -1,56 +1,5 @@
# Authors

## Search for Authors

```shell
curl "https://abs.example.com/api/authors/search?q=Terry%20Goodkind" \
-H "Authorization: Bearer exJhbGciOiJI6IkpXVCJ9.eyJ1c2Vyi5NDEyODc4fQ.ZraBFohS4Tg39NszY"
```

> The above command returns JSON structured like this:
```json
{
"results": [
{
"id": "aut_z3leimgybl7uf3y4ab",
"asin": null,
"name": "Terry Goodkind",
"description": null,
"imagePath": null,
"addedAt": 1650621073750,
"updatedAt": 1650621073750
}
]
}
```

This endpoint searches for authors that match the query and returns the results.

### HTTP Request

`GET https://abs.example.com/api/authors/search?<q>`

### Query Parameters

Parameter | Type | Default | Description
--------- | ---- | ------- | -----------
q | String | **Required** | The URL encoded search query.
limit | Integer | `25` | Limit the number of returned results.

### Response

Status | Meaning | Description | Schema
------ | ------- | ----------- | ------
200 | OK | Success | See Below

#### Response Schema

Attribute | Type | Description
--------- | ---- | -----------
`results` | Array of [Author](#author) | The author search results.


## Get an Author

```shell
Expand Down
6 changes: 2 additions & 4 deletions source/includes/_schemas.md
Original file line number Diff line number Diff line change
Expand Up @@ -1767,15 +1767,14 @@ Attribute | Type | Description
```

<!-- User.toJSONForPublic() -->
> User with Session and Most Recent Progress
> User with Session
```json
{
"id": "root",
"username": "root",
"type": "root",
"session": null,
"mostRecent": {...},
"lastSeen": 1668296147437,
"createdAt": 1666543632566
}
Expand Down Expand Up @@ -1804,7 +1803,7 @@ Attribute | Type | Description

* `mediaProgress` is an Array of [Media Progress with Media](#media-progress-with-media)

### User with Session and Most Recent Progress
### User with Session

#### Removed Attributes

Expand All @@ -1824,7 +1823,6 @@ Attribute | Type | Description
Attribute | Type | Description
--------- | ---- | -----------
`session` | [Playback Session Expanded](#playback-session-expanded) Object or null | The user's currently playing session. Will be `null` if the user is not currently playing anything.
`mostRecent` | [Media Progress with Media](#media-progress-with-media) Object or null | The user's most recent media progress. Will be `null` if the user has no media progress.


## User Permissions
Expand Down
49 changes: 0 additions & 49 deletions source/includes/_series.md
Original file line number Diff line number Diff line change
@@ -1,54 +1,5 @@
# Series Endpoints

## Search for Series

```shell
curl "https://abs.example.com/api/series/search?q=Sword" \
-H "Authorization: Bearer exJhbGciOiJI6IkpXVCJ9.eyJ1c2Vyi5NDEyODc4fQ.ZraBFohS4Tg39NszY"
```

> The above command returns JSON structured like this:
```json
{
"results": [
{
"id": "ser_cabkj4jeu8be3rap4g",
"name": "Sword of Truth",
"description": null,
"addedAt": 1650621073750,
"updatedAt": 1650621073750
}
]
}
```

This endpoint searches for series that match the query and returns the results.

### HTTP Request

`GET https://abs.example.com/api/series/search?<q>`

### Query Parameters

Parameter | Type | Default | Description
--------- | ---- | ------- | -----------
q | String | **Required** | The URL encoded search query.
limit | Integer | `25` | Limit the number of returned results.

### Response

Status | Meaning | Description | Schema
------ | ------- | ----------- | ------
200 | OK | Success | See Below

#### Response Schema

Attribute | Type | Description
--------- | ---- | -----------
`results` | Array of [Series](#series) | The series search results.


## Get a Series

```shell
Expand Down
8 changes: 4 additions & 4 deletions source/includes/_socket.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@ Events marked with "**Admin Only**" are only sent to sockets with an authenticat

Name | Description | Schema
---- | ----------- | ------
`user_online` | **Admin Only** A user is online. | [User with Session and Most Recent Progress](#user-with-session-and-most-recent-progress) Object
`user_offline` | **Admin Only** A user is offline. | [User with Session and Most Recent Progress](#user-with-session-and-most-recent-progress) Object
`user_online` | **Admin Only** A user is online. | [User with Session](#user-with-session) Object
`user_offline` | **Admin Only** A user is offline. | [User with Session](#user-with-session) Object
`user_added` | **Admin Only** A user was created. | [User](#user) Object
`user_updated` | The authenticated user has been updated. | [User](#user) Object
`user_removed` | **Admin Only** A user was deleted. | [User](#user) Object
`user_item_progress_updated` | One of the authenticated user's media progress was created/updated. | [User Item Progress Updated Event](#user-item-progress-updated-event)
`user_stream_update` | **Admin Only** A user started or stopped a playback session. | [User with Session and Most Recent Progress](#user-with-session-and-most-recent-progress) Object
`user_stream_update` | **Admin Only** A user started or stopped a playback session. | [User with Session](#user-with-session) Object

### User Item Progress Updated Event

Expand Down Expand Up @@ -429,7 +429,7 @@ Attribute | Type | Description
`userId` | String | The ID of the authenticated user.
`username` | String | The username of the authenticated user.
`librariesScanning` | Array of String | The IDs of libraries currently being scanned.
`usersOnline` | Array of [User with Session and Most Recent Progress](#user-with-session-and-most-recent-progress) | Users that are currently online. Will only exist when the authenticated user is an admin.
`usersOnline` | Array of [User with Session](#user-with-session) | Users that are currently online. Will only exist when the authenticated user is an admin.

### Log Event

Expand Down
193 changes: 1 addition & 192 deletions source/includes/_users.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,197 +164,6 @@ curl "https://abs.example.com/api/users/online" \
"username": "paul",
"type": "root",
"session": null,
"mostRecent": {
"id": "li_bufnnmp4y5o2gbbxfm-ep_lh6ko39pumnrma3dhv",
"libraryItemId": "li_bufnnmp4y5o2gbbxfm",
"episodeId": "ep_lh6ko39pumnrma3dhv",
"duration": 1454.18449,
"progress": 0.41038768196461783,
"currentTime": 596.779402,
"isFinished": false,
"hideFromContinueListening": false,
"lastUpdate": 1668329493006,
"startedAt": 1668120083771,
"finishedAt": null,
"media": {
"libraryItemId": "li_bufnnmp4y5o2gbbxfm",
"metadata": {
"title": "Welcome to Night Vale",
"titleIgnorePrefix": "Welcome to Night Vale",
"author": "Night Vale Presents",
"description": "\n Twice-monthly community updates for the small desert town of Night Vale, where every conspiracy theory is true. Turn on your radio and hide. Never listened before? It's an ongoing radio show. Start with the current episode, and you'll catch on in no time. Or, go right to Episode 1 if you wanna binge-listen.\n ",
"releaseDate": "2022-10-20T19:00:00Z",
"genres": [
"Science Fiction",
"Podcasts",
"Fiction"
],
"feedUrl": "http://feeds.nightvalepresents.com/welcometonightvalepodcast",
"imageUrl": "https://is4-ssl.mzstatic.com/image/thumb/Podcasts125/v4/4a/31/35/4a3135d0-1fe7-a2d7-fb43-d182ec175402/mza_8232698753950666850.jpg/600x600bb.jpg",
"itunesPageUrl": "https://podcasts.apple.com/us/podcast/welcome-to-night-vale/id536258179?uo=4",
"itunesId": 536258179,
"itunesArtistId": 718704794,
"explicit": false,
"language": null
},
"coverPath": "/metadata/items/li_bufnnmp4y5o2gbbxfm/cover.jpg",
"tags": [],
"episodes": [
{
"libraryItemId": "li_bufnnmp4y5o2gbbxfm",
"id": "ep_lh6ko39pumnrma3dhv",
"index": 1,
"season": "",
"episode": "",
"episodeType": "full",
"title": "1 - Pilot",
"subtitle": "Pilot Episode. A new dog park opens in Night Vale. Carlos, a scientist, visits and discovers some interesting things. Seismic things. Plus, a helpful guide to surveillance helicopter-spotting. Weather: \"These and More Than These\" by Joseph Fink Music:...",
"description": "<div><br>Pilot Episode. A new dog park opens in Night Vale. Carlos, a scientist, visits and discovers some interesting things. Seismic things. Plus, a helpful guide to surveillance helicopter-spotting.<br><br></div><div><br>Weather: \"These and More Than These\" by Joseph Fink<br><br></div><div><br>Music: Disparition, disparition.info<br><br></div><div><br>Logo: Rob Wilson, silastom.com<br><br></div><div><br>Produced by Night Vale Presents. Written by Joseph Fink and Jeffrey Cranor. Narrated by Cecil Baldwin. More Info: welcometonightvale.com, and follow @NightValeRadio on Twitter or Facebook.<br><br></div>",
"enclosure": {
"url": "https://www.podtrac.com/pts/redirect.mp3/dovetail.prxu.org/_/126/1fadf1ad-aad8-449f-843b-6e8bb6949622/1_Pilot.mp3",
"type": "audio/mpeg",
"length": "20588611"
},
"pubDate": "Fri, 15 Jun 2012 12:00:00 -0000",
"audioFile": {
"index": 1,
"ino": "22587",
"metadata": {
"filename": "1 - Pilot.mp3",
"ext": ".mp3",
"path": "/podcasts/Welcome to Night Vale/1 - Pilot.mp3",
"relPath": "1 - Pilot.mp3",
"size": 23653735,
"mtimeMs": 1667326682557,
"ctimeMs": 1667326682557,
"birthtimeMs": 1667326679508
},
"addedAt": 1667326682605,
"updatedAt": 1668234380150,
"trackNumFromMeta": null,
"discNumFromMeta": null,
"trackNumFromFilename": null,
"discNumFromFilename": null,
"manuallyVerified": false,
"invalid": false,
"exclude": false,
"error": null,
"format": "MP2/3 (MPEG audio layer 2/3)",
"duration": 1454.18449,
"bitRate": 128000,
"language": null,
"codec": "mp3",
"timeBase": "1/14112000",
"channels": 2,
"channelLayout": "stereo",
"chapters": [],
"embeddedCoverArt": "mjpeg",
"metaTags": {
"tagAlbum": "Welcome to Night Vale",
"tagArtist": "Night Vale Presents",
"tagGenre": "Podcast",
"tagTitle": "1 - Pilot",
"tagDate": "2012",
"tagEncoder": "Lavf58.45.100"
},
"mimeType": "audio/mpeg"
},
"audioTrack": {
"index": 1,
"startOffset": 0,
"duration": 1454.18449,
"title": "1 - Pilot.mp3",
"contentUrl": "/s/item/li_bufnnmp4y5o2gbbxfm/1 - Pilot.mp3",
"mimeType": "audio/mpeg",
"metadata": {
"filename": "1 - Pilot.mp3",
"ext": ".mp3",
"path": "/podcasts/Welcome to Night Vale/1 - Pilot.mp3",
"relPath": "1 - Pilot.mp3",
"size": 23653735,
"mtimeMs": 1667326682557,
"ctimeMs": 1667326682557,
"birthtimeMs": 1667326679508
}
},
"publishedAt": 1339761600000,
"addedAt": 1667326679503,
"updatedAt": 1667428186431,
"duration": 1454.18449,
"size": 23653735
}
],
"autoDownloadEpisodes": false,
"autoDownloadSchedule": "0 0 * * 1",
"lastEpisodeCheck": 1667326662087,
"maxEpisodesToKeep": 0,
"maxNewEpisodesToDownload": 3,
"size": 23653735
},
"episode": {
"libraryItemId": "li_bufnnmp4y5o2gbbxfm",
"id": "ep_lh6ko39pumnrma3dhv",
"index": 1,
"season": "",
"episode": "",
"episodeType": "full",
"title": "1 - Pilot",
"subtitle": "Pilot Episode. A new dog park opens in Night Vale. Carlos, a scientist, visits and discovers some interesting things. Seismic things. Plus, a helpful guide to surveillance helicopter-spotting. Weather: \"These and More Than These\" by Joseph Fink Music:...",
"description": "<div><br>Pilot Episode. A new dog park opens in Night Vale. Carlos, a scientist, visits and discovers some interesting things. Seismic things. Plus, a helpful guide to surveillance helicopter-spotting.<br><br></div><div><br>Weather: \"These and More Than These\" by Joseph Fink<br><br></div><div><br>Music: Disparition, disparition.info<br><br></div><div><br>Logo: Rob Wilson, silastom.com<br><br></div><div><br>Produced by Night Vale Presents. Written by Joseph Fink and Jeffrey Cranor. Narrated by Cecil Baldwin. More Info: welcometonightvale.com, and follow @NightValeRadio on Twitter or Facebook.<br><br></div>",
"enclosure": {
"url": "https://www.podtrac.com/pts/redirect.mp3/dovetail.prxu.org/_/126/1fadf1ad-aad8-449f-843b-6e8bb6949622/1_Pilot.mp3",
"type": "audio/mpeg",
"length": "20588611"
},
"pubDate": "Fri, 15 Jun 2012 12:00:00 -0000",
"audioFile": {
"index": 1,
"ino": "22587",
"metadata": {
"filename": "1 - Pilot.mp3",
"ext": ".mp3",
"path": "/podcasts/Welcome to Night Vale/1 - Pilot.mp3",
"relPath": "1 - Pilot.mp3",
"size": 23653735,
"mtimeMs": 1667326682557,
"ctimeMs": 1667326682557,
"birthtimeMs": 1667326679508
},
"addedAt": 1667326682605,
"updatedAt": 1668234380150,
"trackNumFromMeta": null,
"discNumFromMeta": null,
"trackNumFromFilename": null,
"discNumFromFilename": null,
"manuallyVerified": false,
"invalid": false,
"exclude": false,
"error": null,
"format": "MP2/3 (MPEG audio layer 2/3)",
"duration": 1454.18449,
"bitRate": 128000,
"language": null,
"codec": "mp3",
"timeBase": "1/14112000",
"channels": 2,
"channelLayout": "stereo",
"chapters": [],
"embeddedCoverArt": "mjpeg",
"metaTags": {
"tagAlbum": "Welcome to Night Vale",
"tagArtist": "Night Vale Presents",
"tagGenre": "Podcast",
"tagTitle": "1 - Pilot",
"tagDate": "2012",
"tagEncoder": "Lavf58.45.100"
},
"mimeType": "audio/mpeg"
},
"publishedAt": 1339761600000,
"addedAt": 1667326679503,
"updatedAt": 1667428186431
}
},
"lastSeen": 1668324661087,
"createdAt": 1666543632566
}
Expand Down Expand Up @@ -429,7 +238,7 @@ Status | Meaning | Description | Schema

Attribute | Type | Description
--------- | ---- | -----------
`usersOnline` | Array of [User with Session and Most Recent Progress](#user-with-session-and-most-recent-progress) | The users that are currently online.
`usersOnline` | Array of [User with Session](#user-with-session) | The users that are currently online.
`openSessions` | Array of [Playback Session](#playback-session) | The currently playing playback sessions.


Expand Down

0 comments on commit 85cf561

Please sign in to comment.