@tutkli/jikan-ts 0.5.2 → 0.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/.idea/inspectionProfiles/Project_Default.xml +6 -0
  2. package/.idea/jikan-ts.iml +12 -0
  3. package/.idea/jsLinters/eslint.xml +6 -0
  4. package/.idea/modules.xml +8 -0
  5. package/.idea/prettier.xml +6 -0
  6. package/.idea/vcs.xml +6 -0
  7. package/CHANGELOG.md +16 -0
  8. package/dist/index.d.ts +11 -11
  9. package/dist/index.d.ts.map +1 -1
  10. package/dist/index.js +4 -4
  11. package/dist/index.js.map +1 -1
  12. package/package.json +1 -1
  13. package/.editorconfig +0 -16
  14. package/.eslintignore +0 -17
  15. package/.eslintrc.json +0 -27
  16. package/.prettierrc.json +0 -8
  17. package/jest.config.js +0 -25
  18. package/src/__tests__/anime-client.spec.ts +0 -33
  19. package/src/__tests__/manga-client.spec.ts +0 -33
  20. package/src/__tests__/top-client.spec.ts +0 -33
  21. package/src/clients/anime.client.ts +0 -233
  22. package/src/clients/base.client.ts +0 -82
  23. package/src/clients/index.ts +0 -4
  24. package/src/clients/jikan.client.ts +0 -28
  25. package/src/clients/manga.client.ts +0 -142
  26. package/src/clients/top.client.ts +0 -52
  27. package/src/config/cache.config.ts +0 -8
  28. package/src/config/index.ts +0 -2
  29. package/src/config/logger.config.ts +0 -25
  30. package/src/constants/base.constant.ts +0 -3
  31. package/src/constants/endpoints.constant.ts +0 -29
  32. package/src/constants/index.ts +0 -2
  33. package/src/index.ts +0 -4
  34. package/src/models/Anime/anime-character.model.ts +0 -11
  35. package/src/models/Anime/anime-episode.model.ts +0 -12
  36. package/src/models/Anime/anime-picture.model.ts +0 -5
  37. package/src/models/Anime/anime-staff.model.ts +0 -6
  38. package/src/models/Anime/anime-statistics.model.ts +0 -6
  39. package/src/models/Anime/anime-video.model.ts +0 -38
  40. package/src/models/Anime/anime.model.ts +0 -95
  41. package/src/models/Anime/index.ts +0 -7
  42. package/src/models/Common/character.model.ts +0 -18
  43. package/src/models/Common/image.model.ts +0 -12
  44. package/src/models/Common/index.ts +0 -6
  45. package/src/models/Common/person.model.ts +0 -8
  46. package/src/models/Common/recommendation.model.ts +0 -12
  47. package/src/models/Common/resource.model.ts +0 -31
  48. package/src/models/Common/statistics.model.ts +0 -13
  49. package/src/models/Manga/index.ts +0 -2
  50. package/src/models/Manga/manga-statistics.model.ts +0 -6
  51. package/src/models/Manga/manga.model.ts +0 -58
  52. package/src/models/Params/index.ts +0 -2
  53. package/src/models/Params/search-params.model.ts +0 -72
  54. package/src/models/Params/top-params.model.ts +0 -41
  55. package/src/models/Response/index.ts +0 -1
  56. package/src/models/Response/response.model.ts +0 -21
  57. package/src/models/index.ts +0 -5
  58. package/tsconfig.eslint.json +0 -5
  59. package/tsconfig.json +0 -23
