@ryyseexvi/temtem-promise-v1 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- package/{README → README.md} +18 -1
- package/dist/index.d.mts +15 -34
- package/dist/index.d.ts +15 -34
- package/dist/index.js +6 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +44 -41
package/{README → README.md}
RENAMED
@@ -9,13 +9,14 @@ A modern TypeScript wrapper for the [Temtem API](https://temtem-api.mael.tech),
|
|
9
9
|
|
10
10
|
```sh
|
11
11
|
npm install temtem-promise-v1
|
12
|
+
```
|
12
13
|
|
13
14
|
🚀 Usage
|
14
15
|
|
15
16
|
```ts
|
16
17
|
import { TemtemAPI } from 'temtem-promise';
|
17
18
|
|
18
|
-
const api = new
|
19
|
+
const api = new TemtemDex();
|
19
20
|
|
20
21
|
// Example: Get all Temtems
|
21
22
|
const temtems = await api.getTemtems();
|
@@ -30,6 +31,7 @@ const filteredTemtems = await api.getTemtems({
|
|
30
31
|
expand: "evolution",
|
31
32
|
weaknesses: true
|
32
33
|
});
|
34
|
+
```
|
33
35
|
|
34
36
|
📚 Available Methods
|
35
37
|
- getTemtems(params?: TemtemQueryParams)
|
@@ -62,8 +64,23 @@ All methods that accept parameters support filtering the response using:
|
|
62
64
|
- limit: Limit the number of results
|
63
65
|
Some endpoints support additional parameters like names, expand, and weaknesses.
|
64
66
|
|
67
|
+
🏷️ Used Types/Interfaces
|
68
|
+
- BasicQueryParams { fields?: string, limit?: number }
|
69
|
+
- TemtemQueryParams extends BasicQueryParams { names?: string, expand?: string, weaknesses?: boolean }
|
70
|
+
- TemtemByIdQueryParams { fields?: string, expand?: string, weaknesses?: boolean }
|
71
|
+
- TechniquesQueryParams extends BasicQueryParams { names?: string }
|
72
|
+
- TraitsQueryParams extends BasicQueryParams { names?: string }
|
73
|
+
- TypesQueryParams = BasicQueryParams
|
74
|
+
- ConditionsQueryParams = BasicQueryParams
|
75
|
+
- TrainingCoursesQueryParams = BasicQueryParams
|
76
|
+
- ItemsQueryParams = BasicQueryParams
|
77
|
+
- GearQueryParams = BasicQueryParams
|
78
|
+
- WeaknessCalculateParams { attacking: string, defending: string }
|
79
|
+
|
65
80
|
📄 License
|
66
81
|
MIT
|
67
82
|
|
68
83
|
🤝 Contributing
|
69
84
|
This wrapper uses the Temtem API provided by https://temtem-api.mael.tech
|
85
|
+
|
86
|
+
# Using his typing package is strongly recommended until its included here.
|
package/dist/index.d.mts
CHANGED
@@ -1,6 +1,9 @@
|
|
1
|
-
interface
|
2
|
-
names?: string;
|
1
|
+
interface BasicQueryParams {
|
3
2
|
fields?: string;
|
3
|
+
limit?: number;
|
4
|
+
}
|
5
|
+
interface TemtemQueryParams extends BasicQueryParams {
|
6
|
+
names?: string;
|
4
7
|
expand?: string;
|
5
8
|
weaknesses?: boolean;
|
6
9
|
}
|
@@ -9,46 +12,23 @@ interface TemtemByIdQueryParams {
|
|
9
12
|
expand?: string;
|
10
13
|
weaknesses?: boolean;
|
11
14
|
}
|
12
|
-
interface
|
13
|
-
fields?: string;
|
14
|
-
limit?: number;
|
15
|
-
}
|
16
|
-
interface ConditionsQueryParams {
|
17
|
-
fields?: string;
|
18
|
-
limit?: number;
|
19
|
-
}
|
20
|
-
interface TechniquesQueryParams {
|
15
|
+
interface TechniquesQueryParams extends BasicQueryParams {
|
21
16
|
names?: string;
|
22
|
-
fields?: string;
|
23
|
-
limit?: number;
|
24
|
-
}
|
25
|
-
interface TrainingCoursesQueryParams {
|
26
|
-
fields?: string;
|
27
|
-
limit?: number;
|
28
17
|
}
|
29
|
-
interface TraitsQueryParams {
|
18
|
+
interface TraitsQueryParams extends BasicQueryParams {
|
30
19
|
names?: string;
|
31
|
-
fields?: string;
|
32
|
-
limit?: number;
|
33
|
-
}
|
34
|
-
interface ItemsQueryParams {
|
35
|
-
fields?: string;
|
36
|
-
limit?: number;
|
37
|
-
}
|
38
|
-
interface GearQueryParams {
|
39
|
-
fields?: string;
|
40
|
-
limit?: number;
|
41
|
-
}
|
42
|
-
interface BasicQueryParams {
|
43
|
-
fields?: string;
|
44
|
-
limit?: number;
|
45
20
|
}
|
46
21
|
interface WeaknessCalculateParams {
|
47
22
|
attacking: string;
|
48
23
|
defending: string;
|
49
24
|
}
|
25
|
+
type TypesQueryParams = BasicQueryParams;
|
26
|
+
type ConditionsQueryParams = BasicQueryParams;
|
27
|
+
type TrainingCoursesQueryParams = BasicQueryParams;
|
28
|
+
type ItemsQueryParams = BasicQueryParams;
|
29
|
+
type GearQueryParams = BasicQueryParams;
|
50
30
|
|
51
|
-
declare class
|
31
|
+
declare class TemtemDex {
|
52
32
|
private readonly baseUrl;
|
53
33
|
constructor();
|
54
34
|
getTemtems(params?: TemtemQueryParams): Promise<any>;
|
@@ -74,5 +54,6 @@ declare class TemtemAPI {
|
|
74
54
|
calculateWeaknesses(params: WeaknessCalculateParams): Promise<any>;
|
75
55
|
getBreeding(): Promise<any>;
|
76
56
|
}
|
57
|
+
declare const TemtemApi: typeof TemtemDex;
|
77
58
|
|
78
|
-
export {
|
59
|
+
export { type BasicQueryParams, type ConditionsQueryParams, type GearQueryParams, type ItemsQueryParams, type TechniquesQueryParams, TemtemApi, type TemtemByIdQueryParams, TemtemDex, type TemtemQueryParams, type TrainingCoursesQueryParams, type TraitsQueryParams, type TypesQueryParams, type WeaknessCalculateParams };
|
package/dist/index.d.ts
CHANGED
@@ -1,6 +1,9 @@
|
|
1
|
-
interface
|
2
|
-
names?: string;
|
1
|
+
interface BasicQueryParams {
|
3
2
|
fields?: string;
|
3
|
+
limit?: number;
|
4
|
+
}
|
5
|
+
interface TemtemQueryParams extends BasicQueryParams {
|
6
|
+
names?: string;
|
4
7
|
expand?: string;
|
5
8
|
weaknesses?: boolean;
|
6
9
|
}
|
@@ -9,46 +12,23 @@ interface TemtemByIdQueryParams {
|
|
9
12
|
expand?: string;
|
10
13
|
weaknesses?: boolean;
|
11
14
|
}
|
12
|
-
interface
|
13
|
-
fields?: string;
|
14
|
-
limit?: number;
|
15
|
-
}
|
16
|
-
interface ConditionsQueryParams {
|
17
|
-
fields?: string;
|
18
|
-
limit?: number;
|
19
|
-
}
|
20
|
-
interface TechniquesQueryParams {
|
15
|
+
interface TechniquesQueryParams extends BasicQueryParams {
|
21
16
|
names?: string;
|
22
|
-
fields?: string;
|
23
|
-
limit?: number;
|
24
|
-
}
|
25
|
-
interface TrainingCoursesQueryParams {
|
26
|
-
fields?: string;
|
27
|
-
limit?: number;
|
28
17
|
}
|
29
|
-
interface TraitsQueryParams {
|
18
|
+
interface TraitsQueryParams extends BasicQueryParams {
|
30
19
|
names?: string;
|
31
|
-
fields?: string;
|
32
|
-
limit?: number;
|
33
|
-
}
|
34
|
-
interface ItemsQueryParams {
|
35
|
-
fields?: string;
|
36
|
-
limit?: number;
|
37
|
-
}
|
38
|
-
interface GearQueryParams {
|
39
|
-
fields?: string;
|
40
|
-
limit?: number;
|
41
|
-
}
|
42
|
-
interface BasicQueryParams {
|
43
|
-
fields?: string;
|
44
|
-
limit?: number;
|
45
20
|
}
|
46
21
|
interface WeaknessCalculateParams {
|
47
22
|
attacking: string;
|
48
23
|
defending: string;
|
49
24
|
}
|
25
|
+
type TypesQueryParams = BasicQueryParams;
|
26
|
+
type ConditionsQueryParams = BasicQueryParams;
|
27
|
+
type TrainingCoursesQueryParams = BasicQueryParams;
|
28
|
+
type ItemsQueryParams = BasicQueryParams;
|
29
|
+
type GearQueryParams = BasicQueryParams;
|
50
30
|
|
51
|
-
declare class
|
31
|
+
declare class TemtemDex {
|
52
32
|
private readonly baseUrl;
|
53
33
|
constructor();
|
54
34
|
getTemtems(params?: TemtemQueryParams): Promise<any>;
|
@@ -74,5 +54,6 @@ declare class TemtemAPI {
|
|
74
54
|
calculateWeaknesses(params: WeaknessCalculateParams): Promise<any>;
|
75
55
|
getBreeding(): Promise<any>;
|
76
56
|
}
|
57
|
+
declare const TemtemApi: typeof TemtemDex;
|
77
58
|
|
78
|
-
export {
|
59
|
+
export { type BasicQueryParams, type ConditionsQueryParams, type GearQueryParams, type ItemsQueryParams, type TechniquesQueryParams, TemtemApi, type TemtemByIdQueryParams, TemtemDex, type TemtemQueryParams, type TrainingCoursesQueryParams, type TraitsQueryParams, type TypesQueryParams, type WeaknessCalculateParams };
|
package/dist/index.js
CHANGED
@@ -40,10 +40,11 @@ var __async = (__this, __arguments, generator) => {
|
|
40
40
|
// src/index.ts
|
41
41
|
var src_exports = {};
|
42
42
|
__export(src_exports, {
|
43
|
-
|
43
|
+
TemtemApi: () => TemtemApi,
|
44
|
+
TemtemDex: () => TemtemDex
|
44
45
|
});
|
45
46
|
module.exports = __toCommonJS(src_exports);
|
46
|
-
var
|
47
|
+
var TemtemDex = class {
|
47
48
|
constructor() {
|
48
49
|
this.baseUrl = "https://temtem-api.mael.tech/api";
|
49
50
|
}
|
@@ -253,8 +254,10 @@ var TemtemAPI = class {
|
|
253
254
|
});
|
254
255
|
}
|
255
256
|
};
|
257
|
+
var TemtemApi = TemtemDex;
|
256
258
|
// Annotate the CommonJS export names for ESM import in node:
|
257
259
|
0 && (module.exports = {
|
258
|
-
|
260
|
+
TemtemApi,
|
261
|
+
TemtemDex
|
259
262
|
});
|
260
263
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import * as Types from './types';\n\nexport class TemtemAPI {\n private readonly baseUrl: string;\n\n constructor() {\n this.baseUrl = 'https://temtem-api.mael.tech/api';\n }\n\n async getTemtems(params?: Types.TemtemQueryParams) {\n const queryParams = new URLSearchParams();\n \n if (params?.names) queryParams.append('names', params.names);\n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.expand) queryParams.append('expand', params.expand);\n if (params?.weaknesses) queryParams.append('weaknesses', params.weaknesses.toString());\n\n const url = `${this.baseUrl}/temtems${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getTemtemById(id: number, params?: Types.TemtemByIdQueryParams) {\n const queryParams = new URLSearchParams();\n \n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.expand) queryParams.append('expand', params.expand);\n if (params?.weaknesses) queryParams.append('weaknesses', params.weaknesses.toString());\n\n const url = `${this.baseUrl}/temtems/${id}${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getFreetemByTemtemNameAndLevel(name: string, level: number) {\n const response = await fetch(`${this.baseUrl}/freetem/${name}/${level}`);\n return await response.json();\n }\n\n async getFreetemsRewards() {\n const response = await fetch(`${this.baseUrl}/freetem/rewards`);\n return await response.json();\n }\n\n async getTypes(params?: Types.TypesQueryParams) {\n const queryParams = new URLSearchParams();\n \n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.limit) queryParams.append('limit', params.limit.toString());\n\n const url = `${this.baseUrl}/types${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getConditions(params?: Types.ConditionsQueryParams) {\n const queryParams = new URLSearchParams();\n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.limit) queryParams.append('limit', params.limit.toString());\n \n const url = `${this.baseUrl}/conditions${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getTechniques(params?: Types.TechniquesQueryParams) {\n const queryParams = new URLSearchParams();\n if (params?.names) queryParams.append('names', params.names);\n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.limit) queryParams.append('limit', params.limit.toString());\n \n const url = `${this.baseUrl}/techniques${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getTrainingCourses(params?: Types.TrainingCoursesQueryParams) {\n const queryParams = new URLSearchParams();\n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.limit) queryParams.append('limit', params.limit.toString());\n \n const url = `${this.baseUrl}/training-courses${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getTraits(params?: Types.TraitsQueryParams) {\n const queryParams = new URLSearchParams();\n if (params?.names) queryParams.append('names', params.names);\n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.limit) queryParams.append('limit', params.limit.toString());\n \n const url = `${this.baseUrl}/traits${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getItems(params?: Types.ItemsQueryParams) {\n const queryParams = new URLSearchParams();\n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.limit) queryParams.append('limit', params.limit.toString());\n \n const url = `${this.baseUrl}/items${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getGear(params?: Types.GearQueryParams) {\n const queryParams = new URLSearchParams();\n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.limit) queryParams.append('limit', params.limit.toString());\n \n const url = `${this.baseUrl}/gear${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getQuests(params?: Types.BasicQueryParams) {\n const queryParams = new URLSearchParams();\n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.limit) queryParams.append('limit', params.limit.toString());\n \n const url = `${this.baseUrl}/quests${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getDojos() {\n const response = await fetch(`${this.baseUrl}/dojos`);\n return await response.json();\n }\n\n async getCharacters(params?: Types.BasicQueryParams) {\n const queryParams = new URLSearchParams();\n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.limit) queryParams.append('limit', params.limit.toString());\n \n const url = `${this.baseUrl}/characters${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getSaipark(params?: Types.BasicQueryParams) {\n const queryParams = new URLSearchParams();\n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.limit) queryParams.append('limit', params.limit.toString());\n \n const url = `${this.baseUrl}/saipark${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getLocations(params?: Types.BasicQueryParams) {\n const queryParams = new URLSearchParams();\n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.limit) queryParams.append('limit', params.limit.toString());\n \n const url = `${this.baseUrl}/locations${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getCosmetics(params?: Types.BasicQueryParams) {\n const queryParams = new URLSearchParams();\n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.limit) queryParams.append('limit', params.limit.toString());\n \n const url = `${this.baseUrl}/cosmetics${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getDyes(params?: Types.BasicQueryParams) {\n const queryParams = new URLSearchParams();\n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.limit) queryParams.append('limit', params.limit.toString());\n \n const url = `${this.baseUrl}/dyes${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getPatches(params?: Types.BasicQueryParams) {\n const queryParams = new URLSearchParams();\n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.limit) queryParams.append('limit', params.limit.toString());\n \n const url = `${this.baseUrl}/patches${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getWeaknesses() {\n const response = await fetch(`${this.baseUrl}/weaknesses`);\n return await response.json();\n }\n\n async calculateWeaknesses(params: Types.WeaknessCalculateParams) {\n const queryParams = new URLSearchParams();\n queryParams.append('attacking', params.attacking);\n queryParams.append('defending', params.defending);\n \n const url = `${this.baseUrl}/weaknesses/calculate?${queryParams.toString()}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getBreeding() {\n const response = await fetch(`${this.baseUrl}/breeding`);\n return await response.json();\n }\n}\n"],"mappings":";;;;;;;;;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"sourcesContent":["import * as Types from './types';\n\nexport * from './types';\n\nexport class TemtemDex {\n private readonly baseUrl: string;\n\n constructor() {\n this.baseUrl = 'https://temtem-api.mael.tech/api';\n }\n\n async getTemtems(params?: Types.TemtemQueryParams) {\n const queryParams = new URLSearchParams();\n \n if (params?.names) queryParams.append('names', params.names);\n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.expand) queryParams.append('expand', params.expand);\n if (params?.weaknesses) queryParams.append('weaknesses', params.weaknesses.toString());\n\n const url = `${this.baseUrl}/temtems${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getTemtemById(id: number, params?: Types.TemtemByIdQueryParams) {\n const queryParams = new URLSearchParams();\n \n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.expand) queryParams.append('expand', params.expand);\n if (params?.weaknesses) queryParams.append('weaknesses', params.weaknesses.toString());\n\n const url = `${this.baseUrl}/temtems/${id}${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getFreetemByTemtemNameAndLevel(name: string, level: number) {\n const response = await fetch(`${this.baseUrl}/freetem/${name}/${level}`);\n return await response.json();\n }\n\n async getFreetemsRewards() {\n const response = await fetch(`${this.baseUrl}/freetem/rewards`);\n return await response.json();\n }\n\n async getTypes(params?: Types.TypesQueryParams) {\n const queryParams = new URLSearchParams();\n \n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.limit) queryParams.append('limit', params.limit.toString());\n\n const url = `${this.baseUrl}/types${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getConditions(params?: Types.ConditionsQueryParams) {\n const queryParams = new URLSearchParams();\n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.limit) queryParams.append('limit', params.limit.toString());\n \n const url = `${this.baseUrl}/conditions${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getTechniques(params?: Types.TechniquesQueryParams) {\n const queryParams = new URLSearchParams();\n if (params?.names) queryParams.append('names', params.names);\n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.limit) queryParams.append('limit', params.limit.toString());\n \n const url = `${this.baseUrl}/techniques${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getTrainingCourses(params?: Types.TrainingCoursesQueryParams) {\n const queryParams = new URLSearchParams();\n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.limit) queryParams.append('limit', params.limit.toString());\n \n const url = `${this.baseUrl}/training-courses${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getTraits(params?: Types.TraitsQueryParams) {\n const queryParams = new URLSearchParams();\n if (params?.names) queryParams.append('names', params.names);\n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.limit) queryParams.append('limit', params.limit.toString());\n \n const url = `${this.baseUrl}/traits${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getItems(params?: Types.ItemsQueryParams) {\n const queryParams = new URLSearchParams();\n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.limit) queryParams.append('limit', params.limit.toString());\n \n const url = `${this.baseUrl}/items${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getGear(params?: Types.GearQueryParams) {\n const queryParams = new URLSearchParams();\n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.limit) queryParams.append('limit', params.limit.toString());\n \n const url = `${this.baseUrl}/gear${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getQuests(params?: Types.BasicQueryParams) {\n const queryParams = new URLSearchParams();\n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.limit) queryParams.append('limit', params.limit.toString());\n \n const url = `${this.baseUrl}/quests${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getDojos() {\n const response = await fetch(`${this.baseUrl}/dojos`);\n return await response.json();\n }\n\n async getCharacters(params?: Types.BasicQueryParams) {\n const queryParams = new URLSearchParams();\n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.limit) queryParams.append('limit', params.limit.toString());\n \n const url = `${this.baseUrl}/characters${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getSaipark(params?: Types.BasicQueryParams) {\n const queryParams = new URLSearchParams();\n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.limit) queryParams.append('limit', params.limit.toString());\n \n const url = `${this.baseUrl}/saipark${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getLocations(params?: Types.BasicQueryParams) {\n const queryParams = new URLSearchParams();\n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.limit) queryParams.append('limit', params.limit.toString());\n \n const url = `${this.baseUrl}/locations${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getCosmetics(params?: Types.BasicQueryParams) {\n const queryParams = new URLSearchParams();\n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.limit) queryParams.append('limit', params.limit.toString());\n \n const url = `${this.baseUrl}/cosmetics${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getDyes(params?: Types.BasicQueryParams) {\n const queryParams = new URLSearchParams();\n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.limit) queryParams.append('limit', params.limit.toString());\n \n const url = `${this.baseUrl}/dyes${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getPatches(params?: Types.BasicQueryParams) {\n const queryParams = new URLSearchParams();\n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.limit) queryParams.append('limit', params.limit.toString());\n \n const url = `${this.baseUrl}/patches${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getWeaknesses() {\n const response = await fetch(`${this.baseUrl}/weaknesses`);\n return await response.json();\n }\n\n async calculateWeaknesses(params: Types.WeaknessCalculateParams) {\n const queryParams = new URLSearchParams();\n queryParams.append('attacking', params.attacking);\n queryParams.append('defending', params.defending);\n \n const url = `${this.baseUrl}/weaknesses/calculate?${queryParams.toString()}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getBreeding() {\n const response = await fetch(`${this.baseUrl}/breeding`);\n return await response.json();\n }\n}\n\nexport const TemtemApi = TemtemDex;"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAIO,IAAM,YAAN,MAAgB;AAAA,EAGnB,cAAc;AACV,SAAK,UAAU;AAAA,EACnB;AAAA,EAEM,WAAW,QAAkC;AAAA;AAC/C,YAAM,cAAc,IAAI,gBAAgB;AAExC,UAAI,iCAAQ,MAAO,aAAY,OAAO,SAAS,OAAO,KAAK;AAC3D,UAAI,iCAAQ,OAAQ,aAAY,OAAO,UAAU,OAAO,MAAM;AAC9D,UAAI,iCAAQ,OAAQ,aAAY,OAAO,UAAU,OAAO,MAAM;AAC9D,UAAI,iCAAQ,WAAY,aAAY,OAAO,cAAc,OAAO,WAAW,SAAS,CAAC;AAErF,YAAM,MAAM,GAAG,KAAK,OAAO,WAAW,YAAY,SAAS,IAAI,MAAM,YAAY,SAAS,IAAI,EAAE;AAChG,YAAM,WAAW,MAAM,MAAM,GAAG;AAChC,aAAO,MAAM,SAAS,KAAK;AAAA,IAC/B;AAAA;AAAA,EAEM,cAAc,IAAY,QAAsC;AAAA;AAClE,YAAM,cAAc,IAAI,gBAAgB;AAExC,UAAI,iCAAQ,OAAQ,aAAY,OAAO,UAAU,OAAO,MAAM;AAC9D,UAAI,iCAAQ,OAAQ,a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,QAAuC;AAAA;AAC7D,YAAM,cAAc,IAAI,gBAAgB;AACxC,kBAAY,OAAO,aAAa,OAAO,SAAS;AAChD,kBAAY,OAAO,aAAa,OAAO,SAAS;AAEhD,YAAM,MAAM,GAAG,KAAK,OAAO,yBAAyB,YAAY,SAAS,CAAC;AAC1E,YAAM,WAAW,MAAM,MAAM,GAAG;AAChC,aAAO,MAAM,SAAS,KAAK;AAAA,IAC/B;AAAA;AAAA,EAEM,cAAc;AAAA;AAChB,YAAM,WAAW,MAAM,MAAM,GAAG,KAAK,OAAO,WAAW;AACvD,aAAO,MAAM,SAAS,KAAK;AAAA,IAC/B;AAAA;AACJ;AAEO,IAAM,YAAY;","names":[]}
|
package/dist/index.mjs
CHANGED
@@ -20,7 +20,7 @@ var __async = (__this, __arguments, generator) => {
|
|
20
20
|
};
|
21
21
|
|
22
22
|
// src/index.ts
|
23
|
-
var
|
23
|
+
var TemtemDex = class {
|
24
24
|
constructor() {
|
25
25
|
this.baseUrl = "https://temtem-api.mael.tech/api";
|
26
26
|
}
|
@@ -230,7 +230,9 @@ var TemtemAPI = class {
|
|
230
230
|
});
|
231
231
|
}
|
232
232
|
};
|
233
|
+
var TemtemApi = TemtemDex;
|
233
234
|
export {
|
234
|
-
|
235
|
+
TemtemApi,
|
236
|
+
TemtemDex
|
235
237
|
};
|
236
238
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import * as Types from './types';\n\nexport class TemtemAPI {\n private readonly baseUrl: string;\n\n constructor() {\n this.baseUrl = 'https://temtem-api.mael.tech/api';\n }\n\n async getTemtems(params?: Types.TemtemQueryParams) {\n const queryParams = new URLSearchParams();\n \n if (params?.names) queryParams.append('names', params.names);\n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.expand) queryParams.append('expand', params.expand);\n if (params?.weaknesses) queryParams.append('weaknesses', params.weaknesses.toString());\n\n const url = `${this.baseUrl}/temtems${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getTemtemById(id: number, params?: Types.TemtemByIdQueryParams) {\n const queryParams = new URLSearchParams();\n \n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.expand) queryParams.append('expand', params.expand);\n if (params?.weaknesses) queryParams.append('weaknesses', params.weaknesses.toString());\n\n const url = `${this.baseUrl}/temtems/${id}${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getFreetemByTemtemNameAndLevel(name: string, level: number) {\n const response = await fetch(`${this.baseUrl}/freetem/${name}/${level}`);\n return await response.json();\n }\n\n async getFreetemsRewards() {\n const response = await fetch(`${this.baseUrl}/freetem/rewards`);\n return await response.json();\n }\n\n async getTypes(params?: Types.TypesQueryParams) {\n const queryParams = new URLSearchParams();\n \n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.limit) queryParams.append('limit', params.limit.toString());\n\n const url = `${this.baseUrl}/types${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getConditions(params?: Types.ConditionsQueryParams) {\n const queryParams = new URLSearchParams();\n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.limit) queryParams.append('limit', params.limit.toString());\n \n const url = `${this.baseUrl}/conditions${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getTechniques(params?: Types.TechniquesQueryParams) {\n const queryParams = new URLSearchParams();\n if (params?.names) queryParams.append('names', params.names);\n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.limit) queryParams.append('limit', params.limit.toString());\n \n const url = `${this.baseUrl}/techniques${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getTrainingCourses(params?: Types.TrainingCoursesQueryParams) {\n const queryParams = new URLSearchParams();\n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.limit) queryParams.append('limit', params.limit.toString());\n \n const url = `${this.baseUrl}/training-courses${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getTraits(params?: Types.TraitsQueryParams) {\n const queryParams = new URLSearchParams();\n if (params?.names) queryParams.append('names', params.names);\n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.limit) queryParams.append('limit', params.limit.toString());\n \n const url = `${this.baseUrl}/traits${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getItems(params?: Types.ItemsQueryParams) {\n const queryParams = new URLSearchParams();\n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.limit) queryParams.append('limit', params.limit.toString());\n \n const url = `${this.baseUrl}/items${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getGear(params?: Types.GearQueryParams) {\n const queryParams = new URLSearchParams();\n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.limit) queryParams.append('limit', params.limit.toString());\n \n const url = `${this.baseUrl}/gear${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getQuests(params?: Types.BasicQueryParams) {\n const queryParams = new URLSearchParams();\n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.limit) queryParams.append('limit', params.limit.toString());\n \n const url = `${this.baseUrl}/quests${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getDojos() {\n const response = await fetch(`${this.baseUrl}/dojos`);\n return await response.json();\n }\n\n async getCharacters(params?: Types.BasicQueryParams) {\n const queryParams = new URLSearchParams();\n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.limit) queryParams.append('limit', params.limit.toString());\n \n const url = `${this.baseUrl}/characters${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getSaipark(params?: Types.BasicQueryParams) {\n const queryParams = new URLSearchParams();\n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.limit) queryParams.append('limit', params.limit.toString());\n \n const url = `${this.baseUrl}/saipark${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getLocations(params?: Types.BasicQueryParams) {\n const queryParams = new URLSearchParams();\n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.limit) queryParams.append('limit', params.limit.toString());\n \n const url = `${this.baseUrl}/locations${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getCosmetics(params?: Types.BasicQueryParams) {\n const queryParams = new URLSearchParams();\n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.limit) queryParams.append('limit', params.limit.toString());\n \n const url = `${this.baseUrl}/cosmetics${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getDyes(params?: Types.BasicQueryParams) {\n const queryParams = new URLSearchParams();\n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.limit) queryParams.append('limit', params.limit.toString());\n \n const url = `${this.baseUrl}/dyes${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getPatches(params?: Types.BasicQueryParams) {\n const queryParams = new URLSearchParams();\n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.limit) queryParams.append('limit', params.limit.toString());\n \n const url = `${this.baseUrl}/patches${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getWeaknesses() {\n const response = await fetch(`${this.baseUrl}/weaknesses`);\n return await response.json();\n }\n\n async calculateWeaknesses(params: Types.WeaknessCalculateParams) {\n const queryParams = new URLSearchParams();\n queryParams.append('attacking', params.attacking);\n queryParams.append('defending', params.defending);\n \n const url = `${this.baseUrl}/weaknesses/calculate?${queryParams.toString()}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getBreeding() {\n const response = await fetch(`${this.baseUrl}/breeding`);\n return await response.json();\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAEO,IAAM,YAAN,MAAgB;AAAA,EAGnB,cAAc;AACV,SAAK,UAAU;AAAA,EACnB;AAAA,EAEM,WAAW,QAAkC;AAAA;AAC/C,YAAM,cAAc,IAAI,gBAAgB;AAExC,UAAI,iCAAQ,MAAO,aAAY,OAAO,SAAS,OAAO,KAAK;AAC3D,UAAI,iCAAQ,OAAQ,aAAY,OAAO,UAAU,OAAO,MAAM;AAC9D,UAAI,iCAAQ,OAAQ,aAAY,OAAO,UAAU,OAAO,MAAM;AAC9D,UAAI,iCAAQ,WAAY,aAAY,OAAO,cAAc,OAAO,WAAW,SAAS,CAAC;AAErF,YAAM,MAAM,GAAG,KAAK,OAAO,WAAW,YAAY,SAAS,IAAI,MAAM,YAAY,SAAS,IAAI,EAAE;AAChG,YAAM,WAAW,MAAM,MAAM,GAAG;AAChC,aAAO,MAAM,SAAS,KAAK;AAAA,IAC/B;AAAA;AAAA,EAEM,cAAc,IAAY,QAAsC;AAAA;AAClE,YAAM,cAAc,IAAI,gBAAgB;AAExC,UAAI,iCAAQ,OAAQ,aAAY,OAAO,UAAU,OAAO,MAAM;AAC9D,UAAI,iCAAQ,OAAQ,aAAY,OAAO,UAAU,OAAO,MAAM;AAC9D,UAAI,iCAAQ,WAAY,aAAY,OAAO,cAAc,OAAO,WAAW,SAAS,CAAC;AAErF,YAAM,MAAM,GAAG,KAAK,OAAO,YAAY,EAAE,GAAG,YAAY,SAAS,IAAI,MAAM,YAAY,SAAS,IAAI,EAAE;AACtG,YAAM,WAAW,MAAM,MAAM,GAAG;AAChC,aAAO,MAAM,SAAS,KAAK;AAAA,IAC/B;AAAA;AAAA,EAEM,+BAA+B,MAAc,OAAe;AAAA;AAC9D,YAAM,WAAW,MAAM,MAAM,GAAG,KAAK,OAAO,YAAY,IAAI,IAAI,KA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AAAA;AACJ;","names":[]}
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import * as Types from './types';\n\nexport * from './types';\n\nexport class TemtemDex {\n private readonly baseUrl: string;\n\n constructor() {\n this.baseUrl = 'https://temtem-api.mael.tech/api';\n }\n\n async getTemtems(params?: Types.TemtemQueryParams) {\n const queryParams = new URLSearchParams();\n \n if (params?.names) queryParams.append('names', params.names);\n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.expand) queryParams.append('expand', params.expand);\n if (params?.weaknesses) queryParams.append('weaknesses', params.weaknesses.toString());\n\n const url = `${this.baseUrl}/temtems${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getTemtemById(id: number, params?: Types.TemtemByIdQueryParams) {\n const queryParams = new URLSearchParams();\n \n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.expand) queryParams.append('expand', params.expand);\n if (params?.weaknesses) queryParams.append('weaknesses', params.weaknesses.toString());\n\n const url = `${this.baseUrl}/temtems/${id}${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getFreetemByTemtemNameAndLevel(name: string, level: number) {\n const response = await fetch(`${this.baseUrl}/freetem/${name}/${level}`);\n return await response.json();\n }\n\n async getFreetemsRewards() {\n const response = await fetch(`${this.baseUrl}/freetem/rewards`);\n return await response.json();\n }\n\n async getTypes(params?: Types.TypesQueryParams) {\n const queryParams = new URLSearchParams();\n \n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.limit) queryParams.append('limit', params.limit.toString());\n\n const url = `${this.baseUrl}/types${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getConditions(params?: Types.ConditionsQueryParams) {\n const queryParams = new URLSearchParams();\n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.limit) queryParams.append('limit', params.limit.toString());\n \n const url = `${this.baseUrl}/conditions${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getTechniques(params?: Types.TechniquesQueryParams) {\n const queryParams = new URLSearchParams();\n if (params?.names) queryParams.append('names', params.names);\n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.limit) queryParams.append('limit', params.limit.toString());\n \n const url = `${this.baseUrl}/techniques${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getTrainingCourses(params?: Types.TrainingCoursesQueryParams) {\n const queryParams = new URLSearchParams();\n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.limit) queryParams.append('limit', params.limit.toString());\n \n const url = `${this.baseUrl}/training-courses${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getTraits(params?: Types.TraitsQueryParams) {\n const queryParams = new URLSearchParams();\n if (params?.names) queryParams.append('names', params.names);\n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.limit) queryParams.append('limit', params.limit.toString());\n \n const url = `${this.baseUrl}/traits${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getItems(params?: Types.ItemsQueryParams) {\n const queryParams = new URLSearchParams();\n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.limit) queryParams.append('limit', params.limit.toString());\n \n const url = `${this.baseUrl}/items${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getGear(params?: Types.GearQueryParams) {\n const queryParams = new URLSearchParams();\n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.limit) queryParams.append('limit', params.limit.toString());\n \n const url = `${this.baseUrl}/gear${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getQuests(params?: Types.BasicQueryParams) {\n const queryParams = new URLSearchParams();\n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.limit) queryParams.append('limit', params.limit.toString());\n \n const url = `${this.baseUrl}/quests${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getDojos() {\n const response = await fetch(`${this.baseUrl}/dojos`);\n return await response.json();\n }\n\n async getCharacters(params?: Types.BasicQueryParams) {\n const queryParams = new URLSearchParams();\n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.limit) queryParams.append('limit', params.limit.toString());\n \n const url = `${this.baseUrl}/characters${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getSaipark(params?: Types.BasicQueryParams) {\n const queryParams = new URLSearchParams();\n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.limit) queryParams.append('limit', params.limit.toString());\n \n const url = `${this.baseUrl}/saipark${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getLocations(params?: Types.BasicQueryParams) {\n const queryParams = new URLSearchParams();\n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.limit) queryParams.append('limit', params.limit.toString());\n \n const url = `${this.baseUrl}/locations${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getCosmetics(params?: Types.BasicQueryParams) {\n const queryParams = new URLSearchParams();\n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.limit) queryParams.append('limit', params.limit.toString());\n \n const url = `${this.baseUrl}/cosmetics${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getDyes(params?: Types.BasicQueryParams) {\n const queryParams = new URLSearchParams();\n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.limit) queryParams.append('limit', params.limit.toString());\n \n const url = `${this.baseUrl}/dyes${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getPatches(params?: Types.BasicQueryParams) {\n const queryParams = new URLSearchParams();\n if (params?.fields) queryParams.append('fields', params.fields);\n if (params?.limit) queryParams.append('limit', params.limit.toString());\n \n const url = `${this.baseUrl}/patches${queryParams.toString() ? '?' + queryParams.toString() : ''}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getWeaknesses() {\n const response = await fetch(`${this.baseUrl}/weaknesses`);\n return await response.json();\n }\n\n async calculateWeaknesses(params: Types.WeaknessCalculateParams) {\n const queryParams = new URLSearchParams();\n queryParams.append('attacking', params.attacking);\n queryParams.append('defending', params.defending);\n \n const url = `${this.baseUrl}/weaknesses/calculate?${queryParams.toString()}`;\n const response = await fetch(url);\n return await response.json();\n }\n\n async getBreeding() {\n const response = await fetch(`${this.baseUrl}/breeding`);\n return await response.json();\n }\n}\n\nexport const TemtemApi = TemtemDex;"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAIO,IAAM,YAAN,MAAgB;AAAA,EAGnB,cAAc;AACV,SAAK,UAAU;AAAA,EACnB;AAAA,EAEM,WAAW,QAAkC;AAAA;AAC/C,YAAM,cAAc,IAAI,gBAAgB;AAExC,UAAI,iCAAQ,MAAO,aAAY,OAAO,SAAS,OAAO,KAAK;AAC3D,UAAI,iCAAQ,OAAQ,aAAY,OAAO,UAAU,OAAO,MAAM;AAC9D,UAAI,iCAAQ,OAAQ,aAAY,OAAO,UAAU,OAAO,MAAM;AAC9D,UAAI,iCAAQ,WAAY,aAAY,OAAO,cAAc,OAAO,WAAW,SAAS,CAAC;AAErF,YAAM,MAAM,GAAG,KAAK,OAAO,WAAW,YAAY,SAAS,IAAI,MAAM,YAAY,SAAS,IAAI,EAAE;AAChG,YAAM,WAAW,MAAM,MAAM,GAAG;AAChC,aAAO,MAAM,SAAS,KAAK;AAAA,IAC/B;AAAA;AAAA,EAEM,cAAc,IAAY,QAAsC;AAAA;AAClE,YAAM,cAAc,IAAI,gBAAgB;AAExC,UAAI,iCAAQ,OAAQ,aAAY,OAAO,UAAU,OAAO,MAAM;AAC9D,UAAI,iCAAQ,OAAQ,aAAY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AuC;AAAA;AAC7D,YAAM,cAAc,IAAI,gBAAgB;AACxC,kBAAY,OAAO,aAAa,OAAO,SAAS;AAChD,kBAAY,OAAO,aAAa,OAAO,SAAS;AAEhD,YAAM,MAAM,GAAG,KAAK,OAAO,yBAAyB,YAAY,SAAS,CAAC;AAC1E,YAAM,WAAW,MAAM,MAAM,GAAG;AAChC,aAAO,MAAM,SAAS,KAAK;AAAA,IAC/B;AAAA;AAAA,EAEM,cAAc;AAAA;AAChB,YAAM,WAAW,MAAM,MAAM,GAAG,KAAK,OAAO,WAAW;AACvD,aAAO,MAAM,SAAS,KAAK;AAAA,IAC/B;AAAA;AACJ;AAEO,IAAM,YAAY;","names":[]}
|
package/package.json
CHANGED
@@ -1,43 +1,46 @@
|
|
1
1
|
{
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
"
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
"
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
"
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
"
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
"
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
"
|
41
|
-
|
42
|
-
|
2
|
+
"name": "@ryyseexvi/temtem-promise-v1",
|
3
|
+
"version": "1.1.0",
|
4
|
+
"description": "A package that return all of the Temtem API calls as methods in a class",
|
5
|
+
"main": "./dist/index.js",
|
6
|
+
"module": "./dist/index.mjs",
|
7
|
+
"types": "./dist/index.d.ts",
|
8
|
+
"scripts": {
|
9
|
+
"build": "tsup",
|
10
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
11
|
+
"husky": "npm install --save-dev husky && npx husky init",
|
12
|
+
"prepare": "husky"
|
13
|
+
},
|
14
|
+
"repository": {
|
15
|
+
"type": "git",
|
16
|
+
"url": "git+https://github.com/ryyseeXVI/temtem-promise-v1.git"
|
17
|
+
},
|
18
|
+
"keywords": [
|
19
|
+
"Temtem",
|
20
|
+
"API",
|
21
|
+
"Promise",
|
22
|
+
"Class",
|
23
|
+
"Wrapper",
|
24
|
+
"TypeScript",
|
25
|
+
"OpenSource"
|
26
|
+
],
|
27
|
+
"author": "",
|
28
|
+
"license": "ISC",
|
29
|
+
"bugs": {
|
30
|
+
"url": "https://github.com/ryyseeXVI/temtem-promise-v1/issues"
|
31
|
+
},
|
32
|
+
"homepage": "https://github.com/ryyseeXVI/temtem-promise-v1#readme",
|
33
|
+
"devDependencies": {
|
34
|
+
"husky": "^9.1.7",
|
35
|
+
"ts-node": "^10.9.2",
|
36
|
+
"tsup": "^8.3.5",
|
37
|
+
"typescript": "^5.6.3"
|
38
|
+
},
|
39
|
+
"files": [
|
40
|
+
"dist",
|
41
|
+
"README.md"
|
42
|
+
],
|
43
|
+
"publishConfig": {
|
44
|
+
"access": "public"
|
45
|
+
}
|
43
46
|
}
|