nekosia.js 0.1.2 β†’ 0.1.3

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/README.md CHANGED
@@ -34,7 +34,7 @@ But that's not all! The API also supports sessions (based on user ID or IP addre
34
34
  ...and that’s not all!
35
35
 
36
36
 
37
- ## πŸ“˜ Own Booru
37
+ ## πŸ“˜ Best Anime Booru
38
38
  Nekosia also offers its own [Booru](https://nekosia.cat/booru), allowing you to browse images returned by the API.
39
39
  Users can edit image information, such as tags, which are crucial for us.
40
40
 
package/index.js CHANGED
@@ -18,7 +18,7 @@ class NekosiaAPI {
18
18
 
19
19
  async makeHttpRequest(endpoint) {
20
20
  try {
21
- return await https.get(endpoint);
21
+ return https.get(endpoint);
22
22
  } catch (err) {
23
23
  console.error(`HTTP request failed for endpoint ${endpoint}: ${err.message}`);
24
24
  throw err;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nekosia.js",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "A simple wrapper for the Nekosia API that provides easy access to random anime images. Enhance your projects with the magic of anime and a touch of feline charm meow~~! Discover why switching to Nekosia is the purrfect choice!",
5
5
  "keywords": [
6
6
  "anime",
@@ -51,7 +51,7 @@
51
51
  "up": "ncu -u && npm install && npm update && npm audit fix"
52
52
  },
53
53
  "devDependencies": {
54
- "@eslint/js": "^9.9.1",
54
+ "@eslint/js": "^9.10.0",
55
55
  "globals": "^15.9.0",
56
56
  "jest": "^29.7.0"
57
57
  }
package/types/index.d.ts CHANGED
@@ -12,24 +12,21 @@ declare module 'nekosia.js' {
12
12
  * Session type:
13
13
  * - `id` - Session identified by the `id` value (requires the `id` field to be set).
14
14
  * - `ip` - Session identified by the user's IP address.
15
- * @default null
15
+ * @default undefined
16
16
  */
17
- session?: null | 'id' | 'ip';
17
+ session?: 'id' | 'ip';
18
18
 
19
19
  /**
20
20
  * Identifier of the fetched image.
21
21
  * @example 66ae26a07886f165901e8a3f
22
- * @default null
23
22
  */
24
- id?: null | string;
23
+ id?: string;
25
24
 
26
25
  /**
27
26
  * The number of images to fetch. WARNING! The higher the number, the more data the server will need to process, which will result in a longer response time.
28
27
  *
29
- * Minimum: 1
30
- *
31
- * Maximum: 48
32
- *
28
+ * - Minimum - 1
29
+ * - Maximum - 48
33
30
  * @default 1
34
31
  */
35
32
  count?: number;
@@ -49,6 +46,21 @@ declare module 'nekosia.js' {
49
46
  * @default []
50
47
  */
51
48
  blacklistedTags?: AllTagsList | AllTagsList[];
49
+
50
+ /**
51
+ * Defines the content rating of an image.
52
+ * The rating indicates the appropriateness of the content, specifying whether the image is suitable for all audiences or contains content that may be sensitive or inappropriate for certain viewers.
53
+ *
54
+ * Possible values:
55
+ * - `safe`: Suitable for all audiences, contains no explicit or questionable content.
56
+ * - `questionable`: Contains content that may be sensitive or inappropriate for younger audiences, but not explicit.
57
+ * - `nsfw`: Contains explicit content, not safe for work (NSFW).
58
+ *
59
+ * The default value is ALWAYS `safe`.
60
+ * @example safe
61
+ * @default safe
62
+ */
63
+ rating?: 'safe' | 'questionable' | 'nsfw';
52
64
  }
53
65
 
54
66
  /**