mirror of
https://github.com/movie-web/providers.git
synced 2025-09-13 08:23:26 +00:00
Compare commits
3 Commits
09eadfd306
...
docs-updat
Author | SHA1 | Date | |
---|---|---|---|
|
912765203a | ||
|
f6852f1f7f | ||
|
7322bf4519 |
@@ -1,7 +1,7 @@
|
||||
# Fetchers
|
||||
|
||||
When making an instance of the library using `makeProviders()`. It will immediately make a fetcher.
|
||||
This comes with some considerations depending on the environment youre running.
|
||||
This comes with some considerations depending on the environment you're running.
|
||||
|
||||
## Using `fetch()`
|
||||
In most cases, you can use the `fetch()` API. This will work in newer versions of Node.js (18 and above) and on the browser.
|
||||
|
@@ -1,2 +1,3 @@
|
||||
icon: ph:file-code-fill
|
||||
navigation.redirect: /api/makeproviders
|
||||
navigation.title: API
|
||||
|
31
.docs/content/3.Developer/0.dev-cli.md
Normal file
31
.docs/content/3.Developer/0.dev-cli.md
Normal 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 | |
|
2
.docs/content/3.Developer/_dir.yml
Normal file
2
.docs/content/3.Developer/_dir.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
icon: ph:code
|
||||
navigation.redirect: /developer/dev-cli
|
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@movie-web/providers",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.1",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@movie-web/providers",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.1",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"cheerio": "^1.0.0-rc.12",
|
||||
|
Reference in New Issue
Block a user