@@ -1,29 +0,0 @@
1
- export enum AnimeEndpoints {
2
- AnimeSearch = '/anime',
3
- AnimeFullById = '/anime/{id}/full',
4
- AnimeById = '/anime/{id}',
5
- AnimeCharacters = '/anime/{id}/characters',
6
- AnimeStaff = '/anime/{id}/staff',
7
- AnimeEpisodes = '/anime/{id}/episodes',
8
- AnimeEpisodeById = '/anime/{id}/episodes/{episode}',
9
- AnimeVideos = '/anime/{id}/videos',
10
- AnimeVideosEpisodes = '/anime/{id}/videos/episodes',
11
- AnimePictures = '/anime/{id}/pictures',
12
- AnimeStatistics = '/anime/{id}/statistics',
13
- AnimeRecommendations = '/anime/{id}/recommendations',
14
- }
15
-
16
- export enum MangaEndpoints {
17
- MangaSearch = '/manga',
18
- MangaFullById = '/manga/{id}/full',
19
- MangaById = '/manga/{id}',
20
- MangaCharacters = '/manga/{id}/characters',
21
- MangaPictures = '/manga/{id}/pictures',
22
- MangaStatistics = '/manga/{id}/statistics',
23
- MangaRecommendations = '/manga/{id}/recommendations',
24
- }
25
-
26
- export enum TopEndpoints {
27
- TopAnime = '/top/anime',
28
- TopManga = '/top/manga',
29
- }
@@ -1,2 +0,0 @@
1
- export * from './base.constant';
2
- export * from './endpoints.constant';
package/src/index.ts DELETED
@@ -1,4 +0,0 @@
1
- export * from './clients';
2
- export * from './config';
3
- export * from './constants';
4
- export * from './models';
@@ -1,11 +0,0 @@
1
- import { CommonCharacter } from '../Common/character.model';
2
- import { JikanPerson } from '../Common/person.model';
3
-
4
- export interface AnimeCharacter extends CommonCharacter {
5
- voice_actors: AnimeCharacterVoiceActor[];
6
- }
7
-
8
- export interface AnimeCharacterVoiceActor {
9
- person: JikanPerson;
10
- language: string;
11
- }
@@ -1,12 +0,0 @@
1
- export interface AnimeEpisode {
2
- mal_id: number;
3
- url: string;
4
- title: string;
5
- title_japanese: string;
6
- title_romanji: string;
7
- duration: number;
8
- aired: string;
9
- filler: boolean;
10
- recap: boolean;
11
- forum_url: string;
12
- }
@@ -1,5 +0,0 @@
1
- import { JikanImages } from '../Common';
2
-
3
- export interface AnimePicture {
4
- images: JikanImages;
5
- }
@@ -1,6 +0,0 @@
1
- import { JikanPerson } from '../Common';
2
-
3
- export interface AnimeStaff {
4
- person: JikanPerson;
5
- positions: string[];
6
- }
@@ -1,6 +0,0 @@
1
- import { Statistics } from '../Common';
2
-
3
- export interface AnimeStatistics extends Statistics {
4
- watching: number;
5
- plan_to_watch: number;
6
- }
@@ -1,38 +0,0 @@
1
- import { JikanImages, JikanImagesCollection } from '../Common';
2
-
3
- export interface AnimeVideo {
4
- promo: AnimeVideoPromo[];
5
- episodes: AnimeVideoEpisode[];
6
- music_videos: AnimeMusicVideo[];
7
- }
8
-
9
- export interface AnimeVideoPromo {
10
- title: string;
11
- trailer: AnimeYoutubeVideo;
12
- }
13
-
14
- export interface AnimeYoutubeVideo {
15
- youtube_id: string;
16
- url: string;
17
- embed_url: string;
18
- images?: JikanImagesCollection;
19
- }
20
-
21
- export interface AnimeVideoEpisode {
22
- mal_id: number;
23
- url: string;
24
- title: string;
25
- episode: string;
26
- images: JikanImages;
27
- }
28
-
29
- export interface AnimeMusicVideo {
30
- title: string;
31
- video: AnimeYoutubeVideo;
32
- meta: AnimeVideoMeta;
33
- }
34
-
35
- export interface AnimeVideoMeta {
36
- title: string;
37
- author: string;
38
- }
@@ -1,95 +0,0 @@
1
- import {
2
- JikanImages,
3
- JikanNamedResource,
4
- JikanResourcePeriod,
5
- JikanResourceRelation,
6
- JikanResourceTitle,
7
- JikanUniqueResource,
8
- } from '../Common';
9
- import { AnimeYoutubeVideo } from './anime-video.model';
10
-
11
- export interface Anime {
12
- mal_id: string;
13
- url: string;
14
- images: JikanImages;
15
- trailer: AnimeYoutubeVideo;
16
- approved: boolean;
17
- titles: JikanResourceTitle[];
18
- title: string;
19
- title_english: string;
20
- title_japanese: string;
21
- title_synonyms: string[];
22
- type: AnimeType;
23
- source: string;
24
- episodes: number;
25
- status: AnimeStatus;
26
- airing: boolean;
27
- aired: JikanResourcePeriod;
28
- duration: string;
29
- rating: AnimeRating;
30
- score: number;
31
- scored_by: number;
32
- rank: number;
33
- popularity: number;
34
- members: number;
35
- favorites: number;
36
- synopsis: string;
37
- background: string;
38
- season?: AnimeSeason;
39
- year: number;
40
- broadcast: AnimeBroadcast;
41
- producers: JikanUniqueResource[];
42
- licensors: JikanUniqueResource[];
43
- studio: JikanUniqueResource[];
44
- genres: JikanUniqueResource[];
45
- explicit_genres: JikanUniqueResource[];
46
- themes: JikanUniqueResource[];
47
- demographic: JikanUniqueResource[];
48
- relations?: JikanResourceRelation[];
49
- theme?: AnimeTheme;
50
- external?: JikanNamedResource[];
51
- streaming: JikanNamedResource[];
52
- }
53
-
54
- export interface AnimeBroadcast {
55
- day: string;
56
- time: string;
57
- timezone: string;
58
- string: string;
59
- }
60
-
61
- export interface AnimeTheme {
62
- openings: string[];
63
- endings: string[];
64
- }
65
-
66
- export enum AnimeType {
67
- tv = 'TV',
68
- movie = 'Movie',
69
- ova = 'Ova',
70
- special = 'Special',
71
- ona = 'Ona',
72
- music = 'Music',
73
- }
74
-
75
- export enum AnimeStatus {
76
- finished = 'Finished Airing',
77
- airing = 'Currently Airing',
78
- complete = 'Complete',
79
- }
80
-
81
- export enum AnimeRating {
82
- g = 'g',
83
- pg = 'pg',
84
- pg13 = 'pg13',
85
- r17 = 'r17',
86
- r = 'r',
87
- rx = 'rx',
88
- }
89
-
90
- export enum AnimeSeason {
91
- spring = 'spring',
92
- summer = 'summer',
93
- fall = 'fall',
94
- winter = 'winter',
95
- }
@@ -1,7 +0,0 @@
1
- export * from './anime.model';
2
- export * from './anime-character.model';
3
- export * from './anime-staff.model';
4
- export * from './anime-episode.model';
5
- export * from './anime-video.model';
6
- export * from './anime-picture.model';
7
- export * from './anime-statistics.model';
@@ -1,18 +0,0 @@
1
- import { JikanImages } from './image.model';
2
-
3
- export interface CommonCharacter {
4
- character: CommonCharacterData;
5
- role: CharacterRole;
6
- }
7
-
8
- export interface CommonCharacterData {
9
- mal_id: number;
10
- url: string;
11
- images: JikanImages;
12
- name: string;
13
- }
14
-
15
- export enum CharacterRole {
16
- main = 'Main',
17
- supporting = 'Supporting',
18
- }
@@ -1,12 +0,0 @@
1
- export interface JikanImages {
2
- jpg: JikanImagesCollection;
3
- webp?: JikanImagesCollection;
4
- }
5
-
6
- export interface JikanImagesCollection {
7
- image_url: string;
8
- small_image_url?: string;
9
- medium_image_url?: string;
10
- large_image_url?: string;
11
- maximum_image_url?: string;
12
- }
@@ -1,6 +0,0 @@
1
- export * from './resource.model';
2
- export * from './image.model';
3
- export * from './character.model';
4
- export * from './person.model';
5
- export * from './recommendation.model';
6
- export * from './statistics.model';
@@ -1,8 +0,0 @@
1
- import { JikanImages } from './image.model';
2
-
3
- export interface JikanPerson {
4
- mal_id: number;
5
- url: string;
6
- images: JikanImages;
7
- name: string;
8
- }
@@ -1,12 +0,0 @@
1
- import { JikanImages } from './image.model';
2
-
3
- export interface Recommendation {
4
- entry: RecommendationEntry;
5
- }
6
-
7
- export interface RecommendationEntry {
8
- mal_id: number;
9
- url: string;
10
- images: JikanImages;
11
- title: string;
12
- }
@@ -1,31 +0,0 @@
1
- export interface JikanUniqueResource {
2
- mal_id: number;
3
- type: string;
4
- name: string;
5
- url: string;
6
- }
7
-
8
- export interface JikanNamedResource {
9
- name: string;
10
- url: string;
11
- }
12
-
13
- export interface JikanResourceTitle {
14
- type: string;
15
- title: string;
16
- }
17
-
18
- export interface JikanResourcePeriod {
19
- from: string;
20
- to: string;
21
- prop: {
22
- form: { day: number; month: number; year: number };
23
- to: { day: number; month: number; year: number };
24
- string: string;
25
- };
26
- }
27
-
28
- export interface JikanResourceRelation {
29
- relation: string;
30
- entry: JikanUniqueResource[];
31
- }
@@ -1,13 +0,0 @@
1
- export interface Statistics {
2
- completed: number;
3
- on_hold: number;
4
- dropped: number;
5
- total: number;
6
- scores: StatisticsScore[];
7
- }
8
-
9
- export interface StatisticsScore {
10
- score: number;
11
- votes: number;
12
- percentage: number;
13
- }
@@ -1,2 +0,0 @@
1
- export * from './manga.model';
2
- export * from './manga-statistics.model';
@@ -1,6 +0,0 @@
1
- import { Statistics } from '../Common';
2
-
3
- export interface MangaStatistics extends Statistics {
4
- reading: number;
5
- plan_to_read: number;
6
- }
@@ -1,58 +0,0 @@
1
- import {
2
- JikanImages,
3
- JikanNamedResource,
4
- JikanResourcePeriod,
5
- JikanResourceRelation,
6
- JikanResourceTitle,
7
- JikanUniqueResource,
8
- } from '../Common';
9
-
10
- export interface Manga {
11
- mal_id: number;
12
- url: string;
13
- images: JikanImages;
14
- approved: boolean;
15
- titles: JikanResourceTitle[];
16
- title: string;
17
- title_japanese: string;
18
- title_synonyms?: string[];
19
- type: MangaType;
20
- chapters: number;
21
- volumes: number;
22
- status: MangaStatus;
23
- publishing: boolean;
24
- published: JikanResourcePeriod;
25
- score: number;
26
- scored_by: number;
27
- rank: number;
28
- popularity: number;
29
- members: number;
30
- favorites: number;
31
- synopsis: string;
32
- background: string;
33
- authors: JikanUniqueResource[];
34
- serializations: JikanUniqueResource[];
35
- explicit_genres: JikanUniqueResource[];
36
- themes: JikanUniqueResource[];
37
- demographics: JikanUniqueResource[];
38
- relations?: JikanResourceRelation[];
39
- external?: JikanNamedResource[];
40
- }
41
-
42
- export enum MangaType {
43
- manga = 'Manga',
44
- novel = 'Novel',
45
- lightnovel = 'Lightnovel',
46
- oneshot = 'Oneshot',
47
- doujin = 'Doujin',
48
- manwha = 'Manwha',
49
- manhua = 'Manhua',
50
- }
51
-
52
- export enum MangaStatus {
53
- publishing = 'Publishing',
54
- complete = 'Complete',
55
- hiatus = 'Hiatus',
56
- discontinued = 'Discontinued',
57
- upcoming = 'Upcoming',
58
- }
@@ -1,2 +0,0 @@
1
- export * from './search-params.model';
2
- export * from './top-params.model';
@@ -1,72 +0,0 @@
1
- import { MangaStatus, MangaType } from '../Manga';
2
- import { AnimeRating, AnimeStatus, AnimeType } from '../Anime';
3
-
4
- export enum SortOptions {
5
- asc = 'asc',
6
- desc = 'desc',
7
- }
8
-
9
- export enum SearchOrder {
10
- mal_id = 'mal_id',
11
- title = 'title',
12
- start_date = 'start_date',
13
- end_date = 'end_date',
14
- score = 'score',
15
- scored_by = 'scored_by',
16
- rank = 'rank',
17
- popularity = 'popularity',
18
- members = 'members',
19
- favorites = 'favorites',
20
- }
21
-
22
- export enum AnimeSearchOrder {
23
- type = 'type',
24
- rating = 'rating',
25
- episodes = 'episodes',
26
- }
27
-
28
- export enum MangaSearchOrder {
29
- chapters = 'chapters',
30
- volumes = 'volumes',
31
- }
32
-
33
- export interface JikanSearchParams {
34
- q?: string;
35
- page?: number;
36
- limit?: number;
37
- score?: number;
38
- min_score?: number;
39
- max_score?: number;
40
- sfw?: boolean;
41
- genres?: string;
42
- genres_exclude?: string;
43
- sort?: SortOptions | string;
44
- letter?: string;
45
- producers?: string;
46
- start_date?: string;
47
- end_date?: string;
48
- }
49
-
50
- /**
51
- * QueryParams used in **getMangaSearch** call
52
- *
53
- * See also: [Jikan API Documentation](https://docs.api.jikan.moe/#tag/manga/operation/getMangaSearch)
54
- */
55
- export interface MangaSearchParams extends JikanSearchParams {
56
- type?: MangaType | string;
57
- status?: MangaStatus | string;
58
- order_by?: MangaSearchOrder | SearchOrder | string;
59
- magazines?: string;
60
- }
61
-
62
- /**
63
- * QueryParams used in **getAnimeSearch** call
64
- *
65
- * See also: [Jikan API Documentation](https://docs.api.jikan.moe/#tag/anime/operation/getAnimeSearch)
66
- */
67
- export interface AnimeSearchParams extends JikanSearchParams {
68
- type?: AnimeType | string;
69
- status?: AnimeStatus | string;
70
- rating?: AnimeRating | string;
71
- order_by?: AnimeSearchOrder | SearchOrder | string;
72
- }
@@ -1,41 +0,0 @@
1
- import { AnimeType } from '../Anime';
2
- import { MangaType } from '../Manga';
3
-
4
- export enum TopAnimeFilter {
5
- airing = 'airing',
6
- upcoming = 'upcoming',
7
- bypopularity = 'bypopularity',
8
- favorite = 'favorite',
9
- }
10
-
11
- export enum TopMangaFilter {
12
- publishing = 'publishing',
13
- upcoming = 'upcoming',
14
- bypopularity = 'bypopularity',
15
- favorite = 'favorite',
16
- }
17
-
18
- export interface JikanTopParams {
19
- page?: number;
20
- limit?: number;
21
- }
22
-
23
- /**
24
- * QueryParams used in **getTopAnime** call
25
- *
26
- * See also: [Jikan API Documentation](https://docs.api.jikan.moe/#tag/top/operation/getTopAnime)
27
- */
28
- export interface AnimeTopParams extends JikanTopParams {
29
- type?: AnimeType;
30
- filter?: TopAnimeFilter;
31
- }
32
-
33
- /**
34
- * QueryParams used in **getTopManga** call
35
- *
36
- * See also: [Jikan API Documentation](https://docs.api.jikan.moe/#tag/top/operation/getTopManga)
37
- */
38
- export interface MangaTopParams extends JikanTopParams {
39
- type?: MangaType;
40
- filter: TopMangaFilter;
41
- }
@@ -1 +0,0 @@
1
- export * from './response.model';
@@ -1,21 +0,0 @@
1
- export interface JikanPagination {
2
- last_visible_page: number;
3
- has_next_page: boolean;
4
- items?: JikanPaginationItems;
5
- }
6
-
7
- export interface JikanPaginationItems {
8
- count: number;
9
- total: number;
10
- per_page: number;
11
- }
12
-
13
- export interface JikanResponse<T> {
14
- data: T[];
15
- pagination?: JikanPagination;
16
- }
17
-
18
- export interface JikanUniqueResponse<T> {
19
- data: T;
20
- pagination?: JikanPagination;
21
- }
@@ -1,5 +0,0 @@
1
- export * from './Anime';
2
- export * from './Common';
3
- export * from './Manga';
4
- export * from './Response';
5
- export * from './Params';
@@ -1,5 +0,0 @@
1
- {
2
- "extends": "./tsconfig.json",
3
- "include": ["src/**/*", "jest.config.ts"],
4
- "exclude": ["node_modules", "dist"]
5
- }
package/tsconfig.json DELETED
@@ -1,23 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "es2022",
4
- "allowJs": true,
5
- "skipLibCheck": false,
6
- "strict": true,
7
- "forceConsistentCasingInFileNames": true,
8
- "declaration": true,
9
- "esModuleInterop": true,
10
- "module": "es2022",
11
- "moduleResolution": "node",
12
- "typeRoots": ["./node_modules/@types"],
13
- "experimentalDecorators": true,
14
- "emitDecoratorMetadata": true,
15
- "resolveJsonModule": true,
16
- "isolatedModules": true,
17
- "importHelpers": true,
18
- "rootDir": "./src",
19
- "outDir": "./dist"
20
- },
21
- "include": ["src/**/*"],
22
- "exclude": ["node_modules", "dist", "**/*.spec.ts", "**/*.test.ts"]
23
- }