Skip to content

Commit

Permalink
Merge pull request #2 from KevinMidboe/release/v2
Browse files Browse the repository at this point in the history
Release/v1
  • Loading branch information
KevinMidboe authored Oct 23, 2019
2 parents e2f0d07 + 1c0799a commit d7e4d20
Show file tree
Hide file tree
Showing 56 changed files with 8,372 additions and 3,540 deletions.
7 changes: 5 additions & 2 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"presets": [
["es2015", { "modules": false }]
]
["@babel/preset-env", {
"useBuiltIns": false
}]
],
"plugins": ["@babel/plugin-transform-runtime"]
}
12 changes: 10 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
.DS_Store
# config file - copy config.json.example
src/config.json

# Build directory
dist/

# Node packages
node_modules/
npm-debug.log
dist/

# MacOS trash
.DS_Store
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,19 @@ A Vue.js project.

[TMDB Vue App](https://tmdb-vue-app.herokuapp.com/)

## Config setup
Set seasonedShows api endpoint and/or elastic.
- SeasonedShows [can be found here](https://github.com/kevinmidboe/seasonedshows) and is the matching backend to fetch tmdb search results, tmdb lists, request new content, check plex status and lets owner search and add torrents to download.
- Elastic is optional and can be used for a instant search feature for all movies and shows registered in tmdb.

```json
{
"SEASONED_URL": "http://localhost:31459/api",
"ELASTIC_URL": "http://localhost:9200"
}
```
*Set ELASTIC_URL to undefined or false to disable*

## Build Setup

``` bash
Expand All @@ -24,5 +37,9 @@ npm run build
For detailed explanation on how things work, consult the [docs for vue-loader](http://vuejs.github.io/vue-loader).
This app uses [history mode](https://router.vuejs.org/en/essentials/history-mode.html)

## Documentation
All api functions are documented in `/docs` and [found here](docs/api.md).
[html version also available](http://htmlpreview.github.io/?https://github.com/KevinMidboe/seasoned/blob/release/v2/docs/api/index.html)

## License
[MIT](https://github.com/dmtrbrl/tmdb-app/blob/master/LICENSE)
154 changes: 154 additions & 0 deletions docs/api.md
Original file line number Diff line number Diff line change
@@ -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
76 changes: 40 additions & 36 deletions index.html

Large diffs are not rendered by default.

37 changes: 21 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,38 +1,43 @@
{
"name": "tmdb-app",
"description": "The Movie Database app ",
"version": "1.1.0",
"author": "Dmytro Barylo",
"name": "seasoned-request",
"description": "seasoned request app",
"version": "1.0.0",
"author": "Kevin Midboe",
"private": true,
"scripts": {
"dev": "cross-env NODE_ENV=development webpack-dev-server --hot --port=5000",
"dev": "cross-env NODE_ENV=development webpack-dev-server --hot",
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules",
"start": "node server.js"
"start": "node server.js",
"docs": "documentation build src/api.js -f html -o docs/api && documentation build src/api.js -f md -o docs/api.md"
},
"dependencies": {
"ag-grid-vue": "^17.0.0",
"axios": "^0.15.3",
"axios": "^0.18.1",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"connect-history-api-fallback": "^1.3.0",
"debounce": "^1.0.0",
"express": "^4.16.1",
"numeral": "^2.0.4",
"vue": "^2.1.0",
"vue": "^2.5.2",
"vue-axios": "^1.2.2",
"vue-data-tablee": "^0.12.1",
"vue-js-modal": "^1.3.16",
"vue-router": "^2.2.1"
"vue-router": "^3.0.1",
"vuex": "^3.1.0"
},
"devDependencies": {
"babel-core": "^6.0.0",
"babel-loader": "^6.0.0",
"babel-preset-es2015": "^6.0.0",
"@babel/core": "^7.4.5",
"@babel/plugin-transform-runtime": "^7.4.4",
"@babel/preset-env": "^7.4.5",
"@babel/runtime": "^7.4.5",
"babel-loader": "^8.0.6",
"cross-env": "^3.0.0",
"css-loader": "^0.25.0",
"documentation": "^11.0.0",
"file-loader": "^0.9.0",
"node-sass": "^4.5.0",
"sass-loader": "^5.0.1",
"schema-utils": "^2.4.1",
"vue-loader": "^10.0.0",
"vue-template-compiler": "^2.1.0",
"vue-svg-inline-loader": "^1.3.1",
"vue-template-compiler": "2.6.10",
"webpack": "^2.2.0",
"webpack-dev-server": "^2.2.0"
}
Expand Down
2 changes: 2 additions & 0 deletions server.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
var express = require('express');
var path = require('path');
const compression = require('compression')
var history = require('connect-history-api-fallback');

app = express();

app.use(compression())
app.use('/dist', express.static(path.join(__dirname + "/dist")));
app.use('/dist', express.static(path.join(__dirname + "/dist/")));
app.use('/favicons', express.static(path.join(__dirname + "/favicons")));
Expand Down
Loading

0 comments on commit d7e4d20

Please sign in to comment.