@crysoline/lib 0.1.6 → 0.1.7
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.
- package/dist/core/anime/123anime/index.d.ts +27 -0
- package/dist/core/anime/123anime/index.js +18 -0
- package/dist/core/anime/anicore/index.d.ts +27 -0
- package/dist/core/anime/anicore/index.js +18 -0
- package/dist/core/anime/anicore/types.d.ts +16 -0
- package/dist/core/anime/anicore/types.js +1 -0
- package/dist/core/anime/anidap/index.d.ts +27 -0
- package/dist/core/anime/anidap/index.js +18 -0
- package/dist/core/anime/aniliberty/index.d.ts +27 -0
- package/dist/core/anime/aniliberty/index.js +18 -0
- package/dist/core/anime/aniliberty/types.d.ts +3 -3
- package/dist/core/anime/anime3rb/index.d.ts +27 -0
- package/dist/core/anime/anime3rb/index.js +18 -0
- package/dist/core/anime/anime3rb/types.d.ts +2 -2
- package/dist/core/anime/animeav1/index.d.ts +27 -0
- package/dist/core/anime/animeav1/index.js +18 -0
- package/dist/core/anime/animeav1/types.d.ts +4 -4
- package/dist/core/anime/animegg/index.d.ts +27 -0
- package/dist/core/anime/animegg/index.js +18 -0
- package/dist/core/anime/animegg/types.d.ts +3 -3
- package/dist/core/anime/animeheaven/index.d.ts +27 -0
- package/dist/core/anime/animeheaven/index.js +18 -0
- package/dist/core/anime/animeheaven/types.d.ts +1 -1
- package/dist/core/anime/animekai/index.d.ts +27 -0
- package/dist/core/anime/animekai/index.js +18 -0
- package/dist/core/anime/animekai/types.d.ts +5 -5
- package/dist/core/anime/animelib/index.d.ts +31 -0
- package/dist/core/anime/animelib/index.js +18 -0
- package/dist/core/anime/animelib/types.d.ts +2 -2
- package/dist/core/anime/animemeow/index.d.ts +27 -0
- package/dist/core/anime/animemeow/index.js +18 -0
- package/dist/core/anime/animenexus/index.d.ts +27 -0
- package/dist/core/anime/animenexus/index.js +18 -0
- package/dist/core/anime/animenexus/types.d.ts +16 -16
- package/dist/core/anime/animenix/index.d.ts +27 -0
- package/dist/core/anime/animenix/index.js +18 -0
- package/dist/core/anime/animeonsen/index.d.ts +27 -0
- package/dist/core/anime/animeonsen/index.js +18 -0
- package/dist/core/anime/animeonsen/types.d.ts +8 -8
- package/dist/core/anime/animepahe/index.d.ts +27 -0
- package/dist/core/anime/animepahe/index.js +18 -0
- package/dist/core/anime/animeparadise/index.d.ts +26 -0
- package/dist/core/anime/animeparadise/index.js +18 -0
- package/dist/core/anime/anizone/index.d.ts +27 -0
- package/dist/core/anime/anizone/index.js +18 -0
- package/dist/core/anime/anizone/types.d.ts +5 -5
- package/dist/core/anime/hianime/index.d.ts +31 -0
- package/dist/core/anime/hianime/index.js +18 -0
- package/dist/core/anime/hianime/types.d.ts +8 -8
- package/dist/core/anime/index.d.ts +80 -69
- package/dist/core/anime/index.js +27 -261
- package/dist/core/anime/kickassanime/index.d.ts +27 -0
- package/dist/core/anime/kickassanime/index.js +18 -0
- package/dist/core/anime/kickassanime/types.d.ts +8 -8
- package/dist/core/anime/lunar/index.d.ts +28 -0
- package/dist/core/anime/lunar/index.js +19 -0
- package/dist/core/anime/lunar/types.d.ts +8 -8
- package/dist/core/anime/uniquestream/index.d.ts +27 -0
- package/dist/core/anime/uniquestream/index.js +18 -0
- package/dist/core/anime/uniquestream/types.d.ts +3 -3
- package/dist/core/hentai/hanime/index.d.ts +28 -0
- package/dist/core/hentai/hanime/index.js +19 -0
- package/dist/core/hentai/hentaigasm/index.d.ts +14 -0
- package/dist/core/hentai/hentaigasm/index.js +5 -0
- package/dist/core/hentai/hentaigasm/types.d.ts +15 -0
- package/dist/core/hentai/hentaigasm/types.js +1 -0
- package/dist/core/hentai/hentaihaven/index.d.ts +30 -0
- package/dist/core/hentai/hentaihaven/index.js +21 -0
- package/dist/core/hentai/hstream/index.d.ts +27 -0
- package/dist/core/hentai/hstream/index.js +18 -0
- package/dist/core/hentai/index.d.ts +25 -17
- package/dist/core/hentai/index.js +8 -62
- package/dist/core/hentai/watchhentai/index.d.ts +27 -0
- package/dist/core/hentai/watchhentai/index.js +18 -0
- package/dist/core/hentai/watchhentai/types.d.ts +3 -3
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.js +1 -0
- package/dist/core/manga/1manga/index.d.ts +27 -0
- package/dist/core/manga/1manga/index.js +20 -0
- package/dist/core/manga/1manga/types.d.ts +17 -0
- package/dist/core/manga/1manga/types.js +1 -0
- package/dist/core/manga/comix/index.d.ts +27 -0
- package/dist/core/manga/comix/index.js +19 -0
- package/dist/core/manga/comix/types.d.ts +3 -3
- package/dist/core/manga/index.d.ts +219 -18
- package/dist/core/manga/index.js +29 -75
- package/dist/core/manga/lunar/index.d.ts +27 -0
- package/dist/core/manga/lunar/index.js +19 -0
- package/dist/core/manga/lunar/types.d.ts +2 -2
- package/dist/core/manga/mangadex/index.d.ts +28 -0
- package/dist/core/manga/mangadex/index.js +20 -0
- package/dist/core/manga/mangadex/types.d.ts +2 -2
- package/dist/core/manga/mangafire/index.d.ts +27 -0
- package/dist/core/manga/mangafire/index.js +19 -0
- package/dist/core/manga/mangafire/types.d.ts +4 -4
- package/dist/core/manga/mbbcdn/index.d.ts +288 -0
- package/dist/core/manga/mbbcdn/index.js +200 -0
- package/dist/core/manga/mbbcdn/types.d.ts +14 -0
- package/dist/core/manga/mbbcdn/types.js +1 -0
- package/dist/core/manga/toonilycdn/index.d.ts +131 -0
- package/dist/core/manga/toonilycdn/index.js +91 -0
- package/dist/core/manga/toonilycdn/types.d.ts +14 -0
- package/dist/core/manga/toonilycdn/types.js +1 -0
- package/dist/core/manga/weebcentral/index.d.ts +27 -0
- package/dist/core/manga/weebcentral/index.js +19 -0
- package/dist/core/manga/weebcentral/types.d.ts +4 -4
- package/dist/core/meta/anilist/index.d.ts +20 -0
- package/dist/core/meta/anilist/index.js +18 -0
- package/dist/core/meta/index.d.ts +7 -11
- package/dist/core/meta/index.js +4 -55
- package/dist/core/meta/myanimelist/index.d.ts +20 -0
- package/dist/core/meta/myanimelist/index.js +18 -0
- package/dist/core/meta/myanimelist/types.d.ts +15 -15
- package/dist/core/meta/mymangalist/index.d.ts +7 -0
- package/dist/core/meta/mymangalist/index.js +5 -0
- package/dist/core/meta/mymangalist/types.d.ts +9 -9
- package/dist/core/novels/index.d.ts +41 -0
- package/dist/core/novels/index.js +11 -0
- package/dist/core/novels/jnovels/index.d.ts +26 -0
- package/dist/core/novels/jnovels/index.js +19 -0
- package/dist/core/novels/novelfire/index.d.ts +28 -0
- package/dist/core/novels/novelfire/index.js +20 -0
- package/dist/core/novels/novelfire/types.d.ts +4 -0
- package/dist/core/novels/novelfire/types.js +1 -0
- package/dist/core/novels/novelhall/index.d.ts +26 -0
- package/dist/core/novels/novelhall/index.js +19 -0
- package/dist/helpers/fetch.d.ts +6 -0
- package/dist/helpers/fetch.js +16 -0
- package/dist/helpers/index.d.ts +1 -0
- package/dist/helpers/index.js +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export declare const Novels: {
|
|
2
|
+
JNovels: (apiKey: string) => {
|
|
3
|
+
name: string;
|
|
4
|
+
} & {
|
|
5
|
+
search: (q: string) => Promise<import("../types").Search<unknown>[]>;
|
|
6
|
+
info: (id: string | number) => Promise<import("../types").Info<unknown, import("../types").Episode<unknown>>>;
|
|
7
|
+
chapters: (id: string | number) => Promise<import("../types").Chapter<unknown>[]>;
|
|
8
|
+
pages: (params: {
|
|
9
|
+
id: string | number;
|
|
10
|
+
chapterId: string | number;
|
|
11
|
+
lang?: string;
|
|
12
|
+
}) => Promise<import("../types").Page[]>;
|
|
13
|
+
};
|
|
14
|
+
NovelFire: (apiKey: string) => {
|
|
15
|
+
name: string;
|
|
16
|
+
} & {
|
|
17
|
+
search: (q: string) => Promise<import("../types").Search<import("./novelfire").NovelFireSearchMeta>[]>;
|
|
18
|
+
info: (id: string | number) => Promise<import("../types").Info<unknown, import("../types").Episode<unknown>>>;
|
|
19
|
+
chapters: (id: string | number) => Promise<import("../types").Chapter<unknown>[]>;
|
|
20
|
+
pages: (params: {
|
|
21
|
+
id: string | number;
|
|
22
|
+
chapterId: string | number;
|
|
23
|
+
lang?: string;
|
|
24
|
+
}) => Promise<import("../types").Page[]>;
|
|
25
|
+
};
|
|
26
|
+
NovelHall: (apiKey: string) => {
|
|
27
|
+
name: string;
|
|
28
|
+
} & {
|
|
29
|
+
search: (q: string) => Promise<import("../types").Search<unknown>[]>;
|
|
30
|
+
info: (id: string | number) => Promise<import("../types").Info<unknown, import("../types").Episode<unknown>>>;
|
|
31
|
+
chapters: (id: string | number) => Promise<import("../types").Chapter<unknown>[]>;
|
|
32
|
+
pages: (params: {
|
|
33
|
+
id: string | number;
|
|
34
|
+
chapterId: string | number;
|
|
35
|
+
lang?: string;
|
|
36
|
+
}) => Promise<import("../types").Page[]>;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
export * from './jnovels';
|
|
40
|
+
export * from './novelfire';
|
|
41
|
+
export * from './novelhall';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { JNovels } from './jnovels';
|
|
2
|
+
import { NovelFire } from './novelfire';
|
|
3
|
+
import { NovelHall } from './novelhall';
|
|
4
|
+
export const Novels = {
|
|
5
|
+
JNovels,
|
|
6
|
+
NovelFire,
|
|
7
|
+
NovelHall,
|
|
8
|
+
};
|
|
9
|
+
export * from './jnovels';
|
|
10
|
+
export * from './novelfire';
|
|
11
|
+
export * from './novelhall';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates a JNovels API client.
|
|
3
|
+
*
|
|
4
|
+
* @param apiKey - Your API key for authentication
|
|
5
|
+
* @returns API client with methods: search, info, chapters, pages
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* const client = JNovels(process.env.API_KEY);
|
|
10
|
+
* const results = await client.search("one piece");
|
|
11
|
+
* const info = await client.info(results[0].id);
|
|
12
|
+
* const chapters = await client.chapters(results[0].id);
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
export declare const JNovels: (apiKey: string) => {
|
|
16
|
+
name: string;
|
|
17
|
+
} & {
|
|
18
|
+
search: (q: string) => Promise<import("../../types").Search<unknown>[]>;
|
|
19
|
+
info: (id: string | number) => Promise<import("../../types").Info<unknown, import("../../types").Episode<unknown>>>;
|
|
20
|
+
chapters: (id: string | number) => Promise<import("../../types").Chapter<unknown>[]>;
|
|
21
|
+
pages: (params: {
|
|
22
|
+
id: string | number;
|
|
23
|
+
chapterId: string | number;
|
|
24
|
+
lang?: string;
|
|
25
|
+
}) => Promise<import("../../types").Page[]>;
|
|
26
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { NovelFetch } from '../../../helpers';
|
|
2
|
+
/**
|
|
3
|
+
* Creates a JNovels API client.
|
|
4
|
+
*
|
|
5
|
+
* @param apiKey - Your API key for authentication
|
|
6
|
+
* @returns API client with methods: search, info, chapters, pages
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* const client = JNovels(process.env.API_KEY);
|
|
11
|
+
* const results = await client.search("one piece");
|
|
12
|
+
* const info = await client.info(results[0].id);
|
|
13
|
+
* const chapters = await client.chapters(results[0].id);
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
export const JNovels = (apiKey) => NovelFetch({
|
|
17
|
+
provider: 'jnovels',
|
|
18
|
+
apiKey,
|
|
19
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { NovelFireSearchMeta } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Creates a NovelFire API client.
|
|
4
|
+
*
|
|
5
|
+
* @param apiKey - Your API key for authentication
|
|
6
|
+
* @returns API client with methods: search, info, chapters, pages
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* const client = NovelFire(process.env.API_KEY);
|
|
11
|
+
* const results = await client.search("one piece");
|
|
12
|
+
* const info = await client.info(results[0].id);
|
|
13
|
+
* const chapters = await client.chapters(results[0].id);
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
export declare const NovelFire: (apiKey: string) => {
|
|
17
|
+
name: string;
|
|
18
|
+
} & {
|
|
19
|
+
search: (q: string) => Promise<import("../../types").Search<NovelFireSearchMeta>[]>;
|
|
20
|
+
info: (id: string | number) => Promise<import("../../types").Info<unknown, import("../../types").Episode<unknown>>>;
|
|
21
|
+
chapters: (id: string | number) => Promise<import("../../types").Chapter<unknown>[]>;
|
|
22
|
+
pages: (params: {
|
|
23
|
+
id: string | number;
|
|
24
|
+
chapterId: string | number;
|
|
25
|
+
lang?: string;
|
|
26
|
+
}) => Promise<import("../../types").Page[]>;
|
|
27
|
+
};
|
|
28
|
+
export * from './types';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { NovelFetch } from '../../../helpers';
|
|
2
|
+
/**
|
|
3
|
+
* Creates a NovelFire API client.
|
|
4
|
+
*
|
|
5
|
+
* @param apiKey - Your API key for authentication
|
|
6
|
+
* @returns API client with methods: search, info, chapters, pages
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* const client = NovelFire(process.env.API_KEY);
|
|
11
|
+
* const results = await client.search("one piece");
|
|
12
|
+
* const info = await client.info(results[0].id);
|
|
13
|
+
* const chapters = await client.chapters(results[0].id);
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
export const NovelFire = (apiKey) => NovelFetch({
|
|
17
|
+
provider: 'novelfire',
|
|
18
|
+
apiKey,
|
|
19
|
+
});
|
|
20
|
+
export * from './types';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates a NovelHall API client.
|
|
3
|
+
*
|
|
4
|
+
* @param apiKey - Your API key for authentication
|
|
5
|
+
* @returns API client with methods: search, info, chapters, pages
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* const client = NovelHall(process.env.API_KEY);
|
|
10
|
+
* const results = await client.search("one piece");
|
|
11
|
+
* const info = await client.info(results[0].id);
|
|
12
|
+
* const chapters = await client.chapters(results[0].id);
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
export declare const NovelHall: (apiKey: string) => {
|
|
16
|
+
name: string;
|
|
17
|
+
} & {
|
|
18
|
+
search: (q: string) => Promise<import("../../types").Search<unknown>[]>;
|
|
19
|
+
info: (id: string | number) => Promise<import("../../types").Info<unknown, import("../../types").Episode<unknown>>>;
|
|
20
|
+
chapters: (id: string | number) => Promise<import("../../types").Chapter<unknown>[]>;
|
|
21
|
+
pages: (params: {
|
|
22
|
+
id: string | number;
|
|
23
|
+
chapterId: string | number;
|
|
24
|
+
lang?: string;
|
|
25
|
+
}) => Promise<import("../../types").Page[]>;
|
|
26
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { NovelFetch } from '../../../helpers';
|
|
2
|
+
/**
|
|
3
|
+
* Creates a NovelHall API client.
|
|
4
|
+
*
|
|
5
|
+
* @param apiKey - Your API key for authentication
|
|
6
|
+
* @returns API client with methods: search, info, chapters, pages
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* const client = NovelHall(process.env.API_KEY);
|
|
11
|
+
* const results = await client.search("one piece");
|
|
12
|
+
* const info = await client.info(results[0].id);
|
|
13
|
+
* const chapters = await client.chapters(results[0].id);
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
export const NovelHall = (apiKey) => NovelFetch({
|
|
17
|
+
provider: 'novelhall',
|
|
18
|
+
apiKey,
|
|
19
|
+
});
|
package/dist/helpers/fetch.d.ts
CHANGED
|
@@ -71,6 +71,12 @@ export declare const MangaFetch: <TSearchMeta = unknown, TInfoMeta = unknown, TC
|
|
|
71
71
|
chapters: true;
|
|
72
72
|
pages: true;
|
|
73
73
|
}>(config: FetchModuleConfig) => BuildMangaRoutes<S, TSearchMeta, TInfoMeta, TChapterMeta>;
|
|
74
|
+
export declare const NovelFetch: <TSearchMeta = unknown, TInfoMeta = unknown, TChapterMeta = unknown, S extends SelectRoutes = {
|
|
75
|
+
search: true;
|
|
76
|
+
info: true;
|
|
77
|
+
chapters: true;
|
|
78
|
+
pages: true;
|
|
79
|
+
}>(config: FetchModuleConfig) => BuildMangaRoutes<S, TSearchMeta, TInfoMeta, TChapterMeta>;
|
|
74
80
|
export declare const MetaFetch: <TSearchMeta = unknown, TInfoMeta = unknown, S extends SelectRoutes = {
|
|
75
81
|
search: true;
|
|
76
82
|
info: true;
|
package/dist/helpers/fetch.js
CHANGED
|
@@ -71,6 +71,22 @@ export const MangaFetch = (config) => {
|
|
|
71
71
|
pages,
|
|
72
72
|
};
|
|
73
73
|
};
|
|
74
|
+
export const NovelFetch = (config) => {
|
|
75
|
+
const { baseUrl = 'https://api.crysoline.moe', provider, apiKey } = config;
|
|
76
|
+
const basePath = `${baseUrl}/api/novels/${provider}/`;
|
|
77
|
+
const fetcher = fetchFn(basePath, apiKey);
|
|
78
|
+
const search = async (q) => fetcher('search', { q });
|
|
79
|
+
const info = async (id) => fetcher(`info/${encodeURIComponent(id)}`);
|
|
80
|
+
const chapters = async (id) => fetcher(`chapters/${encodeURIComponent(id)}`);
|
|
81
|
+
const pages = (params) => fetcher('pages', params);
|
|
82
|
+
return {
|
|
83
|
+
name: provider,
|
|
84
|
+
search,
|
|
85
|
+
info,
|
|
86
|
+
chapters,
|
|
87
|
+
pages,
|
|
88
|
+
};
|
|
89
|
+
};
|
|
74
90
|
export const MetaFetch = (config) => {
|
|
75
91
|
const { baseUrl = 'https://api.crysoline.moe', provider, apiKey } = config;
|
|
76
92
|
const basePath = `${baseUrl}/api/meta/${provider}/`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './fetch';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './fetch';
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@crysoline/lib",
|
|
3
3
|
"description": "The official crysoline library for anime, manga using the Crysoline API",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"version": "0.1.
|
|
5
|
+
"version": "0.1.7",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/index.js",
|
|
8
8
|
"types": "dist/index.d.ts",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"format": "biome format . --write"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@biomejs/biome": "2.3.
|
|
33
|
+
"@biomejs/biome": "2.3.13",
|
|
34
34
|
"typescript": "^5",
|
|
35
35
|
"@types/bun": "latest"
|
|
36
36
|
},
|