speedruncom.js 2.0.4 → 2.0.6

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/lib/Client.d.ts CHANGED
@@ -1,11 +1,11 @@
1
- import { AxiosRequestConfig } from 'axios';
1
+ import { AxiosRequestConfig, AxiosResponse } from 'axios';
2
2
  import GETEndpoints from './endpoints/endpoints.get.js';
3
3
  import POSTEndpoints from './endpoints/endpoints.post.js';
4
4
  import Responses from './responses.js';
5
5
  type Endpoints = GETEndpoints & POSTEndpoints;
6
6
  export default class Client {
7
7
  axiosClient: import("axios").AxiosInstance;
8
- get<E extends keyof GETEndpoints, P extends GETEndpoints[E]>(endpoint: E, params: P, axiosConfig?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<Responses[E], any>>;
9
- post<E extends keyof Endpoints, P extends Endpoints[E]>(endpoint: E, params: P, axiosConfig?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<E extends keyof Responses ? Responses[E] : void, any>>;
8
+ get<E extends keyof GETEndpoints, P extends GETEndpoints[E]>(endpoint: E, params: P, axiosConfig?: AxiosRequestConfig): Promise<AxiosResponse<Responses[E], any>>;
9
+ post<E extends keyof Endpoints, P extends Endpoints[E]>(endpoint: E, params: P, axiosConfig?: AxiosRequestConfig): Promise<AxiosResponse<E extends keyof Responses ? Responses[E] : void, any>>;
10
10
  }
11
11
  export {};
@@ -519,6 +519,17 @@ export default interface GETEndpoints {
519
519
  * ID of the forum.
520
520
  */
521
521
  forumId: string;
522
+ /**
523
+ * The thread page, in relation to `limit`.
524
+ */
525
+ page?: number;
526
+ /**
527
+ * The maximum amount of `Thread`s to fetch.
528
+ *
529
+ * @default 30
530
+ * @max 100
531
+ */
532
+ limit?: number;
522
533
  };
523
534
  /**
524
535
  * Gets a comment post's Thread and Forum by `commentId`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "speedruncom.js",
3
- "version": "2.0.4",
3
+ "version": "2.0.6",
4
4
  "description": "WIP NodeJS module for Speedrun's version 2 API.",
5
5
  "type": "module",
6
6
  "author": {
package/src/Client.ts CHANGED
@@ -1,4 +1,4 @@
1
- import axios, { AxiosRequestConfig } from 'axios';
1
+ import axios, { AxiosRequestConfig, AxiosResponse } from 'axios';
2
2
  import GETEndpoints from './endpoints/endpoints.get.js';
3
3
  import POSTEndpoints from './endpoints/endpoints.post.js'
4
4
  import Responses from './responses.js';
@@ -631,6 +631,19 @@ export default interface GETEndpoints {
631
631
  * ID of the forum.
632
632
  */
633
633
  forumId: string;
634
+
635
+ /**
636
+ * The thread page, in relation to `limit`.
637
+ */
638
+ page?: number;
639
+
640
+ /**
641
+ * The maximum amount of `Thread`s to fetch.
642
+ *
643
+ * @default 30
644
+ * @max 100
645
+ */
646
+ limit?: number;
634
647
  };
635
648
 
636
649
  /**
package/src/responses.ts CHANGED
@@ -2,6 +2,7 @@ import * as Interfaces from './interfaces.js';
2
2
 
3
3
  export default interface Responses {
4
4
  GetGameLeaderboard2: {
5
+
5
6
  /**
6
7
  * Runs in the leaderboard.
7
8
  */