neekuro 2.2.0 → 2.3.1
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 +39 -14
- package/README.md +117 -117
- package/package.json +64 -64
- package/sources/classes/SFW.js +26 -5
- package/sources/classes/errors/APIError.js +49 -49
- package/sources/classes/errors/Error.js +21 -21
- package/sources/classes/package/NekoGif.js +46 -46
- package/sources/classes/package/welcome.js +446 -446
- package/sources/classes/user/BaseUser.js +20 -20
- package/sources/classes/user/User.js +34 -34
- package/sources/main/index.js +20 -20
- package/sources/rest/APIClient.js +34 -34
- package/sources/typings/index.d.ts +374 -355
- package/sources/utils/imageLoader.js +38 -26
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @typedef {import("../../typings").GifResponse} GifResponse
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Clase NekoGif
|
|
9
|
-
* crea un objeto Gif a partir de la respuesta del servidor
|
|
10
|
-
*/
|
|
11
|
-
class NekoGif {
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Recibe la respuesta de la api
|
|
15
|
-
* @param {GifResponse} response respuesta de la api
|
|
16
|
-
*/
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @typedef {import("../../typings").GifResponse} GifResponse
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Clase NekoGif
|
|
9
|
+
* crea un objeto Gif a partir de la respuesta del servidor
|
|
10
|
+
*/
|
|
11
|
+
class NekoGif {
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Recibe la respuesta de la api
|
|
15
|
+
* @param {GifResponse} response respuesta de la api
|
|
16
|
+
*/
|
|
17
17
|
constructor(response) {
|
|
18
18
|
if (!response || typeof response !== 'object' || !response.data) {
|
|
19
19
|
throw new TypeError('La respuesta no contiene datos de imagen');
|
|
20
20
|
}
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* URL del gif
|
|
24
|
-
* @type {string|null}
|
|
25
|
-
*/
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* URL del gif
|
|
24
|
+
* @type {string|null}
|
|
25
|
+
*/
|
|
26
26
|
this.url = typeof response.data.url === 'string' ? response.data.url : null
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Anime del gif
|
|
30
|
-
* @type {string|null}
|
|
31
|
-
*/
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Anime del gif
|
|
30
|
+
* @type {string|null}
|
|
31
|
+
*/
|
|
32
32
|
this.anime = typeof response.data.anime === 'string' ? response.data.anime : null
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Obten la url del Gif
|
|
37
|
-
* @returns {string|null} URL
|
|
38
|
-
*/
|
|
39
|
-
getUrl() {
|
|
40
|
-
return this.url;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Obten el anime del Gif
|
|
45
|
-
* @returns {string|null} Anime
|
|
46
|
-
*/
|
|
47
|
-
getAnime() {
|
|
48
|
-
return this.anime;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Obten la url del Gif
|
|
37
|
+
* @returns {string|null} URL
|
|
38
|
+
*/
|
|
39
|
+
getUrl() {
|
|
40
|
+
return this.url;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Obten el anime del Gif
|
|
45
|
+
* @returns {string|null} Anime
|
|
46
|
+
*/
|
|
47
|
+
getAnime() {
|
|
48
|
+
return this.anime;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
}
|
|
52
|
+
|
|
53
53
|
module.exports = NekoGif
|