Replace querystring with URLSearchParams
URLSearchParams has greater compatibility with browser code Created new PageOptions and LocaleOptions for easier use with URLSearchParams
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
import { ParsedUrlQueryInput } from 'querystring';
|
||||
|
||||
export interface Change {
|
||||
id: number;
|
||||
adult: boolean | undefined;
|
||||
@@ -12,7 +10,7 @@ export interface Changes{
|
||||
total_results: number;
|
||||
}
|
||||
|
||||
export interface ChangeOptions extends ParsedUrlQueryInput {
|
||||
export interface ChangeOptions {
|
||||
end_date?: string;
|
||||
start_date?: string;
|
||||
page?: number;
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { ParsedUrlQueryInput } from 'querystring';
|
||||
import { Episode, Media, MediaType, Movie, Person, Season, TV } from '.';
|
||||
|
||||
export type ExternalSource =
|
||||
@@ -11,7 +10,7 @@ export type ExternalSource =
|
||||
| 'twitter_id'
|
||||
| 'instagram_id';
|
||||
|
||||
export interface ExternalIdOptions extends ParsedUrlQueryInput {
|
||||
export interface ExternalIdOptions {
|
||||
external_source: ExternalSource;
|
||||
language?: string;
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ export * from './movies';
|
||||
export * from './search';
|
||||
export * from './tv-shows';
|
||||
export * from './watch-providers';
|
||||
export * from './page';
|
||||
export * from './people';
|
||||
export * from './discover';
|
||||
export * from './review';
|
||||
|
||||
8
src/types/page.ts
Normal file
8
src/types/page.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
export interface PageOptions {
|
||||
page?: number;
|
||||
}
|
||||
|
||||
export interface LocaleOptions extends PageOptions {
|
||||
region?: string;
|
||||
language?: string;
|
||||
}
|
||||
Reference in New Issue
Block a user