Skip to content

Commit

Permalink
feat(flixhq): add trending and fix recent (#147)
Browse files Browse the repository at this point in the history
* feat(flixhq): add trending and fix recent

- Added docs to trending and updated the recent docs
- Updated Links to models file where lines where wrong when linking

* chore:(yarn) yarn build

Co-authored-by: Tommy Danks <tommydanks2000@hotmail.com>
  • Loading branch information
TDanks2000 and Tommy Danks authored Dec 20, 2022
1 parent 6f96a24 commit b951f0a
Show file tree
Hide file tree
Showing 5 changed files with 307 additions and 10 deletions.
2 changes: 2 additions & 0 deletions dist/providers/movies/flixhq.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,7 @@ declare class FlixHQ extends MovieParser {
fetchEpisodeServers: (episodeId: string, mediaId: string) => Promise<IEpisodeServer[]>;
fetchRecentMovies: () => Promise<IMovieResult[]>;
fetchRecentTvShows: () => Promise<IMovieResult[]>;
fetchTrendingMovies: () => Promise<IMovieResult[]>;
fetchTrendingTvShows: () => Promise<IMovieResult[]>;
}
export default FlixHQ;
62 changes: 59 additions & 3 deletions dist/providers/movies/flixhq.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/providers/movies/flixhq.js.map

Large diffs are not rendered by default.

185 changes: 182 additions & 3 deletions docs/providers/flixhq.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ const flixhq = new MOVIES.FlixHQ();
- [fetchMediaInfo](#fetchmediainfo)
- [fetchEpisodeSources](#fetchepisodesources)
- [fetchEpisodeServers](#fetchepisodeservers)
- [fetchRecentMovies](#fetchrecentmovies)
- [fetchRecentTvShows](#fetchrecenttvshows)
- [fetchTrendingMovies](#fetchtrendingmovies)
- [fetchTrendingTvShows](#fetchtrendingtvshows)

### search
> Note: This method is a subclass of the [`BaseParser`](https://github.com/consumet/extensions/blob/master/src/models/base-parser.ts) class. meaning it is available across most categories.
Expand Down Expand Up @@ -111,15 +115,15 @@ output:
| ----------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| episodeId | `string` | takes episode id as a parameter. (*episode id can be found in the media info object*) |
| mediaId | `string` | takes media id as a parameter. (*media id can be found in the media info object*) |
| server (optional) | [`StreamingServers`](https://github.com/consumet/extensions/blob/master/src/models/types.ts#L76-L82) | takes server enum as a parameter. *default: [`StreamingServers.VidCloud`](https://github.com/consumet/extensions/blob/master/src/models/types.ts#L76-L82)* |
| server (optional) | [`StreamingServers`](https://github.com/consumet/extensions/blob/master/src/models/types.ts#L144-L157) | takes server enum as a parameter. *default: [`StreamingServers.VidCloud`](https://github.com/consumet/extensions/blob/master/src/models/types.ts#L150)* |


```ts
flixhq.fetchEpisodeSources("1167571", "tv/watch-vincenzo-67955").then(data => {
console.log(data);
})
```
returns a promise which resolves into an array of episode sources and subtitles. (*[`Promise<ISource>`](https://github.com/consumet/extensions/blob/master/src/models/types.ts#L210-L214)*)\
returns a promise which resolves into an array of episode sources and subtitles. (*[`Promise<ISource>`](https://github.com/consumet/extensions/blob/master/src/models/types.ts#L300-L306)*)\
output:
```js
{
Expand Down Expand Up @@ -159,7 +163,7 @@ flixhq.fetchEpisodeServers('1167571', 'tv/watch-vincenzo-67955').then(data => {
console.log(data);
})
```
returns a promise which resolves into an array of episode servers. (*[`Promise<IEpisodeServer[]>`](https://github.com/consumet/extensions/blob/master/src/models/types.ts#L54-L57)*)\
returns a promise which resolves into an array of episode servers. (*[`Promise<IEpisodeServer[]>`](https://github.com/consumet/extensions/blob/master/src/models/types.ts#L115-L118)*)\
output:
```js
[
Expand All @@ -185,3 +189,178 @@ output:
```

<p align="end">(<a href="https://github.com/consumet/extensions/blob/master/docs/guides/movies.md#">back to movie providers list</a>)</p>

### fetchRecentMovies

```ts
flixhq.fetchRecentMovies().then(data => {
console.log(data);
})
```

returns a promise which resolves into an array of movies. (*[`Promise<IMovieResult[]>`](https://github.com/consumet/extensions/blob/master/src/models/types.ts#L328-L336)*)\
output:
```js
[
{
id: 'movie/watch-violent-night-91333',
title: 'Violent Night',
url: 'https://flixhq.to/movie/watch-violent-night-91333',
image: 'https://img.flixhq.to/xxrz/250x400/379/cc/ff/ccff5242232b96b36ed22f0a0dda8234/ccff5242232b96b36ed22f0a0dda8234.jpg',
releaseDate: '2022',
duration: '112m',
type: 'Movie'
},
{
id: 'movie/watch-holiday-heritage-91552',
title: 'Holiday Heritage',
url: 'https://flixhq.to/movie/watch-holiday-heritage-91552',
image: 'https://img.flixhq.to/xxrz/250x400/379/b9/4c/b94c9ef8b80fe5d71e9e4750602d086c/b94c9ef8b80fe5d71e9e4750602d086c.jpg',
releaseDate: '2022',
duration: '84m',
type: 'Movie'
},
{
id: 'movie/watch-high-heat-91549',
title: 'High Heat',
url: 'https://flixhq.to/movie/watch-high-heat-91549',
image: 'https://img.flixhq.to/xxrz/250x400/379/4e/56/4e56d050f6d2578f1495dbf348e0becf/4e56d050f6d2578f1495dbf348e0becf.jpg',
releaseDate: '2022',
duration: '84m',
type: 'Movie'
},
{...},
]
```


### fetchRecentTvShows

```ts
flixhq.fetchRecentTvShows().then(data => {
console.log(data);
})
```

returns a promise which resolves into an array of tv shows. (*[`Promise<IMovieResult[]>`](https://github.com/consumet/extensions/blob/master/src/models/types.ts#L328-L336)*)\
output:
```js
[
{
id: 'tv/watch-yellowstone-38684',
title: 'Yellowstone',
url: 'https://flixhq.to/tv/watch-yellowstone-38684',
image: 'https://img.flixhq.to/xxrz/250x400/379/86/ba/86bacd45c63959587ef16c92927fe8eb/86bacd45c63959587ef16c92927fe8eb.jpg',
season: 'SS 5',
latestEpisode: 'EPS 7',
type: 'TV Series'
},
{
id: 'tv/watch-his-dark-materials-34639',
title: 'His Dark Materials',
url: 'https://flixhq.to/tv/watch-his-dark-materials-34639',
image: 'https://img.flixhq.to/xxrz/250x400/379/0e/41/0e41301e8f1152499dcf51253b64a29f/0e41301e8f1152499dcf51253b64a29f.jpg',
season: 'SS 3',
latestEpisode: 'EPS 8',
type: 'TV Series'
},
{
id: 'tv/watch-dangerous-liaisons-89965',
title: 'Dangerous Liaisons',
url: 'https://flixhq.to/tv/watch-dangerous-liaisons-89965',
image: 'https://img.flixhq.to/xxrz/250x400/379/fc/5b/fc5ba1c5d4445eb29d0b002f2c8425db/fc5ba1c5d4445eb29d0b002f2c8425db.jpg',
season: 'SS 1',
latestEpisode: 'EPS 7',
type: 'TV Series'
},
{...},
]
```


### fetchTrendingMovies

```ts
flixhq.fetchTrendingMovies().then(data => {
console.log(data);
})
```

returns a promise which resolves into an array of movies. (*[`Promise<IMovieResult[]>`](https://github.com/consumet/extensions/blob/master/src/models/types.ts#L328-L336)*)\
output:
```js
[
{
id: 'movie/watch-avatar-the-way-of-water-79936',
title: 'Avatar: The Way of Water',
url: 'https://flixhq.to/movie/watch-avatar-the-way-of-water-79936',
image: 'https://img.flixhq.to/xxrz/250x400/379/1e/c6/1ec694a9d587d509ec7a9be815aacfac/1ec694a9d587d509ec7a9be815aacfac.jpg',
releaseDate: '2022',
duration: '192m',
type: 'Movie'
},
{
id: 'movie/watch-the-banshees-of-inisherin-91351',
title: 'The Banshees of Inisherin',
url: 'https://flixhq.to/movie/watch-the-banshees-of-inisherin-91351',
image: 'https://img.flixhq.to/xxrz/250x400/379/6e/d2/6ed2e9486552bf0bda5dd3be8db0baec/6ed2e9486552bf0bda5dd3be8db0baec.jpg',
releaseDate: '2022',
duration: '114m',
type: 'Movie'
},
{
id: 'movie/watch-avatar-19690',
title: 'Avatar',
url: 'https://flixhq.to/movie/watch-avatar-19690',
image: 'https://img.flixhq.to/xxrz/250x400/379/9d/0f/9d0fe6f16f205e483df14817753c1b0d/9d0fe6f16f205e483df14817753c1b0d.jpg',
releaseDate: '2009',
duration: '162m',
type: 'Movie'
},
{...},
]
```


### fetchTrendingTvShows

```ts
flixhq.fetchTrendingTvShows().then(data => {
console.log(data);
})
```

returns a promise which resolves into an array of tv shows. (*[`Promise<IMovieResult[]>`](https://github.com/consumet/extensions/blob/master/src/models/types.ts#L328-L336)*)\
output:
```js
[
{
id: 'tv/watch-1923-91522',
title: '1923',
url: 'https://flixhq.to/tv/watch-1923-91522',
image: 'https://img.flixhq.to/xxrz/250x400/379/96/f3/96f3c8dfd9583a855473e2e9039c8bda/96f3c8dfd9583a855473e2e9039c8bda.jpg',
season: 'SS 1',
latestEpisode: 'EPS 1',
type: 'TV Series'
},
{
id: 'tv/watch-the-recruit-91507',
title: 'The Recruit',
url: 'https://flixhq.to/tv/watch-the-recruit-91507',
image: 'https://img.flixhq.to/xxrz/250x400/379/0e/bd/0ebd5fe83f5a5f7055089d3390727e1c/0ebd5fe83f5a5f7055089d3390727e1c.jpg',
season: 'SS 1',
latestEpisode: 'EPS 8',
type: 'TV Series'
},
{
id: 'tv/watch-wednesday-90553',
title: 'Wednesday',
url: 'https://flixhq.to/tv/watch-wednesday-90553',
image: 'https://img.flixhq.to/xxrz/250x400/379/9b/70/9b70e344f895fd9ed9cbac46d95b21a2/9b70e344f895fd9ed9cbac46d95b21a2.jpg',
season: 'SS 1',
latestEpisode: 'EPS 8',
type: 'TV Series'
},
{...},
]
```
Loading

0 comments on commit b951f0a

Please sign in to comment.