mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-12-05 15:35:06 +00:00
docs(nav): add a User Guide Server section and move the Python API under Developer
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
This is the full endpoint reference for the unshackle REST API. It covers every route: its method and path, the request body it accepts, the response shape it returns, and the status codes it can give. This page groups the routes into general, download jobs, server management, remote sessions, and the remote services relay.
|
This is the full endpoint reference for the unshackle REST API. It covers every route: its method and path, the request body it accepts, the response shape it returns, and the status codes it can give. This page groups the routes into general, download jobs, server management, remote sessions, and the remote services relay.
|
||||||
|
|
||||||
Start the server with [`unshackle serve`](../../guide/cli-reference.md). By default it binds to `127.0.0.1:8786`, and every route lives under the `/api/` prefix. The [Authentication](authentication.md) page gives authentication, server modes, and the `X-Secret-Key` header in detail. Read that first if you have not already. For an end-to-end walkthrough, see the [Quickstart](quickstart.md).
|
Start the server with [`unshackle serve`](../../guide/cli-reference.md). By default it binds to `127.0.0.1:8786`, and every route lives under the `/api/` prefix. The [Authentication](authentication.md) page gives authentication, server modes, and the `X-Secret-Key` header in detail. Read that first if you have not already. For an end-to-end walkthrough, see the [REST API Quick Start](quickstart.md).
|
||||||
|
|
||||||
!!! note "Base URL"
|
!!! note "Base URL"
|
||||||
All examples below assume a base URL of `http://127.0.0.1:8786`. Replace the host and port so that they match your own `unshackle serve -h <host> -p <port>` invocation.
|
All examples below assume a base URL of `http://127.0.0.1:8786`. Replace the host and port so that they match your own `unshackle serve -h <host> -p <port>` invocation.
|
||||||
@@ -1016,7 +1016,7 @@ When a generic (uncategorized) exception reaches a handler, unshackle inspects i
|
|||||||
|
|
||||||
## See also
|
## See also
|
||||||
|
|
||||||
- [REST API overview](index.md). What the server is and when to use it.
|
- [Server Overview](index.md). What the server is and when to use it.
|
||||||
- [Authentication](authentication.md). Keys, server modes, and the `X-Secret-Key` header.
|
- [Authentication](authentication.md). Keys, server modes, and the `X-Secret-Key` header.
|
||||||
- [Quickstart](quickstart.md). A first end-to-end request walkthrough.
|
- [REST API Quick Start](quickstart.md). A first end-to-end request walkthrough.
|
||||||
- [CLI reference: `dl`](../../guide/cli-reference.md#dl). The `dl` flags mirrored by `POST /api/download`.
|
- [CLI reference: `dl`](../../guide/cli-reference.md#dl). The `dl` flags mirrored by `POST /api/download`.
|
||||||
|
|||||||
+12
-13
@@ -1,19 +1,18 @@
|
|||||||
# REST API Overview
|
# Server Overview
|
||||||
|
|
||||||
unshackle ships with a built-in HTTP server. Alongside the command-line tool, you
|
`unshackle serve` starts an HTTP server. The server can give the download engine of the
|
||||||
can operate `unshackle serve` and drive the same download engine over a REST API:
|
command-line tool as a REST API, and your CDM devices to other machines. The
|
||||||
searching services, listing titles and tracks, queueing downloads, watching live
|
[server modes](#server-modes) select which of the two it gives.
|
||||||
progress, and browsing history, all as JSON over HTTP.
|
|
||||||
|
|
||||||
This page explains what the API is for, how to start the server, where it listens,
|
This page is for the operator of the server. The other pages of this section tell you how
|
||||||
and how the endpoints are organised. Later pages cover each area in depth.
|
to set the [API keys](authentication.md), how to watch the server from the
|
||||||
|
[dashboard](dashboard.md), and how a [`dl --remote` client](../../guide/remote-sessions.md)
|
||||||
|
connects to it.
|
||||||
|
|
||||||
!!! info "Who this section is for"
|
!!! info "Pages for client developers"
|
||||||
The REST API is for people who make automation, dashboards, or remote
|
To write a client for the REST API, start with the [REST API Quick Start](quickstart.md).
|
||||||
clients on top of unshackle. If you only download the occasional title, the
|
[Where to go next](#where-to-go-next) lists the other client pages. To download a title,
|
||||||
[command-line tool](../../guide/cli-reference.md) does everything the API does
|
you do not need the server: the [command-line tool](../../guide/cli-reference.md) is simpler.
|
||||||
and is simpler to use. Reach for the API when you want a long-running service, a
|
|
||||||
job queue, or a web front-end.
|
|
||||||
|
|
||||||
## What the API is for
|
## What the API is for
|
||||||
|
|
||||||
|
|||||||
@@ -247,7 +247,7 @@ directories:
|
|||||||
- **[Configuration](configuration-file.md)**. Where `unshackle.yaml` lives and what a first
|
- **[Configuration](configuration-file.md)**. Where `unshackle.yaml` lives and what a first
|
||||||
config holds. The [Configuration Reference](../reference/configuration/index.md) lists every
|
config holds. The [Configuration Reference](../reference/configuration/index.md) lists every
|
||||||
config key.
|
config key.
|
||||||
- **[REST API](../dev/rest-api/index.md)**. Operate the `serve` server to drive downloads
|
- **[Server Overview](../dev/rest-api/index.md)**. Operate the `serve` server to drive downloads
|
||||||
over HTTP.
|
over HTTP.
|
||||||
|
|
||||||
!!! tip "You are never far from help"
|
!!! tip "You are never far from help"
|
||||||
|
|||||||
@@ -680,5 +680,5 @@ unshackle util test video.mkv -m 0:v:0
|
|||||||
## See also
|
## See also
|
||||||
|
|
||||||
- [Installation](../getting-started/installation.md): install unshackle and its dependencies.
|
- [Installation](../getting-started/installation.md): install unshackle and its dependencies.
|
||||||
- [Quickstart](../getting-started/quickstart.md): your first download.
|
- [Quick Start](../getting-started/quickstart.md): your first download.
|
||||||
- [Configuration file](../getting-started/configuration-file.md): set defaults for any `dl` flag and configure vaults, proxies, and directories.
|
- [Configuration file](../getting-started/configuration-file.md): set defaults for any `dl` flag and configure vaults, proxies, and directories.
|
||||||
|
|||||||
+3
-3
@@ -99,16 +99,16 @@ unshackle dl -q 1080 -l en EXAMPLE 81234567
|
|||||||
|
|
||||||
The `dl` command carries all the quality, language, and output flags. The service
|
The `dl` command carries all the quality, language, and output flags. The service
|
||||||
tag (`EXAMPLE` above) selects which streaming service to talk to, and unshackle passes
|
tag (`EXAMPLE` above) selects which streaming service to talk to, and unshackle passes
|
||||||
the value after it to that service. See the [Quickstart](getting-started/quickstart.md)
|
the value after it to that service. See the [Quick Start](getting-started/quickstart.md)
|
||||||
to go from a fresh install to your first file.
|
to go from a fresh install to your first file.
|
||||||
|
|
||||||
## Where to go next
|
## Where to go next
|
||||||
|
|
||||||
- **[Installation](getting-started/installation.md)**. Install unshackle and the external tools it depends on.
|
- **[Installation](getting-started/installation.md)**. Install unshackle and the external tools it depends on.
|
||||||
- **[Quickstart](getting-started/quickstart.md)**. Configure `unshackle.yaml` and do your first download.
|
- **[Quick Start](getting-started/quickstart.md)**. Configure `unshackle.yaml` and do your first download.
|
||||||
- **[Downloading](guide/downloading.md)**. The full `dl` command guide: quality, codecs, languages, track selection, and output.
|
- **[Downloading](guide/downloading.md)**. The full `dl` command guide: quality, codecs, languages, track selection, and output.
|
||||||
- **[Configuration](getting-started/configuration-file.md)**. Where `unshackle.yaml` lives, the directory layout, and how to edit values. Full config key list in the [Configuration Reference](reference/configuration/index.md).
|
- **[Configuration](getting-started/configuration-file.md)**. Where `unshackle.yaml` lives, the directory layout, and how to edit values. Full config key list in the [Configuration Reference](reference/configuration/index.md).
|
||||||
- **[REST API](dev/rest-api/index.md)**. Operate the `serve` HTTP server and drive downloads programmatically.
|
- **[Server Overview](dev/rest-api/index.md)**. Operate the `serve` HTTP server and drive downloads programmatically.
|
||||||
|
|
||||||
!!! tip "Getting help"
|
!!! tip "Getting help"
|
||||||
Operate `unshackle --help` or `unshackle dl --help` at any time. The community
|
Operate `unshackle --help` or `unshackle dl --help` at any time. The community
|
||||||
|
|||||||
@@ -179,7 +179,7 @@ full setup.
|
|||||||
- **Type:** `dict` · **Default:** `{}`
|
- **Type:** `dict` · **Default:** `{}`
|
||||||
|
|
||||||
Configuration for the `serve` command (the built-in REST API server). The full server guide
|
Configuration for the `serve` command (the built-in REST API server). The full server guide
|
||||||
is the [REST API](../../dev/rest-api/index.md) section. These are the config keys.
|
is the [Server](../../dev/rest-api/index.md) section of the user guide. These are the config keys.
|
||||||
|
|
||||||
| Sub-key | Type | Default | Description |
|
| Sub-key | Type | Default | Description |
|
||||||
|---------|------|---------|-------------|
|
|---------|------|---------|-------------|
|
||||||
|
|||||||
+14
-10
@@ -8,9 +8,12 @@ extra_css:
|
|||||||
- assets/extra.css
|
- assets/extra.css
|
||||||
|
|
||||||
exclude_docs: |
|
exclude_docs: |
|
||||||
reference/configuration.md
|
|
||||||
hooks/
|
hooks/
|
||||||
|
|
||||||
|
validation:
|
||||||
|
links:
|
||||||
|
anchors: warn
|
||||||
|
|
||||||
hooks:
|
hooks:
|
||||||
- docs/hooks/download_fields.py
|
- docs/hooks/download_fields.py
|
||||||
watch:
|
watch:
|
||||||
@@ -126,17 +129,21 @@ nav:
|
|||||||
- Key Vaults: guide/vaults.md
|
- Key Vaults: guide/vaults.md
|
||||||
- Output & Naming: guide/output-and-naming.md
|
- Output & Naming: guide/output-and-naming.md
|
||||||
- Subtitles: guide/subtitles.md
|
- Subtitles: guide/subtitles.md
|
||||||
- Remote Sessions: guide/remote-sessions.md
|
|
||||||
- Troubleshooting: guide/troubleshooting.md
|
- Troubleshooting: guide/troubleshooting.md
|
||||||
|
- Server:
|
||||||
|
- dev/rest-api/index.md
|
||||||
|
- Authentication: dev/rest-api/authentication.md
|
||||||
|
- Dashboard: dev/rest-api/dashboard.md
|
||||||
|
- Remote Sessions: guide/remote-sessions.md
|
||||||
- Configuration:
|
- Configuration:
|
||||||
- Overview: reference/configuration/index.md
|
- Overview: reference/configuration/index.md
|
||||||
- Directories: reference/configuration/directories.md
|
- Directories: reference/configuration/directories.md
|
||||||
- Services & Authentication: reference/configuration/services.md
|
- Services & Authentication: reference/configuration/services.md
|
||||||
- Download & Processing: reference/configuration/download.md
|
- Download & Processing: reference/configuration/download.md
|
||||||
- Output & Naming: reference/configuration/output.md
|
- Output & Naming Options: reference/configuration/output.md
|
||||||
- DRM & CDM: reference/configuration/drm.md
|
- DRM & CDM: reference/configuration/drm.md
|
||||||
- Network & Proxy: reference/configuration/network.md
|
- Network & Proxy: reference/configuration/network.md
|
||||||
- Key Vaults: reference/configuration/vaults.md
|
- Key Vault Options: reference/configuration/vaults.md
|
||||||
- Post-Scripts: reference/configuration/post-scripts.md
|
- Post-Scripts: reference/configuration/post-scripts.md
|
||||||
- Other Settings: reference/configuration/misc.md
|
- Other Settings: reference/configuration/misc.md
|
||||||
- Annotated Example: reference/configuration/example.md
|
- Annotated Example: reference/configuration/example.md
|
||||||
@@ -144,15 +151,12 @@ nav:
|
|||||||
- Creating a Service: dev/creating-a-service.md
|
- Creating a Service: dev/creating-a-service.md
|
||||||
- Service Architecture: dev/service-architecture.md
|
- Service Architecture: dev/service-architecture.md
|
||||||
- REST API:
|
- REST API:
|
||||||
- Overview: dev/rest-api/index.md
|
- REST API Quick Start: dev/rest-api/quickstart.md
|
||||||
- Quick Start: dev/rest-api/quickstart.md
|
|
||||||
- Authentication: dev/rest-api/authentication.md
|
|
||||||
- Endpoints: dev/rest-api/endpoints.md
|
- Endpoints: dev/rest-api/endpoints.md
|
||||||
- Job Lifecycle: dev/rest-api/job-lifecycle.md
|
- Job Lifecycle: dev/rest-api/job-lifecycle.md
|
||||||
- Dashboard: dev/rest-api/dashboard.md
|
|
||||||
- Remote Session Protocol: dev/rest-api/remote-sessions.md
|
|
||||||
- Error Responses: dev/rest-api/errors.md
|
- Error Responses: dev/rest-api/errors.md
|
||||||
- API Reference:
|
- Remote Session Protocol: dev/rest-api/remote-sessions.md
|
||||||
|
- Python API:
|
||||||
- Service: reference/api/service.md
|
- Service: reference/api/service.md
|
||||||
- Config: reference/api/config.md
|
- Config: reference/api/config.md
|
||||||
- Tracks: reference/api/tracks.md
|
- Tracks: reference/api/tracks.md
|
||||||
|
|||||||
Reference in New Issue
Block a user