pokenode-ts 1.11.1 → 1.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -2
- package/README.md +9 -19
- package/dist/clients/berry.client.js +6 -6
- package/dist/clients/contest.client.js +7 -7
- package/dist/clients/encounter.client.js +9 -9
- package/dist/clients/evolution.client.js +5 -5
- package/dist/clients/game.client.js +12 -12
- package/dist/clients/index.js +12 -12
- package/dist/clients/item.client.js +15 -15
- package/dist/clients/location.client.js +12 -12
- package/dist/clients/machine.client.js +2 -2
- package/dist/clients/move.client.js +21 -21
- package/dist/clients/pokemon.client.js +45 -45
- package/dist/clients/utility.client.js +3 -3
- package/dist/config/logger.js +1 -1
- package/dist/constants/index.js +12 -12
- package/dist/index.d.ts +2 -2
- package/dist/index.js +5 -5
- package/dist/models/Berry/index.js +1 -1
- package/dist/models/Common/index.js +11 -11
- package/dist/models/Contest/index.js +1 -1
- package/dist/models/Encounter/index.js +1 -1
- package/dist/models/Evolution/index.js +1 -1
- package/dist/models/Game/index.js +4 -4
- package/dist/models/Item/index.js +1 -1
- package/dist/models/Location/index.js +4 -4
- package/dist/models/Machine/index.js +1 -1
- package/dist/models/Moves/index.js +1 -1
- package/dist/models/Pokemon/index.js +10 -10
- package/dist/models/index.js +11 -11
- package/dist/structures/index.js +1 -1
- package/package.json +24 -24
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
# [1.12.0](https://github.com/Gabb-c/pokenode-ts/compare/v1.11.1...v1.12.0) (2022-03-03)
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
### Bug Fixes
|
|
5
5
|
|
|
6
|
-
* **
|
|
6
|
+
* **ci:** remove .yarnclean from ci ([766674d](https://github.com/Gabb-c/pokenode-ts/commit/766674d45065ffbe3378201591392397454ddf0c))
|
|
7
|
+
* **model:** remove duplicate type ([65285ff](https://github.com/Gabb-c/pokenode-ts/commit/65285ff2935d51e19de6777c29c8ee6d342ca84a))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* add sonarcloud metrics ([3a9b84b](https://github.com/Gabb-c/pokenode-ts/commit/3a9b84b4b275fc0aae4e8f56a2404db2e250afd8))
|
|
13
|
+
* **ci:** add sonarcloud action ([5f117a5](https://github.com/Gabb-c/pokenode-ts/commit/5f117a516ea6807e74bd43365f9b9fa6e608c5ff))
|
package/README.md
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
<p align="left">
|
|
4
4
|
<img alt="Build" src="https://img.shields.io/github/workflow/status/Gabb-c/pokenode-ts/Build?color=000000&labelColor=480ca8&style=for-the-badge&logo=nodedotjs&logoColor=white">
|
|
5
5
|
<img alt="Codecov" src="https://img.shields.io/codecov/c/github/Gabb-c/pokenode-ts?color=000000&labelColor=f72585&&style=for-the-badge&token=whfY8GNSpS&logo=codecov&logoColor=white">
|
|
6
|
-
<
|
|
7
|
-
<
|
|
6
|
+
<a href="https://open.vscode.dev/Gabb-c/pokenode-ts">
|
|
7
|
+
<img alt="VSCode" src="https://img.shields.io/badge/VSCode-0078d7.svg?&style=for-the-badge&logo=visual-studio-code&logoColor=white&label=Open%20in&color=000000&labelColor=007acc" />
|
|
8
|
+
<a/>
|
|
8
9
|
<img alt="NPM Downloads" src="https://img.shields.io/npm/dt/pokenode-ts?style=for-the-badge&color=000000&labelColor=CB3837&logo=npm" />
|
|
9
|
-
</a>
|
|
10
10
|
</p>
|
|
11
11
|
|
|
12
12
|
## What it is
|
|
@@ -63,24 +63,14 @@ import { MainClient } from 'pokenode-ts';
|
|
|
63
63
|
|
|
64
64
|
Check out our [Documentation page](https://pokenode-ts-docs-gabb-c.vercel.app/)!
|
|
65
65
|
|
|
66
|
-
##
|
|
66
|
+
## Security
|
|
67
67
|
|
|
68
|
-
|
|
68
|
+
Every change in this project is analyzed by [SonarCloud](https://sonarcloud.io/)
|
|
69
69
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
<a href="https://insomnia.rest/download">
|
|
75
|
-
<img alt="Insomnia Download" src="https://img.shields.io/badge/Insomnia-5849be?style=for-the-badge&logo=Insomnia&logoColor=white&label=Download&labelColor=black"/>
|
|
76
|
-
</a>
|
|
77
|
-
</div>
|
|
78
|
-
|
|
79
|
-
## Open in VS Code
|
|
80
|
-
|
|
81
|
-
Open Pokenode-ts in your Code, either using the [Remote Repositories extension](https://code.visualstudio.com/blogs/2021/06/10/remote-repositories), or [cloning in a Dev Container](https://code.visualstudio.com/docs/remote/containers):
|
|
82
|
-
|
|
83
|
-
[](https://open.vscode.dev/Gabb-c/pokenode-ts)
|
|
70
|
+
[](https://sonarcloud.io/summary/new_code?id=Gabb-c_pokenode-ts)
|
|
71
|
+
[](https://sonarcloud.io/summary/new_code?id=Gabb-c_pokenode-ts)
|
|
72
|
+
[](https://sonarcloud.io/summary/new_code?id=Gabb-c_pokenode-ts)
|
|
73
|
+
[](https://sonarcloud.io/summary/new_code?id=Gabb-c_pokenode-ts)
|
|
84
74
|
|
|
85
75
|
## Leave your feedback
|
|
86
76
|
|
|
@@ -24,7 +24,7 @@ class BerryClient extends base_1.BaseClient {
|
|
|
24
24
|
* @returns A Berry
|
|
25
25
|
*/
|
|
26
26
|
getBerryByName(name) {
|
|
27
|
-
return
|
|
27
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
28
28
|
return new Promise((resolve, reject) => {
|
|
29
29
|
this.api
|
|
30
30
|
.get(`${constants_1.Endpoints.Berry}/${name}`)
|
|
@@ -39,7 +39,7 @@ class BerryClient extends base_1.BaseClient {
|
|
|
39
39
|
* @returns A Berry
|
|
40
40
|
*/
|
|
41
41
|
getBerryById(id) {
|
|
42
|
-
return
|
|
42
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
43
43
|
return new Promise((resolve, reject) => {
|
|
44
44
|
this.api
|
|
45
45
|
.get(`${constants_1.Endpoints.Berry}/${id}`)
|
|
@@ -54,7 +54,7 @@ class BerryClient extends base_1.BaseClient {
|
|
|
54
54
|
* @returns Berry Firmness
|
|
55
55
|
*/
|
|
56
56
|
getBerryFirmnessById(id) {
|
|
57
|
-
return
|
|
57
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
58
58
|
return new Promise((resolve, reject) => {
|
|
59
59
|
this.api
|
|
60
60
|
.get(`${constants_1.Endpoints.BerryFirmness}/${id}`)
|
|
@@ -69,7 +69,7 @@ class BerryClient extends base_1.BaseClient {
|
|
|
69
69
|
* @returns Berry Firmness
|
|
70
70
|
*/
|
|
71
71
|
getBerryFirmnessByName(name) {
|
|
72
|
-
return
|
|
72
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
73
73
|
return new Promise((resolve, reject) => {
|
|
74
74
|
this.api
|
|
75
75
|
.get(`${constants_1.Endpoints.BerryFirmness}/${name}`)
|
|
@@ -85,7 +85,7 @@ class BerryClient extends base_1.BaseClient {
|
|
|
85
85
|
* @returns Berry Flavor
|
|
86
86
|
*/
|
|
87
87
|
getBerryFlavorById(id) {
|
|
88
|
-
return
|
|
88
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
89
89
|
return new Promise((resolve, reject) => {
|
|
90
90
|
this.api
|
|
91
91
|
.get(`${constants_1.Endpoints.BerryFlavor}/${id}`)
|
|
@@ -101,7 +101,7 @@ class BerryClient extends base_1.BaseClient {
|
|
|
101
101
|
* @returns Berry Flavor
|
|
102
102
|
*/
|
|
103
103
|
getBerryFlavorByName(name) {
|
|
104
|
-
return
|
|
104
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
105
105
|
return new Promise((resolve, reject) => {
|
|
106
106
|
this.api
|
|
107
107
|
.get(`${constants_1.Endpoints.BerryFlavor}/${name}`)
|
|
@@ -27,7 +27,7 @@ class ContestClient extends base_1.BaseClient {
|
|
|
27
27
|
* @returns A Contest Type
|
|
28
28
|
*/
|
|
29
29
|
getContestTypeByName(name) {
|
|
30
|
-
return
|
|
30
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
31
31
|
return new Promise((resolve, reject) => {
|
|
32
32
|
this.api
|
|
33
33
|
.get(`${constants_1.Endpoints.ContestType}/${name}`)
|
|
@@ -42,7 +42,7 @@ class ContestClient extends base_1.BaseClient {
|
|
|
42
42
|
* @returns A Contest Type
|
|
43
43
|
*/
|
|
44
44
|
getContestTypeById(id) {
|
|
45
|
-
return
|
|
45
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
46
46
|
return new Promise((resolve, reject) => {
|
|
47
47
|
this.api
|
|
48
48
|
.get(`${constants_1.Endpoints.ContestType}/${id}`)
|
|
@@ -57,7 +57,7 @@ class ContestClient extends base_1.BaseClient {
|
|
|
57
57
|
* @returns Contest Effect
|
|
58
58
|
*/
|
|
59
59
|
getContestEffectById(id) {
|
|
60
|
-
return
|
|
60
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
61
61
|
return new Promise((resolve, reject) => {
|
|
62
62
|
this.api
|
|
63
63
|
.get(`${constants_1.Endpoints.ContestEffect}/${id}`)
|
|
@@ -72,7 +72,7 @@ class ContestClient extends base_1.BaseClient {
|
|
|
72
72
|
* @returns Super Contest Effect
|
|
73
73
|
*/
|
|
74
74
|
getSuperContestEffectById(id) {
|
|
75
|
-
return
|
|
75
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
76
76
|
return new Promise((resolve, reject) => {
|
|
77
77
|
this.api
|
|
78
78
|
.get(`${constants_1.Endpoints.SuperContestEffect}/${id}`)
|
|
@@ -88,7 +88,7 @@ class ContestClient extends base_1.BaseClient {
|
|
|
88
88
|
* @returns A list of contest types
|
|
89
89
|
*/
|
|
90
90
|
listContestTypes(offset, limit) {
|
|
91
|
-
return
|
|
91
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
92
92
|
return new Promise((resolve, reject) => {
|
|
93
93
|
this.api
|
|
94
94
|
.get(`${constants_1.Endpoints.ContestType}?offset=${offset || 0}&limit=${limit || 20}`)
|
|
@@ -104,7 +104,7 @@ class ContestClient extends base_1.BaseClient {
|
|
|
104
104
|
* @returns A list of contest effects
|
|
105
105
|
*/
|
|
106
106
|
listContestEffects(offset, limit) {
|
|
107
|
-
return
|
|
107
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
108
108
|
return new Promise((resolve, reject) => {
|
|
109
109
|
this.api
|
|
110
110
|
.get(`${constants_1.Endpoints.ContestEffect}?offset=${offset || 0}&limit=${limit || 20}`)
|
|
@@ -120,7 +120,7 @@ class ContestClient extends base_1.BaseClient {
|
|
|
120
120
|
* @returns A list of Super Contest Effect
|
|
121
121
|
*/
|
|
122
122
|
listSuperContestEffects(offset, limit) {
|
|
123
|
-
return
|
|
123
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
124
124
|
return new Promise((resolve, reject) => {
|
|
125
125
|
this.api
|
|
126
126
|
.get(`${constants_1.Endpoints.SuperContestEffect}?offset=${offset || 0}&limit=${limit || 20}`)
|
|
@@ -27,7 +27,7 @@ class EncounterClient extends base_1.BaseClient {
|
|
|
27
27
|
* @returns An Encounter Method
|
|
28
28
|
*/
|
|
29
29
|
getEncounterMethodByName(name) {
|
|
30
|
-
return
|
|
30
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
31
31
|
return new Promise((resolve, reject) => {
|
|
32
32
|
this.api
|
|
33
33
|
.get(`${constants_1.Endpoints.EncouterMethod}/${name}`)
|
|
@@ -42,7 +42,7 @@ class EncounterClient extends base_1.BaseClient {
|
|
|
42
42
|
* @returns An Encounter Method
|
|
43
43
|
*/
|
|
44
44
|
getEncounterMethodById(id) {
|
|
45
|
-
return
|
|
45
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
46
46
|
return new Promise((resolve, reject) => {
|
|
47
47
|
this.api
|
|
48
48
|
.get(`${constants_1.Endpoints.EncouterMethod}/${id}`)
|
|
@@ -57,7 +57,7 @@ class EncounterClient extends base_1.BaseClient {
|
|
|
57
57
|
* @returns An Encounter Condition
|
|
58
58
|
*/
|
|
59
59
|
getEncounterConditionById(id) {
|
|
60
|
-
return
|
|
60
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
61
61
|
return new Promise((resolve, reject) => {
|
|
62
62
|
this.api
|
|
63
63
|
.get(`${constants_1.Endpoints.EncounterCondition}/${id}`)
|
|
@@ -72,7 +72,7 @@ class EncounterClient extends base_1.BaseClient {
|
|
|
72
72
|
* @returns An Encounter Condition
|
|
73
73
|
*/
|
|
74
74
|
getEncounterConditionByName(name) {
|
|
75
|
-
return
|
|
75
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
76
76
|
return new Promise((resolve, reject) => {
|
|
77
77
|
this.api
|
|
78
78
|
.get(`${constants_1.Endpoints.EncounterCondition}/${name}`)
|
|
@@ -87,7 +87,7 @@ class EncounterClient extends base_1.BaseClient {
|
|
|
87
87
|
* @returns An Encounter Condition Value
|
|
88
88
|
*/
|
|
89
89
|
getEncounterConditionValueByName(name) {
|
|
90
|
-
return
|
|
90
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
91
91
|
return new Promise((resolve, reject) => {
|
|
92
92
|
this.api
|
|
93
93
|
.get(`${constants_1.Endpoints.EncouterConditionValue}/${name}`)
|
|
@@ -102,7 +102,7 @@ class EncounterClient extends base_1.BaseClient {
|
|
|
102
102
|
* @returns An Encounter Condition Value
|
|
103
103
|
*/
|
|
104
104
|
getEncounterConditionValueById(id) {
|
|
105
|
-
return
|
|
105
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
106
106
|
return new Promise((resolve, reject) => {
|
|
107
107
|
this.api
|
|
108
108
|
.get(`${constants_1.Endpoints.EncouterConditionValue}/${id}`)
|
|
@@ -118,7 +118,7 @@ class EncounterClient extends base_1.BaseClient {
|
|
|
118
118
|
* @returns A list of Encounter Methods
|
|
119
119
|
*/
|
|
120
120
|
listEncounterMethods(offset, limit) {
|
|
121
|
-
return
|
|
121
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
122
122
|
return new Promise((resolve, reject) => {
|
|
123
123
|
this.api
|
|
124
124
|
.get(`${constants_1.Endpoints.EncouterMethod}?offset=${offset || 0}&limit=${limit || 20}`)
|
|
@@ -134,7 +134,7 @@ class EncounterClient extends base_1.BaseClient {
|
|
|
134
134
|
* @returns A list of Encounter Methods
|
|
135
135
|
*/
|
|
136
136
|
listEncounterConditions(offset, limit) {
|
|
137
|
-
return
|
|
137
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
138
138
|
return new Promise((resolve, reject) => {
|
|
139
139
|
this.api
|
|
140
140
|
.get(`${constants_1.Endpoints.EncounterCondition}?offset=${offset || 0}&limit=${limit || 20}`)
|
|
@@ -150,7 +150,7 @@ class EncounterClient extends base_1.BaseClient {
|
|
|
150
150
|
* @returns A list of Encounter Condition Values
|
|
151
151
|
*/
|
|
152
152
|
listEncounterConditionValues(offset, limit) {
|
|
153
|
-
return
|
|
153
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
154
154
|
return new Promise((resolve, reject) => {
|
|
155
155
|
this.api
|
|
156
156
|
.get(`${constants_1.Endpoints.EncouterConditionValue}?offset=${offset || 0}&limit=${limit || 20}`)
|
|
@@ -26,7 +26,7 @@ class EvolutionClient extends base_1.BaseClient {
|
|
|
26
26
|
* @returns An Evolution Chain
|
|
27
27
|
*/
|
|
28
28
|
getEvolutionChainById(id) {
|
|
29
|
-
return
|
|
29
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
30
30
|
return new Promise((resolve, reject) => {
|
|
31
31
|
this.api
|
|
32
32
|
.get(`${constants_1.Endpoints.EvolutionChain}/${id}`)
|
|
@@ -41,7 +41,7 @@ class EvolutionClient extends base_1.BaseClient {
|
|
|
41
41
|
* @returns An Evolution Trigger
|
|
42
42
|
*/
|
|
43
43
|
getEvolutionTriggerById(id) {
|
|
44
|
-
return
|
|
44
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
45
45
|
return new Promise((resolve, reject) => {
|
|
46
46
|
this.api
|
|
47
47
|
.get(`${constants_1.Endpoints.EvolutionTrigger}/${id}`)
|
|
@@ -58,7 +58,7 @@ class EvolutionClient extends base_1.BaseClient {
|
|
|
58
58
|
* @returns An Evolution Trigger
|
|
59
59
|
*/
|
|
60
60
|
getEvolutionTriggerByName(name) {
|
|
61
|
-
return
|
|
61
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
62
62
|
return new Promise((resolve, reject) => {
|
|
63
63
|
this.api
|
|
64
64
|
.get(`${constants_1.Endpoints.EvolutionTrigger}/${name}`)
|
|
@@ -74,7 +74,7 @@ class EvolutionClient extends base_1.BaseClient {
|
|
|
74
74
|
* @returns A list of Evolution Chains
|
|
75
75
|
*/
|
|
76
76
|
listEvolutionChains(offset, limit) {
|
|
77
|
-
return
|
|
77
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
78
78
|
return new Promise((resolve, reject) => {
|
|
79
79
|
this.api
|
|
80
80
|
.get(`${constants_1.Endpoints.EvolutionChain}?offset=${offset || 0}&limit=${limit || 20}`)
|
|
@@ -90,7 +90,7 @@ class EvolutionClient extends base_1.BaseClient {
|
|
|
90
90
|
* @returns A list of Evolution Triggers
|
|
91
91
|
*/
|
|
92
92
|
listEvolutionTriggers(offset, limit) {
|
|
93
|
-
return
|
|
93
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
94
94
|
return new Promise((resolve, reject) => {
|
|
95
95
|
this.api
|
|
96
96
|
.get(`${constants_1.Endpoints.EvolutionTrigger}?offset=${offset || 0}&limit=${limit || 20}`)
|
|
@@ -28,7 +28,7 @@ class GameClient extends base_1.BaseClient {
|
|
|
28
28
|
* @returns A Generation
|
|
29
29
|
*/
|
|
30
30
|
getGenerationByName(name) {
|
|
31
|
-
return
|
|
31
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
32
32
|
return new Promise((resolve, reject) => {
|
|
33
33
|
this.api
|
|
34
34
|
.get(`${constants_1.Endpoints.Generation}/${name}`)
|
|
@@ -43,7 +43,7 @@ class GameClient extends base_1.BaseClient {
|
|
|
43
43
|
* @returns A Generation
|
|
44
44
|
*/
|
|
45
45
|
getGenerationById(id) {
|
|
46
|
-
return
|
|
46
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
47
47
|
return new Promise((resolve, reject) => {
|
|
48
48
|
this.api
|
|
49
49
|
.get(`${constants_1.Endpoints.Generation}/${id}`)
|
|
@@ -58,7 +58,7 @@ class GameClient extends base_1.BaseClient {
|
|
|
58
58
|
* @returns A Pokedex
|
|
59
59
|
*/
|
|
60
60
|
getPokedexByName(name) {
|
|
61
|
-
return
|
|
61
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
62
62
|
return new Promise((resolve, reject) => {
|
|
63
63
|
this.api
|
|
64
64
|
.get(`${constants_1.Endpoints.Pokedex}/${name}`)
|
|
@@ -73,7 +73,7 @@ class GameClient extends base_1.BaseClient {
|
|
|
73
73
|
* @returns A Pokedex
|
|
74
74
|
*/
|
|
75
75
|
getPokedexById(id) {
|
|
76
|
-
return
|
|
76
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
77
77
|
return new Promise((resolve, reject) => {
|
|
78
78
|
this.api
|
|
79
79
|
.get(`${constants_1.Endpoints.Pokedex}/${id}`)
|
|
@@ -88,7 +88,7 @@ class GameClient extends base_1.BaseClient {
|
|
|
88
88
|
* @returns A Version
|
|
89
89
|
*/
|
|
90
90
|
getVersionByName(name) {
|
|
91
|
-
return
|
|
91
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
92
92
|
return new Promise((resolve, reject) => {
|
|
93
93
|
this.api
|
|
94
94
|
.get(`${constants_1.Endpoints.Version}/${name}`)
|
|
@@ -103,7 +103,7 @@ class GameClient extends base_1.BaseClient {
|
|
|
103
103
|
* @returns A Version
|
|
104
104
|
*/
|
|
105
105
|
getVersionById(id) {
|
|
106
|
-
return
|
|
106
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
107
107
|
return new Promise((resolve, reject) => {
|
|
108
108
|
this.api
|
|
109
109
|
.get(`${constants_1.Endpoints.Version}/${id}`)
|
|
@@ -118,7 +118,7 @@ class GameClient extends base_1.BaseClient {
|
|
|
118
118
|
* @returns A Version Group
|
|
119
119
|
*/
|
|
120
120
|
getVersionGroupByName(name) {
|
|
121
|
-
return
|
|
121
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
122
122
|
return new Promise((resolve, reject) => {
|
|
123
123
|
this.api
|
|
124
124
|
.get(`${constants_1.Endpoints.VersionGroup}/${name}`)
|
|
@@ -133,7 +133,7 @@ class GameClient extends base_1.BaseClient {
|
|
|
133
133
|
* @returns A Version Group
|
|
134
134
|
*/
|
|
135
135
|
getVersionGroupById(id) {
|
|
136
|
-
return
|
|
136
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
137
137
|
return new Promise((resolve, reject) => {
|
|
138
138
|
this.api
|
|
139
139
|
.get(`${constants_1.Endpoints.VersionGroup}/${id}`)
|
|
@@ -149,7 +149,7 @@ class GameClient extends base_1.BaseClient {
|
|
|
149
149
|
* @returns A list of Generations
|
|
150
150
|
*/
|
|
151
151
|
listGenerations(offset, limit) {
|
|
152
|
-
return
|
|
152
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
153
153
|
return new Promise((resolve, reject) => {
|
|
154
154
|
this.api
|
|
155
155
|
.get(`${constants_1.Endpoints.Generation}?offset=${offset || 0}&limit=${limit || 20}`)
|
|
@@ -165,7 +165,7 @@ class GameClient extends base_1.BaseClient {
|
|
|
165
165
|
* @returns A list of Pokedexes
|
|
166
166
|
*/
|
|
167
167
|
listPokedexes(offset, limit) {
|
|
168
|
-
return
|
|
168
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
169
169
|
return new Promise((resolve, reject) => {
|
|
170
170
|
this.api
|
|
171
171
|
.get(`${constants_1.Endpoints.Pokedex}?offset=${offset || 0}&limit=${limit || 20}`)
|
|
@@ -181,7 +181,7 @@ class GameClient extends base_1.BaseClient {
|
|
|
181
181
|
* @returns A list of Versions
|
|
182
182
|
*/
|
|
183
183
|
listVersions(offset, limit) {
|
|
184
|
-
return
|
|
184
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
185
185
|
return new Promise((resolve, reject) => {
|
|
186
186
|
this.api
|
|
187
187
|
.get(`${constants_1.Endpoints.Version}?offset=${offset || 0}&limit=${limit || 20}`)
|
|
@@ -197,7 +197,7 @@ class GameClient extends base_1.BaseClient {
|
|
|
197
197
|
* @returns A list of Version Groups
|
|
198
198
|
*/
|
|
199
199
|
listVersionGroups(offset, limit) {
|
|
200
|
-
return
|
|
200
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
201
201
|
return new Promise((resolve, reject) => {
|
|
202
202
|
this.api
|
|
203
203
|
.get(`${constants_1.Endpoints.VersionGroup}?offset=${offset || 0}&limit=${limit || 20}`)
|
package/dist/clients/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
4
|
+
tslib_1.__exportStar(require("./berry.client"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./contest.client"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./encounter.client"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./evolution.client"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./game.client"), exports);
|
|
9
|
+
tslib_1.__exportStar(require("./item.client"), exports);
|
|
10
|
+
tslib_1.__exportStar(require("./location.client"), exports);
|
|
11
|
+
tslib_1.__exportStar(require("./machine.client"), exports);
|
|
12
|
+
tslib_1.__exportStar(require("./move.client"), exports);
|
|
13
|
+
tslib_1.__exportStar(require("./pokemon.client"), exports);
|
|
14
|
+
tslib_1.__exportStar(require("./utility.client"), exports);
|
|
15
|
+
tslib_1.__exportStar(require("./main.client"), exports);
|
|
@@ -29,7 +29,7 @@ class ItemClient extends base_1.BaseClient {
|
|
|
29
29
|
* @returns An Item
|
|
30
30
|
*/
|
|
31
31
|
getItemByName(name) {
|
|
32
|
-
return
|
|
32
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
33
33
|
return new Promise((resolve, reject) => {
|
|
34
34
|
this.api
|
|
35
35
|
.get(`${endpoints_1.Endpoints.Item}/${name}`)
|
|
@@ -44,7 +44,7 @@ class ItemClient extends base_1.BaseClient {
|
|
|
44
44
|
* @returns An Item
|
|
45
45
|
*/
|
|
46
46
|
getItemById(id) {
|
|
47
|
-
return
|
|
47
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
48
48
|
return new Promise((resolve, reject) => {
|
|
49
49
|
this.api
|
|
50
50
|
.get(`${endpoints_1.Endpoints.Item}/${id}`)
|
|
@@ -59,7 +59,7 @@ class ItemClient extends base_1.BaseClient {
|
|
|
59
59
|
* @returns An Item Attribute
|
|
60
60
|
*/
|
|
61
61
|
getItemAttributeByName(name) {
|
|
62
|
-
return
|
|
62
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
63
63
|
return new Promise((resolve, reject) => {
|
|
64
64
|
this.api
|
|
65
65
|
.get(`${endpoints_1.Endpoints.ItemAttribute}/${name}`)
|
|
@@ -74,7 +74,7 @@ class ItemClient extends base_1.BaseClient {
|
|
|
74
74
|
* @returns An Item Attribute
|
|
75
75
|
*/
|
|
76
76
|
getItemAttributeById(id) {
|
|
77
|
-
return
|
|
77
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
78
78
|
return new Promise((resolve, reject) => {
|
|
79
79
|
this.api
|
|
80
80
|
.get(`${endpoints_1.Endpoints.ItemAttribute}/${id}`)
|
|
@@ -89,7 +89,7 @@ class ItemClient extends base_1.BaseClient {
|
|
|
89
89
|
* @returns An Item Category
|
|
90
90
|
*/
|
|
91
91
|
getItemCategoryByName(name) {
|
|
92
|
-
return
|
|
92
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
93
93
|
return new Promise((resolve, reject) => {
|
|
94
94
|
this.api
|
|
95
95
|
.get(`${endpoints_1.Endpoints.ItemCategory}/${name}`)
|
|
@@ -104,7 +104,7 @@ class ItemClient extends base_1.BaseClient {
|
|
|
104
104
|
* @returns An Item Category
|
|
105
105
|
*/
|
|
106
106
|
getItemCategoryById(id) {
|
|
107
|
-
return
|
|
107
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
108
108
|
return new Promise((resolve, reject) => {
|
|
109
109
|
this.api
|
|
110
110
|
.get(`${endpoints_1.Endpoints.ItemCategory}/${id}`)
|
|
@@ -119,7 +119,7 @@ class ItemClient extends base_1.BaseClient {
|
|
|
119
119
|
* @returns An Item Filing Effect
|
|
120
120
|
*/
|
|
121
121
|
getItemFlingEffectByName(name) {
|
|
122
|
-
return
|
|
122
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
123
123
|
return new Promise((resolve, reject) => {
|
|
124
124
|
this.api
|
|
125
125
|
.get(`${endpoints_1.Endpoints.ItemFlingEffect}/${name}`)
|
|
@@ -134,7 +134,7 @@ class ItemClient extends base_1.BaseClient {
|
|
|
134
134
|
* @returns An Item Filing Effect
|
|
135
135
|
*/
|
|
136
136
|
getItemFlingEffectById(id) {
|
|
137
|
-
return
|
|
137
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
138
138
|
return new Promise((resolve, reject) => {
|
|
139
139
|
this.api
|
|
140
140
|
.get(`${endpoints_1.Endpoints.ItemFlingEffect}/${id}`)
|
|
@@ -149,7 +149,7 @@ class ItemClient extends base_1.BaseClient {
|
|
|
149
149
|
* @returns An Item Pocket
|
|
150
150
|
*/
|
|
151
151
|
getItemPocketByName(name) {
|
|
152
|
-
return
|
|
152
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
153
153
|
return new Promise((resolve, reject) => {
|
|
154
154
|
this.api
|
|
155
155
|
.get(`${endpoints_1.Endpoints.ItemPocket}/${name}`)
|
|
@@ -164,7 +164,7 @@ class ItemClient extends base_1.BaseClient {
|
|
|
164
164
|
* @returns An Item Pocket
|
|
165
165
|
*/
|
|
166
166
|
getItemPocketById(id) {
|
|
167
|
-
return
|
|
167
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
168
168
|
return new Promise((resolve, reject) => {
|
|
169
169
|
this.api
|
|
170
170
|
.get(`${endpoints_1.Endpoints.ItemPocket}/${id}`)
|
|
@@ -180,7 +180,7 @@ class ItemClient extends base_1.BaseClient {
|
|
|
180
180
|
* @returns A list of Items
|
|
181
181
|
*/
|
|
182
182
|
listItems(offset, limit) {
|
|
183
|
-
return
|
|
183
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
184
184
|
return new Promise((resolve, reject) => {
|
|
185
185
|
this.api
|
|
186
186
|
.get(`${endpoints_1.Endpoints.Item}?offset=${offset || 0}&limit=${limit || 20}`)
|
|
@@ -196,7 +196,7 @@ class ItemClient extends base_1.BaseClient {
|
|
|
196
196
|
* @returns A list of Item Attributes
|
|
197
197
|
*/
|
|
198
198
|
listItemAttributes(offset, limit) {
|
|
199
|
-
return
|
|
199
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
200
200
|
return new Promise((resolve, reject) => {
|
|
201
201
|
this.api
|
|
202
202
|
.get(`${endpoints_1.Endpoints.ItemAttribute}?offset=${offset || 0}&limit=${limit || 20}`)
|
|
@@ -212,7 +212,7 @@ class ItemClient extends base_1.BaseClient {
|
|
|
212
212
|
* @returns A list of Item Categories
|
|
213
213
|
*/
|
|
214
214
|
listItemCategories(offset, limit) {
|
|
215
|
-
return
|
|
215
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
216
216
|
return new Promise((resolve, reject) => {
|
|
217
217
|
this.api
|
|
218
218
|
.get(`${endpoints_1.Endpoints.ItemCategory}?offset=${offset || 0}&limit=${limit || 20}`)
|
|
@@ -228,7 +228,7 @@ class ItemClient extends base_1.BaseClient {
|
|
|
228
228
|
* @returns A list of Item Filing Effects
|
|
229
229
|
*/
|
|
230
230
|
listItemFilingEffects(offset, limit) {
|
|
231
|
-
return
|
|
231
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
232
232
|
return new Promise((resolve, reject) => {
|
|
233
233
|
this.api
|
|
234
234
|
.get(`${endpoints_1.Endpoints.ItemFlingEffect}?offset=${offset || 0}&limit=${limit || 20}`)
|
|
@@ -244,7 +244,7 @@ class ItemClient extends base_1.BaseClient {
|
|
|
244
244
|
* @returns A list of Item Pockets
|
|
245
245
|
*/
|
|
246
246
|
listItemPockets(offset, limit) {
|
|
247
|
-
return
|
|
247
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
248
248
|
return new Promise((resolve, reject) => {
|
|
249
249
|
this.api
|
|
250
250
|
.get(`${endpoints_1.Endpoints.ItemPocket}?offset=${offset || 0}&limit=${limit || 20}`)
|