@ryyseexvi/temtem-promise-v1 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README +69 -0
- package/dist/index.d.mts +78 -0
- package/dist/index.d.ts +78 -0
- package/dist/index.js +260 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +236 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +43 -0
package/README
ADDED
@@ -0,0 +1,69 @@
|
|
1
|
+
# Temtem API Wrapper 🎮
|
2
|
+
|
3
|
+
[![NPM Version](https://img.shields.io/npm/v/temtem-promise-v1)](https://www.npmjs.com/package/temtem-promise-v1)
|
4
|
+
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
|
5
|
+
|
6
|
+
A modern TypeScript wrapper for the [Temtem API](https://temtem-api.mael.tech), providing easy access to all Temtem game data.
|
7
|
+
|
8
|
+
## 📥 Installation
|
9
|
+
|
10
|
+
```sh
|
11
|
+
npm install temtem-promise-v1
|
12
|
+
|
13
|
+
🚀 Usage
|
14
|
+
|
15
|
+
```ts
|
16
|
+
import { TemtemAPI } from 'temtem-promise';
|
17
|
+
|
18
|
+
const api = new TemtemAPI();
|
19
|
+
|
20
|
+
// Example: Get all Temtems
|
21
|
+
const temtems = await api.getTemtems();
|
22
|
+
|
23
|
+
// Example: Get a specific Temtem with ID
|
24
|
+
const temtem = await api.getTemtemById(1);
|
25
|
+
|
26
|
+
// Example: Get Temtems with specific parameters
|
27
|
+
const filteredTemtems = await api.getTemtems({
|
28
|
+
names: "Pigepic,Crystle",
|
29
|
+
fields: "name,type",
|
30
|
+
expand: "evolution",
|
31
|
+
weaknesses: true
|
32
|
+
});
|
33
|
+
|
34
|
+
📚 Available Methods
|
35
|
+
- getTemtems(params?: TemtemQueryParams)
|
36
|
+
- getTemtemById(id: number, params?: TemtemByIdQueryParams)
|
37
|
+
- getFreetemByTemtemNameAndLevel(name: string, level: number)
|
38
|
+
- getFreetemsRewards()
|
39
|
+
- getTypes(params?: TypesQueryParams)
|
40
|
+
- getConditions(params?: ConditionsQueryParams)
|
41
|
+
- getTechniques(params?: TechniquesQueryParams)
|
42
|
+
- getTrainingCourses(params?: TrainingCoursesQueryParams)
|
43
|
+
- getTraits(params?: TraitsQueryParams)
|
44
|
+
- getItems(params?: ItemsQueryParams)
|
45
|
+
- getGear(params?: GearQueryParams)
|
46
|
+
- getQuests(params?: BasicQueryParams)
|
47
|
+
- getDojos()
|
48
|
+
- getCharacters(params?: BasicQueryParams)
|
49
|
+
- getSaipark(params?: BasicQueryParams)
|
50
|
+
- getLocations(params?: BasicQueryParams)
|
51
|
+
- getCosmetics(params?: BasicQueryParams)
|
52
|
+
- getDyes(params?: BasicQueryParams)
|
53
|
+
- getPatches(params?: BasicQueryParams)
|
54
|
+
- getWeaknesses()
|
55
|
+
- calculateWeaknesses(params: WeaknessCalculateParams)
|
56
|
+
- getBreeding()
|
57
|
+
|
58
|
+
🔍 Query Parameters
|
59
|
+
All methods that accept parameters support filtering the response using:
|
60
|
+
|
61
|
+
- fields: Specify which fields to return
|
62
|
+
- limit: Limit the number of results
|
63
|
+
Some endpoints support additional parameters like names, expand, and weaknesses.
|
64
|
+
|
65
|
+
📄 License
|
66
|
+
MIT
|
67
|
+
|
68
|
+
🤝 Contributing
|
69
|
+
This wrapper uses the Temtem API provided by https://temtem-api.mael.tech
|
package/dist/index.d.mts
ADDED
@@ -0,0 +1,78 @@
|
|
1
|
+
interface TemtemQueryParams {
|
2
|
+
names?: string;
|
3
|
+
fields?: string;
|
4
|
+
expand?: string;
|
5
|
+
weaknesses?: boolean;
|
6
|
+
}
|
7
|
+
interface TemtemByIdQueryParams {
|
8
|
+
fields?: string;
|
9
|
+
expand?: string;
|
10
|
+
weaknesses?: boolean;
|
11
|
+
}
|
12
|
+
interface TypesQueryParams {
|
13
|
+
fields?: string;
|
14
|
+
limit?: number;
|
15
|
+
}
|
16
|
+
interface ConditionsQueryParams {
|
17
|
+
fields?: string;
|
18
|
+
limit?: number;
|
19
|
+
}
|
20
|
+
interface TechniquesQueryParams {
|
21
|
+
names?: string;
|
22
|
+
fields?: string;
|
23
|
+
limit?: number;
|
24
|
+
}
|
25
|
+
interface TrainingCoursesQueryParams {
|
26
|
+
fields?: string;
|
27
|
+
limit?: number;
|
28
|
+
}
|
29
|
+
interface TraitsQueryParams {
|
30
|
+
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
|
+
}
|
46
|
+
interface WeaknessCalculateParams {
|
47
|
+
attacking: string;
|
48
|
+
defending: string;
|
49
|
+
}
|
50
|
+
|
51
|
+
declare class TemtemAPI {
|
52
|
+
private readonly baseUrl;
|
53
|
+
constructor();
|
54
|
+
getTemtems(params?: TemtemQueryParams): Promise<any>;
|
55
|
+
getTemtemById(id: number, params?: TemtemByIdQueryParams): Promise<any>;
|
56
|
+
getFreetemByTemtemNameAndLevel(name: string, level: number): Promise<any>;
|
57
|
+
getFreetemsRewards(): Promise<any>;
|
58
|
+
getTypes(params?: TypesQueryParams): Promise<any>;
|
59
|
+
getConditions(params?: ConditionsQueryParams): Promise<any>;
|
60
|
+
getTechniques(params?: TechniquesQueryParams): Promise<any>;
|
61
|
+
getTrainingCourses(params?: TrainingCoursesQueryParams): Promise<any>;
|
62
|
+
getTraits(params?: TraitsQueryParams): Promise<any>;
|
63
|
+
getItems(params?: ItemsQueryParams): Promise<any>;
|
64
|
+
getGear(params?: GearQueryParams): Promise<any>;
|
65
|
+
getQuests(params?: BasicQueryParams): Promise<any>;
|
66
|
+
getDojos(): Promise<any>;
|
67
|
+
getCharacters(params?: BasicQueryParams): Promise<any>;
|
68
|
+
getSaipark(params?: BasicQueryParams): Promise<any>;
|
69
|
+
getLocations(params?: BasicQueryParams): Promise<any>;
|
70
|
+
getCosmetics(params?: BasicQueryParams): Promise<any>;
|
71
|
+
getDyes(params?: BasicQueryParams): Promise<any>;
|
72
|
+
getPatches(params?: BasicQueryParams): Promise<any>;
|
73
|
+
getWeaknesses(): Promise<any>;
|
74
|
+
calculateWeaknesses(params: WeaknessCalculateParams): Promise<any>;
|
75
|
+
getBreeding(): Promise<any>;
|
76
|
+
}
|
77
|
+
|
78
|
+
export { TemtemAPI };
|
package/dist/index.d.ts
ADDED
@@ -0,0 +1,78 @@
|
|
1
|
+
interface TemtemQueryParams {
|
2
|
+
names?: string;
|
3
|
+
fields?: string;
|
4
|
+
expand?: string;
|
5
|
+
weaknesses?: boolean;
|
6
|
+
}
|
7
|
+
interface TemtemByIdQueryParams {
|
8
|
+
fields?: string;
|
9
|
+
expand?: string;
|
10
|
+
weaknesses?: boolean;
|
11
|
+
}
|
12
|
+
interface TypesQueryParams {
|
13
|
+
fields?: string;
|
14
|
+
limit?: number;
|
15
|
+
}
|
16
|
+
interface ConditionsQueryParams {
|
17
|
+
fields?: string;
|
18
|
+
limit?: number;
|
19
|
+
}
|
20
|
+
interface TechniquesQueryParams {
|
21
|
+
names?: string;
|
22
|
+
fields?: string;
|
23
|
+
limit?: number;
|
24
|
+
}
|
25
|
+
interface TrainingCoursesQueryParams {
|
26
|
+
fields?: string;
|
27
|
+
limit?: number;
|
28
|
+
}
|
29
|
+
interface TraitsQueryParams {
|
30
|
+
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
|
+
}
|
46
|
+
interface WeaknessCalculateParams {
|
47
|
+
attacking: string;
|
48
|
+
defending: string;
|
49
|
+
}
|
50
|
+
|
51
|
+
declare class TemtemAPI {
|
52
|
+
private readonly baseUrl;
|
53
|
+
constructor();
|
54
|
+
getTemtems(params?: TemtemQueryParams): Promise<any>;
|
55
|
+
getTemtemById(id: number, params?: TemtemByIdQueryParams): Promise<any>;
|
56
|
+
getFreetemByTemtemNameAndLevel(name: string, level: number): Promise<any>;
|
57
|
+
getFreetemsRewards(): Promise<any>;
|
58
|
+
getTypes(params?: TypesQueryParams): Promise<any>;
|
59
|
+
getConditions(params?: ConditionsQueryParams): Promise<any>;
|
60
|
+
getTechniques(params?: TechniquesQueryParams): Promise<any>;
|
61
|
+
getTrainingCourses(params?: TrainingCoursesQueryParams): Promise<any>;
|
62
|
+
getTraits(params?: TraitsQueryParams): Promise<any>;
|
63
|
+
getItems(params?: ItemsQueryParams): Promise<any>;
|
64
|
+
getGear(params?: GearQueryParams): Promise<any>;
|
65
|
+
getQuests(params?: BasicQueryParams): Promise<any>;
|
66
|
+
getDojos(): Promise<any>;
|
67
|
+
getCharacters(params?: BasicQueryParams): Promise<any>;
|
68
|
+
getSaipark(params?: BasicQueryParams): Promise<any>;
|
69
|
+
getLocations(params?: BasicQueryParams): Promise<any>;
|
70
|
+
getCosmetics(params?: BasicQueryParams): Promise<any>;
|
71
|
+
getDyes(params?: BasicQueryParams): Promise<any>;
|
72
|
+
getPatches(params?: BasicQueryParams): Promise<any>;
|
73
|
+
getWeaknesses(): Promise<any>;
|
74
|
+
calculateWeaknesses(params: WeaknessCalculateParams): Promise<any>;
|
75
|
+
getBreeding(): Promise<any>;
|
76
|
+
}
|
77
|
+
|
78
|
+
export { TemtemAPI };
|
package/dist/index.js
ADDED
@@ -0,0 +1,260 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __defProp = Object.defineProperty;
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
6
|
+
var __export = (target, all) => {
|
7
|
+
for (var name in all)
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
9
|
+
};
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
12
|
+
for (let key of __getOwnPropNames(from))
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
15
|
+
}
|
16
|
+
return to;
|
17
|
+
};
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
19
|
+
var __async = (__this, __arguments, generator) => {
|
20
|
+
return new Promise((resolve, reject) => {
|
21
|
+
var fulfilled = (value) => {
|
22
|
+
try {
|
23
|
+
step(generator.next(value));
|
24
|
+
} catch (e) {
|
25
|
+
reject(e);
|
26
|
+
}
|
27
|
+
};
|
28
|
+
var rejected = (value) => {
|
29
|
+
try {
|
30
|
+
step(generator.throw(value));
|
31
|
+
} catch (e) {
|
32
|
+
reject(e);
|
33
|
+
}
|
34
|
+
};
|
35
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
36
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
37
|
+
});
|
38
|
+
};
|
39
|
+
|
40
|
+
// src/index.ts
|
41
|
+
var src_exports = {};
|
42
|
+
__export(src_exports, {
|
43
|
+
TemtemAPI: () => TemtemAPI
|
44
|
+
});
|
45
|
+
module.exports = __toCommonJS(src_exports);
|
46
|
+
var TemtemAPI = class {
|
47
|
+
constructor() {
|
48
|
+
this.baseUrl = "https://temtem-api.mael.tech/api";
|
49
|
+
}
|
50
|
+
getTemtems(params) {
|
51
|
+
return __async(this, null, function* () {
|
52
|
+
const queryParams = new URLSearchParams();
|
53
|
+
if (params == null ? void 0 : params.names) queryParams.append("names", params.names);
|
54
|
+
if (params == null ? void 0 : params.fields) queryParams.append("fields", params.fields);
|
55
|
+
if (params == null ? void 0 : params.expand) queryParams.append("expand", params.expand);
|
56
|
+
if (params == null ? void 0 : params.weaknesses) queryParams.append("weaknesses", params.weaknesses.toString());
|
57
|
+
const url = `${this.baseUrl}/temtems${queryParams.toString() ? "?" + queryParams.toString() : ""}`;
|
58
|
+
const response = yield fetch(url);
|
59
|
+
return yield response.json();
|
60
|
+
});
|
61
|
+
}
|
62
|
+
getTemtemById(id, params) {
|
63
|
+
return __async(this, null, function* () {
|
64
|
+
const queryParams = new URLSearchParams();
|
65
|
+
if (params == null ? void 0 : params.fields) queryParams.append("fields", params.fields);
|
66
|
+
if (params == null ? void 0 : params.expand) queryParams.append("expand", params.expand);
|
67
|
+
if (params == null ? void 0 : params.weaknesses) queryParams.append("weaknesses", params.weaknesses.toString());
|
68
|
+
const url = `${this.baseUrl}/temtems/${id}${queryParams.toString() ? "?" + queryParams.toString() : ""}`;
|
69
|
+
const response = yield fetch(url);
|
70
|
+
return yield response.json();
|
71
|
+
});
|
72
|
+
}
|
73
|
+
getFreetemByTemtemNameAndLevel(name, level) {
|
74
|
+
return __async(this, null, function* () {
|
75
|
+
const response = yield fetch(`${this.baseUrl}/freetem/${name}/${level}`);
|
76
|
+
return yield response.json();
|
77
|
+
});
|
78
|
+
}
|
79
|
+
getFreetemsRewards() {
|
80
|
+
return __async(this, null, function* () {
|
81
|
+
const response = yield fetch(`${this.baseUrl}/freetem/rewards`);
|
82
|
+
return yield response.json();
|
83
|
+
});
|
84
|
+
}
|
85
|
+
getTypes(params) {
|
86
|
+
return __async(this, null, function* () {
|
87
|
+
const queryParams = new URLSearchParams();
|
88
|
+
if (params == null ? void 0 : params.fields) queryParams.append("fields", params.fields);
|
89
|
+
if (params == null ? void 0 : params.limit) queryParams.append("limit", params.limit.toString());
|
90
|
+
const url = `${this.baseUrl}/types${queryParams.toString() ? "?" + queryParams.toString() : ""}`;
|
91
|
+
const response = yield fetch(url);
|
92
|
+
return yield response.json();
|
93
|
+
});
|
94
|
+
}
|
95
|
+
getConditions(params) {
|
96
|
+
return __async(this, null, function* () {
|
97
|
+
const queryParams = new URLSearchParams();
|
98
|
+
if (params == null ? void 0 : params.fields) queryParams.append("fields", params.fields);
|
99
|
+
if (params == null ? void 0 : params.limit) queryParams.append("limit", params.limit.toString());
|
100
|
+
const url = `${this.baseUrl}/conditions${queryParams.toString() ? "?" + queryParams.toString() : ""}`;
|
101
|
+
const response = yield fetch(url);
|
102
|
+
return yield response.json();
|
103
|
+
});
|
104
|
+
}
|
105
|
+
getTechniques(params) {
|
106
|
+
return __async(this, null, function* () {
|
107
|
+
const queryParams = new URLSearchParams();
|
108
|
+
if (params == null ? void 0 : params.names) queryParams.append("names", params.names);
|
109
|
+
if (params == null ? void 0 : params.fields) queryParams.append("fields", params.fields);
|
110
|
+
if (params == null ? void 0 : params.limit) queryParams.append("limit", params.limit.toString());
|
111
|
+
const url = `${this.baseUrl}/techniques${queryParams.toString() ? "?" + queryParams.toString() : ""}`;
|
112
|
+
const response = yield fetch(url);
|
113
|
+
return yield response.json();
|
114
|
+
});
|
115
|
+
}
|
116
|
+
getTrainingCourses(params) {
|
117
|
+
return __async(this, null, function* () {
|
118
|
+
const queryParams = new URLSearchParams();
|
119
|
+
if (params == null ? void 0 : params.fields) queryParams.append("fields", params.fields);
|
120
|
+
if (params == null ? void 0 : params.limit) queryParams.append("limit", params.limit.toString());
|
121
|
+
const url = `${this.baseUrl}/training-courses${queryParams.toString() ? "?" + queryParams.toString() : ""}`;
|
122
|
+
const response = yield fetch(url);
|
123
|
+
return yield response.json();
|
124
|
+
});
|
125
|
+
}
|
126
|
+
getTraits(params) {
|
127
|
+
return __async(this, null, function* () {
|
128
|
+
const queryParams = new URLSearchParams();
|
129
|
+
if (params == null ? void 0 : params.names) queryParams.append("names", params.names);
|
130
|
+
if (params == null ? void 0 : params.fields) queryParams.append("fields", params.fields);
|
131
|
+
if (params == null ? void 0 : params.limit) queryParams.append("limit", params.limit.toString());
|
132
|
+
const url = `${this.baseUrl}/traits${queryParams.toString() ? "?" + queryParams.toString() : ""}`;
|
133
|
+
const response = yield fetch(url);
|
134
|
+
return yield response.json();
|
135
|
+
});
|
136
|
+
}
|
137
|
+
getItems(params) {
|
138
|
+
return __async(this, null, function* () {
|
139
|
+
const queryParams = new URLSearchParams();
|
140
|
+
if (params == null ? void 0 : params.fields) queryParams.append("fields", params.fields);
|
141
|
+
if (params == null ? void 0 : params.limit) queryParams.append("limit", params.limit.toString());
|
142
|
+
const url = `${this.baseUrl}/items${queryParams.toString() ? "?" + queryParams.toString() : ""}`;
|
143
|
+
const response = yield fetch(url);
|
144
|
+
return yield response.json();
|
145
|
+
});
|
146
|
+
}
|
147
|
+
getGear(params) {
|
148
|
+
return __async(this, null, function* () {
|
149
|
+
const queryParams = new URLSearchParams();
|
150
|
+
if (params == null ? void 0 : params.fields) queryParams.append("fields", params.fields);
|
151
|
+
if (params == null ? void 0 : params.limit) queryParams.append("limit", params.limit.toString());
|
152
|
+
const url = `${this.baseUrl}/gear${queryParams.toString() ? "?" + queryParams.toString() : ""}`;
|
153
|
+
const response = yield fetch(url);
|
154
|
+
return yield response.json();
|
155
|
+
});
|
156
|
+
}
|
157
|
+
getQuests(params) {
|
158
|
+
return __async(this, null, function* () {
|
159
|
+
const queryParams = new URLSearchParams();
|
160
|
+
if (params == null ? void 0 : params.fields) queryParams.append("fields", params.fields);
|
161
|
+
if (params == null ? void 0 : params.limit) queryParams.append("limit", params.limit.toString());
|
162
|
+
const url = `${this.baseUrl}/quests${queryParams.toString() ? "?" + queryParams.toString() : ""}`;
|
163
|
+
const response = yield fetch(url);
|
164
|
+
return yield response.json();
|
165
|
+
});
|
166
|
+
}
|
167
|
+
getDojos() {
|
168
|
+
return __async(this, null, function* () {
|
169
|
+
const response = yield fetch(`${this.baseUrl}/dojos`);
|
170
|
+
return yield response.json();
|
171
|
+
});
|
172
|
+
}
|
173
|
+
getCharacters(params) {
|
174
|
+
return __async(this, null, function* () {
|
175
|
+
const queryParams = new URLSearchParams();
|
176
|
+
if (params == null ? void 0 : params.fields) queryParams.append("fields", params.fields);
|
177
|
+
if (params == null ? void 0 : params.limit) queryParams.append("limit", params.limit.toString());
|
178
|
+
const url = `${this.baseUrl}/characters${queryParams.toString() ? "?" + queryParams.toString() : ""}`;
|
179
|
+
const response = yield fetch(url);
|
180
|
+
return yield response.json();
|
181
|
+
});
|
182
|
+
}
|
183
|
+
getSaipark(params) {
|
184
|
+
return __async(this, null, function* () {
|
185
|
+
const queryParams = new URLSearchParams();
|
186
|
+
if (params == null ? void 0 : params.fields) queryParams.append("fields", params.fields);
|
187
|
+
if (params == null ? void 0 : params.limit) queryParams.append("limit", params.limit.toString());
|
188
|
+
const url = `${this.baseUrl}/saipark${queryParams.toString() ? "?" + queryParams.toString() : ""}`;
|
189
|
+
const response = yield fetch(url);
|
190
|
+
return yield response.json();
|
191
|
+
});
|
192
|
+
}
|
193
|
+
getLocations(params) {
|
194
|
+
return __async(this, null, function* () {
|
195
|
+
const queryParams = new URLSearchParams();
|
196
|
+
if (params == null ? void 0 : params.fields) queryParams.append("fields", params.fields);
|
197
|
+
if (params == null ? void 0 : params.limit) queryParams.append("limit", params.limit.toString());
|
198
|
+
const url = `${this.baseUrl}/locations${queryParams.toString() ? "?" + queryParams.toString() : ""}`;
|
199
|
+
const response = yield fetch(url);
|
200
|
+
return yield response.json();
|
201
|
+
});
|
202
|
+
}
|
203
|
+
getCosmetics(params) {
|
204
|
+
return __async(this, null, function* () {
|
205
|
+
const queryParams = new URLSearchParams();
|
206
|
+
if (params == null ? void 0 : params.fields) queryParams.append("fields", params.fields);
|
207
|
+
if (params == null ? void 0 : params.limit) queryParams.append("limit", params.limit.toString());
|
208
|
+
const url = `${this.baseUrl}/cosmetics${queryParams.toString() ? "?" + queryParams.toString() : ""}`;
|
209
|
+
const response = yield fetch(url);
|
210
|
+
return yield response.json();
|
211
|
+
});
|
212
|
+
}
|
213
|
+
getDyes(params) {
|
214
|
+
return __async(this, null, function* () {
|
215
|
+
const queryParams = new URLSearchParams();
|
216
|
+
if (params == null ? void 0 : params.fields) queryParams.append("fields", params.fields);
|
217
|
+
if (params == null ? void 0 : params.limit) queryParams.append("limit", params.limit.toString());
|
218
|
+
const url = `${this.baseUrl}/dyes${queryParams.toString() ? "?" + queryParams.toString() : ""}`;
|
219
|
+
const response = yield fetch(url);
|
220
|
+
return yield response.json();
|
221
|
+
});
|
222
|
+
}
|
223
|
+
getPatches(params) {
|
224
|
+
return __async(this, null, function* () {
|
225
|
+
const queryParams = new URLSearchParams();
|
226
|
+
if (params == null ? void 0 : params.fields) queryParams.append("fields", params.fields);
|
227
|
+
if (params == null ? void 0 : params.limit) queryParams.append("limit", params.limit.toString());
|
228
|
+
const url = `${this.baseUrl}/patches${queryParams.toString() ? "?" + queryParams.toString() : ""}`;
|
229
|
+
const response = yield fetch(url);
|
230
|
+
return yield response.json();
|
231
|
+
});
|
232
|
+
}
|
233
|
+
getWeaknesses() {
|
234
|
+
return __async(this, null, function* () {
|
235
|
+
const response = yield fetch(`${this.baseUrl}/weaknesses`);
|
236
|
+
return yield response.json();
|
237
|
+
});
|
238
|
+
}
|
239
|
+
calculateWeaknesses(params) {
|
240
|
+
return __async(this, null, function* () {
|
241
|
+
const queryParams = new URLSearchParams();
|
242
|
+
queryParams.append("attacking", params.attacking);
|
243
|
+
queryParams.append("defending", params.defending);
|
244
|
+
const url = `${this.baseUrl}/weaknesses/calculate?${queryParams.toString()}`;
|
245
|
+
const response = yield fetch(url);
|
246
|
+
return yield response.json();
|
247
|
+
});
|
248
|
+
}
|
249
|
+
getBreeding() {
|
250
|
+
return __async(this, null, function* () {
|
251
|
+
const response = yield fetch(`${this.baseUrl}/breeding`);
|
252
|
+
return yield response.json();
|
253
|
+
});
|
254
|
+
}
|
255
|
+
};
|
256
|
+
// Annotate the CommonJS export names for ESM import in node:
|
257
|
+
0 && (module.exports = {
|
258
|
+
TemtemAPI
|
259
|
+
});
|
260
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;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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AAA,IAC/B;AAAA;AAAA,EAEM,oBAAoB,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;","names":[]}
|
package/dist/index.mjs
ADDED
@@ -0,0 +1,236 @@
|
|
1
|
+
var __async = (__this, __arguments, generator) => {
|
2
|
+
return new Promise((resolve, reject) => {
|
3
|
+
var fulfilled = (value) => {
|
4
|
+
try {
|
5
|
+
step(generator.next(value));
|
6
|
+
} catch (e) {
|
7
|
+
reject(e);
|
8
|
+
}
|
9
|
+
};
|
10
|
+
var rejected = (value) => {
|
11
|
+
try {
|
12
|
+
step(generator.throw(value));
|
13
|
+
} catch (e) {
|
14
|
+
reject(e);
|
15
|
+
}
|
16
|
+
};
|
17
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
18
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
19
|
+
});
|
20
|
+
};
|
21
|
+
|
22
|
+
// src/index.ts
|
23
|
+
var TemtemAPI = class {
|
24
|
+
constructor() {
|
25
|
+
this.baseUrl = "https://temtem-api.mael.tech/api";
|
26
|
+
}
|
27
|
+
getTemtems(params) {
|
28
|
+
return __async(this, null, function* () {
|
29
|
+
const queryParams = new URLSearchParams();
|
30
|
+
if (params == null ? void 0 : params.names) queryParams.append("names", params.names);
|
31
|
+
if (params == null ? void 0 : params.fields) queryParams.append("fields", params.fields);
|
32
|
+
if (params == null ? void 0 : params.expand) queryParams.append("expand", params.expand);
|
33
|
+
if (params == null ? void 0 : params.weaknesses) queryParams.append("weaknesses", params.weaknesses.toString());
|
34
|
+
const url = `${this.baseUrl}/temtems${queryParams.toString() ? "?" + queryParams.toString() : ""}`;
|
35
|
+
const response = yield fetch(url);
|
36
|
+
return yield response.json();
|
37
|
+
});
|
38
|
+
}
|
39
|
+
getTemtemById(id, params) {
|
40
|
+
return __async(this, null, function* () {
|
41
|
+
const queryParams = new URLSearchParams();
|
42
|
+
if (params == null ? void 0 : params.fields) queryParams.append("fields", params.fields);
|
43
|
+
if (params == null ? void 0 : params.expand) queryParams.append("expand", params.expand);
|
44
|
+
if (params == null ? void 0 : params.weaknesses) queryParams.append("weaknesses", params.weaknesses.toString());
|
45
|
+
const url = `${this.baseUrl}/temtems/${id}${queryParams.toString() ? "?" + queryParams.toString() : ""}`;
|
46
|
+
const response = yield fetch(url);
|
47
|
+
return yield response.json();
|
48
|
+
});
|
49
|
+
}
|
50
|
+
getFreetemByTemtemNameAndLevel(name, level) {
|
51
|
+
return __async(this, null, function* () {
|
52
|
+
const response = yield fetch(`${this.baseUrl}/freetem/${name}/${level}`);
|
53
|
+
return yield response.json();
|
54
|
+
});
|
55
|
+
}
|
56
|
+
getFreetemsRewards() {
|
57
|
+
return __async(this, null, function* () {
|
58
|
+
const response = yield fetch(`${this.baseUrl}/freetem/rewards`);
|
59
|
+
return yield response.json();
|
60
|
+
});
|
61
|
+
}
|
62
|
+
getTypes(params) {
|
63
|
+
return __async(this, null, function* () {
|
64
|
+
const queryParams = new URLSearchParams();
|
65
|
+
if (params == null ? void 0 : params.fields) queryParams.append("fields", params.fields);
|
66
|
+
if (params == null ? void 0 : params.limit) queryParams.append("limit", params.limit.toString());
|
67
|
+
const url = `${this.baseUrl}/types${queryParams.toString() ? "?" + queryParams.toString() : ""}`;
|
68
|
+
const response = yield fetch(url);
|
69
|
+
return yield response.json();
|
70
|
+
});
|
71
|
+
}
|
72
|
+
getConditions(params) {
|
73
|
+
return __async(this, null, function* () {
|
74
|
+
const queryParams = new URLSearchParams();
|
75
|
+
if (params == null ? void 0 : params.fields) queryParams.append("fields", params.fields);
|
76
|
+
if (params == null ? void 0 : params.limit) queryParams.append("limit", params.limit.toString());
|
77
|
+
const url = `${this.baseUrl}/conditions${queryParams.toString() ? "?" + queryParams.toString() : ""}`;
|
78
|
+
const response = yield fetch(url);
|
79
|
+
return yield response.json();
|
80
|
+
});
|
81
|
+
}
|
82
|
+
getTechniques(params) {
|
83
|
+
return __async(this, null, function* () {
|
84
|
+
const queryParams = new URLSearchParams();
|
85
|
+
if (params == null ? void 0 : params.names) queryParams.append("names", params.names);
|
86
|
+
if (params == null ? void 0 : params.fields) queryParams.append("fields", params.fields);
|
87
|
+
if (params == null ? void 0 : params.limit) queryParams.append("limit", params.limit.toString());
|
88
|
+
const url = `${this.baseUrl}/techniques${queryParams.toString() ? "?" + queryParams.toString() : ""}`;
|
89
|
+
const response = yield fetch(url);
|
90
|
+
return yield response.json();
|
91
|
+
});
|
92
|
+
}
|
93
|
+
getTrainingCourses(params) {
|
94
|
+
return __async(this, null, function* () {
|
95
|
+
const queryParams = new URLSearchParams();
|
96
|
+
if (params == null ? void 0 : params.fields) queryParams.append("fields", params.fields);
|
97
|
+
if (params == null ? void 0 : params.limit) queryParams.append("limit", params.limit.toString());
|
98
|
+
const url = `${this.baseUrl}/training-courses${queryParams.toString() ? "?" + queryParams.toString() : ""}`;
|
99
|
+
const response = yield fetch(url);
|
100
|
+
return yield response.json();
|
101
|
+
});
|
102
|
+
}
|
103
|
+
getTraits(params) {
|
104
|
+
return __async(this, null, function* () {
|
105
|
+
const queryParams = new URLSearchParams();
|
106
|
+
if (params == null ? void 0 : params.names) queryParams.append("names", params.names);
|
107
|
+
if (params == null ? void 0 : params.fields) queryParams.append("fields", params.fields);
|
108
|
+
if (params == null ? void 0 : params.limit) queryParams.append("limit", params.limit.toString());
|
109
|
+
const url = `${this.baseUrl}/traits${queryParams.toString() ? "?" + queryParams.toString() : ""}`;
|
110
|
+
const response = yield fetch(url);
|
111
|
+
return yield response.json();
|
112
|
+
});
|
113
|
+
}
|
114
|
+
getItems(params) {
|
115
|
+
return __async(this, null, function* () {
|
116
|
+
const queryParams = new URLSearchParams();
|
117
|
+
if (params == null ? void 0 : params.fields) queryParams.append("fields", params.fields);
|
118
|
+
if (params == null ? void 0 : params.limit) queryParams.append("limit", params.limit.toString());
|
119
|
+
const url = `${this.baseUrl}/items${queryParams.toString() ? "?" + queryParams.toString() : ""}`;
|
120
|
+
const response = yield fetch(url);
|
121
|
+
return yield response.json();
|
122
|
+
});
|
123
|
+
}
|
124
|
+
getGear(params) {
|
125
|
+
return __async(this, null, function* () {
|
126
|
+
const queryParams = new URLSearchParams();
|
127
|
+
if (params == null ? void 0 : params.fields) queryParams.append("fields", params.fields);
|
128
|
+
if (params == null ? void 0 : params.limit) queryParams.append("limit", params.limit.toString());
|
129
|
+
const url = `${this.baseUrl}/gear${queryParams.toString() ? "?" + queryParams.toString() : ""}`;
|
130
|
+
const response = yield fetch(url);
|
131
|
+
return yield response.json();
|
132
|
+
});
|
133
|
+
}
|
134
|
+
getQuests(params) {
|
135
|
+
return __async(this, null, function* () {
|
136
|
+
const queryParams = new URLSearchParams();
|
137
|
+
if (params == null ? void 0 : params.fields) queryParams.append("fields", params.fields);
|
138
|
+
if (params == null ? void 0 : params.limit) queryParams.append("limit", params.limit.toString());
|
139
|
+
const url = `${this.baseUrl}/quests${queryParams.toString() ? "?" + queryParams.toString() : ""}`;
|
140
|
+
const response = yield fetch(url);
|
141
|
+
return yield response.json();
|
142
|
+
});
|
143
|
+
}
|
144
|
+
getDojos() {
|
145
|
+
return __async(this, null, function* () {
|
146
|
+
const response = yield fetch(`${this.baseUrl}/dojos`);
|
147
|
+
return yield response.json();
|
148
|
+
});
|
149
|
+
}
|
150
|
+
getCharacters(params) {
|
151
|
+
return __async(this, null, function* () {
|
152
|
+
const queryParams = new URLSearchParams();
|
153
|
+
if (params == null ? void 0 : params.fields) queryParams.append("fields", params.fields);
|
154
|
+
if (params == null ? void 0 : params.limit) queryParams.append("limit", params.limit.toString());
|
155
|
+
const url = `${this.baseUrl}/characters${queryParams.toString() ? "?" + queryParams.toString() : ""}`;
|
156
|
+
const response = yield fetch(url);
|
157
|
+
return yield response.json();
|
158
|
+
});
|
159
|
+
}
|
160
|
+
getSaipark(params) {
|
161
|
+
return __async(this, null, function* () {
|
162
|
+
const queryParams = new URLSearchParams();
|
163
|
+
if (params == null ? void 0 : params.fields) queryParams.append("fields", params.fields);
|
164
|
+
if (params == null ? void 0 : params.limit) queryParams.append("limit", params.limit.toString());
|
165
|
+
const url = `${this.baseUrl}/saipark${queryParams.toString() ? "?" + queryParams.toString() : ""}`;
|
166
|
+
const response = yield fetch(url);
|
167
|
+
return yield response.json();
|
168
|
+
});
|
169
|
+
}
|
170
|
+
getLocations(params) {
|
171
|
+
return __async(this, null, function* () {
|
172
|
+
const queryParams = new URLSearchParams();
|
173
|
+
if (params == null ? void 0 : params.fields) queryParams.append("fields", params.fields);
|
174
|
+
if (params == null ? void 0 : params.limit) queryParams.append("limit", params.limit.toString());
|
175
|
+
const url = `${this.baseUrl}/locations${queryParams.toString() ? "?" + queryParams.toString() : ""}`;
|
176
|
+
const response = yield fetch(url);
|
177
|
+
return yield response.json();
|
178
|
+
});
|
179
|
+
}
|
180
|
+
getCosmetics(params) {
|
181
|
+
return __async(this, null, function* () {
|
182
|
+
const queryParams = new URLSearchParams();
|
183
|
+
if (params == null ? void 0 : params.fields) queryParams.append("fields", params.fields);
|
184
|
+
if (params == null ? void 0 : params.limit) queryParams.append("limit", params.limit.toString());
|
185
|
+
const url = `${this.baseUrl}/cosmetics${queryParams.toString() ? "?" + queryParams.toString() : ""}`;
|
186
|
+
const response = yield fetch(url);
|
187
|
+
return yield response.json();
|
188
|
+
});
|
189
|
+
}
|
190
|
+
getDyes(params) {
|
191
|
+
return __async(this, null, function* () {
|
192
|
+
const queryParams = new URLSearchParams();
|
193
|
+
if (params == null ? void 0 : params.fields) queryParams.append("fields", params.fields);
|
194
|
+
if (params == null ? void 0 : params.limit) queryParams.append("limit", params.limit.toString());
|
195
|
+
const url = `${this.baseUrl}/dyes${queryParams.toString() ? "?" + queryParams.toString() : ""}`;
|
196
|
+
const response = yield fetch(url);
|
197
|
+
return yield response.json();
|
198
|
+
});
|
199
|
+
}
|
200
|
+
getPatches(params) {
|
201
|
+
return __async(this, null, function* () {
|
202
|
+
const queryParams = new URLSearchParams();
|
203
|
+
if (params == null ? void 0 : params.fields) queryParams.append("fields", params.fields);
|
204
|
+
if (params == null ? void 0 : params.limit) queryParams.append("limit", params.limit.toString());
|
205
|
+
const url = `${this.baseUrl}/patches${queryParams.toString() ? "?" + queryParams.toString() : ""}`;
|
206
|
+
const response = yield fetch(url);
|
207
|
+
return yield response.json();
|
208
|
+
});
|
209
|
+
}
|
210
|
+
getWeaknesses() {
|
211
|
+
return __async(this, null, function* () {
|
212
|
+
const response = yield fetch(`${this.baseUrl}/weaknesses`);
|
213
|
+
return yield response.json();
|
214
|
+
});
|
215
|
+
}
|
216
|
+
calculateWeaknesses(params) {
|
217
|
+
return __async(this, null, function* () {
|
218
|
+
const queryParams = new URLSearchParams();
|
219
|
+
queryParams.append("attacking", params.attacking);
|
220
|
+
queryParams.append("defending", params.defending);
|
221
|
+
const url = `${this.baseUrl}/weaknesses/calculate?${queryParams.toString()}`;
|
222
|
+
const response = yield fetch(url);
|
223
|
+
return yield response.json();
|
224
|
+
});
|
225
|
+
}
|
226
|
+
getBreeding() {
|
227
|
+
return __async(this, null, function* () {
|
228
|
+
const response = yield fetch(`${this.baseUrl}/breeding`);
|
229
|
+
return yield response.json();
|
230
|
+
});
|
231
|
+
}
|
232
|
+
};
|
233
|
+
export {
|
234
|
+
TemtemAPI
|
235
|
+
};
|
236
|
+
//# sourceMappingURL=index.mjs.map
|
@@ -0,0 +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,M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AAO,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;","names":[]}
|
package/package.json
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
{
|
2
|
+
"name": "@ryyseexvi/temtem-promise-v1",
|
3
|
+
"version": "1.0.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
|
+
},
|
12
|
+
"repository": {
|
13
|
+
"type": "git",
|
14
|
+
"url": "git+https://github.com/ryyseeXVI/temtem-promise-v1.git"
|
15
|
+
},
|
16
|
+
"keywords": [
|
17
|
+
"Temtem",
|
18
|
+
"API",
|
19
|
+
"Promise",
|
20
|
+
"Class",
|
21
|
+
"Wrapper",
|
22
|
+
"TypeScript",
|
23
|
+
"OpenSource"
|
24
|
+
],
|
25
|
+
"author": "",
|
26
|
+
"license": "ISC",
|
27
|
+
"bugs": {
|
28
|
+
"url": "https://github.com/ryyseeXVI/temtem-promise-v1/issues"
|
29
|
+
},
|
30
|
+
"homepage": "https://github.com/ryyseeXVI/temtem-promise-v1#readme",
|
31
|
+
"devDependencies": {
|
32
|
+
"ts-node": "^10.9.2",
|
33
|
+
"tsup": "^8.3.5",
|
34
|
+
"typescript": "^5.6.3"
|
35
|
+
},
|
36
|
+
"files": [
|
37
|
+
"dist",
|
38
|
+
"README.md"
|
39
|
+
],
|
40
|
+
"publishConfig": {
|
41
|
+
"access": "public"
|
42
|
+
}
|
43
|
+
}
|