docs: add dev-cli page

This commit is contained in:
William Oldham 2023-10-03 23:02:53 +01:00
parent f6852f1f7f
commit 912765203a
2 changed files with 33 additions and 0 deletions

View File

@ -0,0 +1,31 @@
# Testing Providers
In order to test providers effectively, a built-in tool can be used which allows testing of individual source and embed providers.
There are two ways to use the tool:
- Command Line Mode - For passing in arguments directly to the script. This is useful in non-interactive environments such as CI or to repeatedly test during development.
- Question Mode - Where the script asks you questions about which source you wish to test.
::code-group
```bash [Interactive]
npm run test:dev
```
```bash [Command Line]
npm run test:dev -- [options]
# Example testing FlixHQ with "Spirited Away"
npm run test:dev -- -sid flixhq -tid 129 -t movie
```
::
The following Command Line Mode arguments are available:
| Argument | Alias | Description | Default |
|---------------|--------|-------------------------------------------------------------------------|--------------|
| `--fetcher` | `-f` | Fetcher type. Either `node-fetch` or `native` | `node-fetch` |
| `--source-id` | `-sid` | Source ID for the source to be tested | |
| `--tmdb-id` | `-tid` | TMDB ID for the media to scrape. Only used if source is a provider | |
| `--type` | `-t` | Media type. Either `movie` or `show`. Only used if source is a provider | `movie` |
| `--season` | `-s` | Season number. Only used if type is `show` | `0` |
| `--episode` | `-e` | Episode number. Only used if type is `show` | `0` |
| `--url` | `-u` | URL to a video embed. Only used if source is an embed | |
| `--help` | `-h` | Shows help for the command arguments | |

View File

@ -0,0 +1,2 @@
icon: ph:code
navigation.redirect: /developer/dev-cli