@redseat/api 0.1.5 → 0.1.7

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/dist/client.js CHANGED
@@ -10,7 +10,7 @@ export class RedseatClient {
10
10
  this.baseUrl = this.getRegularServerUrl();
11
11
  this.axios = axios.create({
12
12
  baseURL: this.baseUrl,
13
- timeout: options.timeout ?? 3000
13
+ timeout: options.timeout ?? 0
14
14
  });
15
15
  // Detect local URL asynchronously and update axios instance
16
16
  this.detectLocalUrl().then((url) => {
@@ -218,7 +218,7 @@ export interface ISerie {
218
218
  export interface IEpisode {
219
219
  id?: string;
220
220
  serie: string;
221
- name: string;
221
+ name?: string;
222
222
  season?: number;
223
223
  number?: number;
224
224
  abs?: number;
package/dist/server.d.ts CHANGED
@@ -4,7 +4,12 @@ export declare class ServerApi {
4
4
  private client;
5
5
  constructor(client: RedseatClient);
6
6
  getLibraries(): Promise<ILibrary[]>;
7
- getMe(): Promise<any>;
7
+ ping(options?: {
8
+ timeout?: number;
9
+ }): Promise<any>;
10
+ getMe(options?: {
11
+ timeout?: number;
12
+ }): Promise<any>;
8
13
  addLibrary(library: Partial<ILibrary>): Promise<ILibrary>;
9
14
  getSetting(key: string): Promise<string>;
10
15
  getPlugins(): Promise<any[]>;
package/dist/server.js CHANGED
@@ -6,8 +6,12 @@ export class ServerApi {
6
6
  const res = await this.client.get('/libraries');
7
7
  return res.data;
8
8
  }
9
- async getMe() {
10
- const res = await this.client.get('/users/me');
9
+ async ping(options) {
10
+ const res = await this.client.get('/ping', options);
11
+ return res.data;
12
+ }
13
+ async getMe(options) {
14
+ const res = await this.client.get('/users/me', options);
11
15
  return res.data;
12
16
  }
13
17
  async addLibrary(library) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redseat/api",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "description": "TypeScript API client library for interacting with Redseat servers",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",