mirror of
https://github.com/tubearchivist/docs.git
synced 2024-11-22 03:40:14 +00:00
intro: add curl example to add new video to download queue
This commit is contained in:
parent
6315f3ad71
commit
732d4c9a39
@ -19,9 +19,15 @@ This page has a generic overview with how the Tube Archivist API functions. This
|
|||||||
API token will get automatically created, accessible on the settings page. Token needs to be passed as an authorization header with every request. Additionally session based authentication is enabled too: When you are logged into your TubeArchivist instance, you'll have access to the api in the browser for testing.
|
API token will get automatically created, accessible on the settings page. Token needs to be passed as an authorization header with every request. Additionally session based authentication is enabled too: When you are logged into your TubeArchivist instance, you'll have access to the api in the browser for testing.
|
||||||
|
|
||||||
Curl example:
|
Curl example:
|
||||||
```shell
|
```sh
|
||||||
curl -v /api/video/<video-id>/ \
|
token="<...>"
|
||||||
-H "Authorization: Token xxxxxxxxxx"
|
data='{"data":[{"youtube_id": "jNQXAC9IVRw", "status":"pending"}]}'
|
||||||
|
|
||||||
|
curl \
|
||||||
|
"http://tubearchive.local:80/api/download/" \
|
||||||
|
-H "Authorization: Token $token" \
|
||||||
|
-H 'Content-Type: application/json' \
|
||||||
|
--data "$data"
|
||||||
```
|
```
|
||||||
|
|
||||||
Python requests example:
|
Python requests example:
|
||||||
|
Loading…
Reference in New Issue
Block a user