Yarn docs command now also generates md file for documentation

This commit is contained in:
2019-06-10 00:59:43 +02:00
parent 9a84d6ebf2
commit 2ecc63913c
2 changed files with 155 additions and 1 deletions

154
docs/api.md Normal file
View File

@@ -0,0 +1,154 @@
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->
### Table of Contents
- [getMovie][1]
- [Parameters][2]
- [getShow][3]
- [Parameters][4]
- [getTmdbListByPath][5]
- [Parameters][6]
- [searchTmdb][7]
- [Parameters][8]
- [searchTorrents][9]
- [Parameters][10]
- [addMagnet][11]
- [Parameters][12]
- [request][13]
- [Parameters][14]
- [elasticSearchMoviesAndShows][15]
- [Parameters][16]
## getMovie
Fetches tmdb movie by id. Can optionally include cast credits in result object.
### Parameters
- `id` **[number][17]**
- `credits` **[boolean][18]** Include credits (optional, default `false`)
Returns **[object][19]** Tmdb response
## getShow
Fetches tmdb show by id. Can optionally include cast credits in result object.
### Parameters
- `id` **[number][17]**
- `credits` **[boolean][18]** Include credits (optional, default `false`)
Returns **[object][19]** Tmdb response
## getTmdbListByPath
Fetches tmdb list by path.
### Parameters
- `listPath` **[string][20]** Path of list
- `page` **[number][17]** (optional, default `1`)
Returns **[object][19]** Tmdb list response
## searchTmdb
Fetches tmdb movies and shows by query.
### Parameters
- `query` **[string][20]**
- `page` **[number][17]** (optional, default `1`)
Returns **[object][19]** Tmdb response
## searchTorrents
Search for torrents by query
### Parameters
- `query` **[string][20]**
- `authorization_token`
- `credits` **[boolean][18]** Include credits
Returns **[object][19]** Torrent response
## addMagnet
Add magnet to download queue.
### Parameters
- `magnet` **[string][20]** Magnet link
- `name` **[boolean][18]** Name of torrent
- `tmdb_id` **[boolean][18]**
Returns **[object][19]** Success/Failure response
## request
Request a movie or show from id. If authorization token is included the user will be linked
to the requested item.
### Parameters
- `id` **[number][17]** Movie or show id
- `type` **[string][20]** Movie or show type
- `authorization_token` **[string][20]?** To identify the requesting user (optional, default `undefined`)
Returns **[object][19]** Success/Failure response
## elasticSearchMoviesAndShows
Search elastic indexes movies and shows by query. Doc includes Tmdb daily export of Movies and
Tv Shows. See tmdb docs for more info: [https://developers.themoviedb.org/3/getting-started/daily-file-exports][21]
### Parameters
- `query` **[string][20]**
Returns **[object][19]** List of movies and shows matching query
[1]: #getmovie
[2]: #parameters
[3]: #getshow
[4]: #parameters-1
[5]: #gettmdblistbypath
[6]: #parameters-2
[7]: #searchtmdb
[8]: #parameters-3
[9]: #searchtorrents
[10]: #parameters-4
[11]: #addmagnet
[12]: #parameters-5
[13]: #request
[14]: #parameters-6
[15]: #elasticsearchmoviesandshows
[16]: #parameters-7
[17]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number
[18]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean
[19]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
[20]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String
[21]: https://developers.themoviedb.org/3/getting-started/daily-file-exports