src/endpoints/genre.ts   A
last analyzed

Complexity

Total Complexity 2
Complexity/F 1

Size

Lines of Code 28
Function Count 2

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 10
mnd 0
bc 0
fnc 2
dl 0
loc 28
bpm 0
cpm 1
noi 0
c 0
b 0
f 0
rs 10

2 Functions

Rating   Name   Duplication   Size   Complexity  
A Genre.movie 0 8 1
A Genre.tv 0 8 1
1
import { BaseEndpoint } from './baseEndpoint';
2
import { GenresResponse } from '../interfaces/genres';
3
4
/**
5
 * Genre Endpoint Class
6
 */
7
export class Genre extends BaseEndpoint {
8
9
    /**
10
     * Get the list of official genres for movies.
11
     * @return { Promise<GenresResponse> }
12
     * @see https://developers.themoviedb.org/3/genres/get-movie-list
13
     */
14
    public async movie(): Promise<GenresResponse> {
15
        return this.sendGetRequest(`genre/movie/list`);
16
    }
17
18
    /**
19
     * Get the list of official genres for TV shows.
20
     * @return { Promise<GenresResponse> }
21
     * @see https://developers.themoviedb.org/3/genres/get-tv-list
22
     */
23
    public async tv(): Promise<GenresResponse> {
24
        return this.sendGetRequest('genre/tv/list');
25
    }
26
27
}
28