Compare commits
5 Commits
feat/add_l
...
feat/git_a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eb4e707ff9 | ||
|
|
6fd471b921 | ||
|
|
60a2f8e00e | ||
|
|
933ebf25a3 | ||
|
|
5d38a76997 |
18
.github/workflows/github-actions-demo.yml
vendored
Normal file
18
.github/workflows/github-actions-demo.yml
vendored
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
name: GitHub Actions Demo
|
||||||
|
run-name: ${{ github.actor }} is testing out GitHub Actions 🚀
|
||||||
|
on: [push]
|
||||||
|
jobs:
|
||||||
|
Explore-GitHub-Actions:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
|
||||||
|
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
|
||||||
|
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
|
||||||
|
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
|
||||||
|
- name: List files in the repository
|
||||||
|
run: |
|
||||||
|
ls ${{ github.workspace }}
|
||||||
|
- run: echo "🍏 This job's status is ${{ job.status }}."
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "tmdb-ts",
|
"name": "tmdb-ts",
|
||||||
"version": "0.1.8",
|
"version": "0.1.9",
|
||||||
"description": "TMDB v3 library wrapper",
|
"description": "TMDB v3 library wrapper",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
import { BaseEndpoint } from './base';
|
import { BaseEndpoint } from './base';
|
||||||
|
import { AccountDetails } from '../types/account';
|
||||||
|
|
||||||
export class AccountEndpoint extends BaseEndpoint {
|
export class AccountEndpoint extends BaseEndpoint {
|
||||||
constructor(accessToken: string) {
|
constructor(accessToken: string) {
|
||||||
super(accessToken);
|
super(accessToken);
|
||||||
}
|
}
|
||||||
|
|
||||||
async details(): Promise<any> {
|
async details(): Promise<AccountDetails> {
|
||||||
return await this.api.get('/account');
|
return await this.api.get('/account');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
17
src/types/account.ts
Normal file
17
src/types/account.ts
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
export interface Gravatar {
|
||||||
|
hash: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Avatar {
|
||||||
|
gravatar: Gravatar;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface AccountDetails {
|
||||||
|
avatar: Avatar;
|
||||||
|
id: number;
|
||||||
|
include_adult: boolean;
|
||||||
|
iso_3166_1: string;
|
||||||
|
iso_639_1: string;
|
||||||
|
name: string;
|
||||||
|
username: string;
|
||||||
|
}
|
||||||
@@ -134,14 +134,14 @@ export interface ContentRatingsResult {
|
|||||||
|
|
||||||
export interface Recommendation {
|
export interface Recommendation {
|
||||||
adult: boolean;
|
adult: boolean;
|
||||||
backdrop_path?: any;
|
backdrop_path?: string;
|
||||||
genre_ids: number[];
|
genre_ids: number[];
|
||||||
id: number;
|
id: number;
|
||||||
original_language: string;
|
original_language: string;
|
||||||
original_title: string;
|
original_title: string;
|
||||||
overview: string;
|
overview: string;
|
||||||
release_date: string;
|
release_date: string;
|
||||||
poster_path?: any;
|
poster_path?: string;
|
||||||
popularity: number;
|
popularity: number;
|
||||||
title: string;
|
title: string;
|
||||||
video: boolean;
|
video: boolean;
|
||||||
|
|||||||
@@ -6,10 +6,17 @@ import {
|
|||||||
SpokenLanguage,
|
SpokenLanguage,
|
||||||
} from './';
|
} from './';
|
||||||
|
|
||||||
|
export interface BelongsToCollection {
|
||||||
|
id: number;
|
||||||
|
name: string;
|
||||||
|
poster_path: string;
|
||||||
|
backdrop_path: string;
|
||||||
|
}
|
||||||
|
|
||||||
export interface MovieDetails {
|
export interface MovieDetails {
|
||||||
adult: boolean;
|
adult: boolean;
|
||||||
backdrop_path: string;
|
backdrop_path: string;
|
||||||
belongs_to_collection?: any;
|
belongs_to_collection?: BelongsToCollection;
|
||||||
budget: number;
|
budget: number;
|
||||||
genres: Genre[];
|
genres: Genre[];
|
||||||
homepage: string;
|
homepage: string;
|
||||||
@@ -19,7 +26,7 @@ export interface MovieDetails {
|
|||||||
original_title: string;
|
original_title: string;
|
||||||
overview: string;
|
overview: string;
|
||||||
popularity: number;
|
popularity: number;
|
||||||
poster_path?: any;
|
poster_path?: string;
|
||||||
production_companies: ProductionCompany[];
|
production_companies: ProductionCompany[];
|
||||||
production_countries: ProductionCountry[];
|
production_countries: ProductionCountry[];
|
||||||
release_date: string;
|
release_date: string;
|
||||||
@@ -107,8 +114,8 @@ export interface MovieChanges {
|
|||||||
|
|
||||||
export interface LatestMovie {
|
export interface LatestMovie {
|
||||||
adult: boolean;
|
adult: boolean;
|
||||||
backdrop_path?: any;
|
backdrop_path?: string;
|
||||||
belongs_to_collection?: any;
|
belongs_to_collection?: BelongsToCollection;
|
||||||
budget: number;
|
budget: number;
|
||||||
genres: Genre[];
|
genres: Genre[];
|
||||||
homepage: string;
|
homepage: string;
|
||||||
@@ -119,12 +126,12 @@ export interface LatestMovie {
|
|||||||
overview: string;
|
overview: string;
|
||||||
popularity: number;
|
popularity: number;
|
||||||
poster_path: string;
|
poster_path: string;
|
||||||
production_companies: any[];
|
production_companies: ProductionCompany[];
|
||||||
production_countries: any[];
|
production_countries: ProductionCountry[];
|
||||||
release_date: string;
|
release_date: string;
|
||||||
revenue: number;
|
revenue: number;
|
||||||
runtime: number;
|
runtime: number;
|
||||||
spoken_languages: any[];
|
spoken_languages: SpokenLanguage[];
|
||||||
status: string;
|
status: string;
|
||||||
tagline: string;
|
tagline: string;
|
||||||
title: string;
|
title: string;
|
||||||
|
|||||||
@@ -14,6 +14,21 @@ export interface CreatedBy {
|
|||||||
profile_path: string;
|
profile_path: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface NextEpisodeToAir {
|
||||||
|
id: number;
|
||||||
|
name: string;
|
||||||
|
overview: string;
|
||||||
|
vote_average: number;
|
||||||
|
vote_count: number;
|
||||||
|
air_date: string;
|
||||||
|
episode_number: number;
|
||||||
|
production_code: string;
|
||||||
|
runtime: number;
|
||||||
|
season_number: number;
|
||||||
|
show_id: number;
|
||||||
|
still_path: string;
|
||||||
|
}
|
||||||
|
|
||||||
export interface LastEpisodeToAir {
|
export interface LastEpisodeToAir {
|
||||||
air_date: string;
|
air_date: string;
|
||||||
episode_number: number;
|
episode_number: number;
|
||||||
@@ -57,7 +72,7 @@ export interface TvShowDetails {
|
|||||||
last_air_date: string;
|
last_air_date: string;
|
||||||
last_episode_to_air: LastEpisodeToAir;
|
last_episode_to_air: LastEpisodeToAir;
|
||||||
name: string;
|
name: string;
|
||||||
next_episode_to_air?: any;
|
next_episode_to_air?: NextEpisodeToAir;
|
||||||
networks: Network[];
|
networks: Network[];
|
||||||
number_of_episodes: number;
|
number_of_episodes: number;
|
||||||
number_of_seasons: number;
|
number_of_seasons: number;
|
||||||
@@ -123,9 +138,9 @@ export interface TvShowItem {
|
|||||||
id: string;
|
id: string;
|
||||||
action: string;
|
action: string;
|
||||||
time: string;
|
time: string;
|
||||||
value: any;
|
value: Array<number>;
|
||||||
iso_639_1: string;
|
iso_639_1: string;
|
||||||
original_value: any;
|
original_value: Array<number>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface TvShowChange {
|
export interface TvShowChange {
|
||||||
@@ -194,8 +209,8 @@ export interface SimilarTvShows {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface LatestTvShows {
|
export interface LatestTvShows {
|
||||||
backdrop_path?: any;
|
backdrop_path?: string;
|
||||||
created_by: any[];
|
created_by: CreatedBy[];
|
||||||
episode_run_time: number[];
|
episode_run_time: number[];
|
||||||
first_air_date: string;
|
first_air_date: string;
|
||||||
genres: Genre[];
|
genres: Genre[];
|
||||||
@@ -211,10 +226,10 @@ export interface LatestTvShows {
|
|||||||
origin_country: string[];
|
origin_country: string[];
|
||||||
original_language: string;
|
original_language: string;
|
||||||
original_name: string;
|
original_name: string;
|
||||||
overview?: any;
|
overview?: string;
|
||||||
popularity: number;
|
popularity: number;
|
||||||
poster_path?: any;
|
poster_path?: string;
|
||||||
production_companies: any[];
|
production_companies: ProductionCompany[];
|
||||||
seasons: Season[];
|
seasons: Season[];
|
||||||
status: string;
|
status: string;
|
||||||
type: string;
|
type: string;
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||||
export function parseOptions(options?: { [s: string]: any }): string {
|
export function parseOptions(options?: { [s: string]: any }): string {
|
||||||
return options ? new URLSearchParams(Object.entries(options)).toString() : '';
|
return options ? new URLSearchParams(Object.entries(options)).toString() : '';
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user