Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docs for media file download API endpoint #35

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions source/includes/_items.md
Original file line number Diff line number Diff line change
Expand Up @@ -737,6 +737,38 @@ Status | Meaning | Description
500 | Internal Server Error | There was an error when attempting to read the cover file.


## Get a Library Item's Media File

```shell
curl "https://abs.example.com/api/items/li_8gch9ve09orgn4fdz8/file/649644248522215261/download" \
-H "Authorization: Bearer exJhbGciOiJI6IkpXVCJ9.eyJ1c2Vyi5NDEyODc4fQ.ZraBFohS4Tg39NszY" \
--output media_file.m4b
```

> The above command writes an audio file.

This endpoint retrieves a library item's specific file.

### HTTP Request

`GET http://abs.example.com/api/items/<ID>/file/<ino>/download`

### URL Parameters

Parameter | Description
--------- | -----------
ID | The ID of the library item.
ino | The ino number of the library item's file (as per [Get a Library Item](#get-a-library-item) output).

### Response

Status | Meaning | Description
------ | ------- | -----------
200 | OK | Success
404 | Not Found | Either no library item exists with the given ID, or the item does file with the given `ino`.
500 | Internal Server Error | There was an error when attempting to read the cover file.


## Upload a Library Item Cover

> Upload a cover image:
Expand Down