We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2d6150f commit dc5e776Copy full SHA for dc5e776
src/services/api.ts
@@ -11,6 +11,7 @@ import type {
11
export class APIService {
12
public readonly baseUrl = "https://api.squarecloud.app";
13
public readonly version: APIVersion<1 | 2> = "v2";
14
+ public readonly sdkVersion: string = require("../../package.json").version;
15
public readonly userId: string;
16
17
constructor(protected readonly apiKey: string) {
@@ -63,6 +64,7 @@ export class APIService {
63
64
Accept: "application/json",
65
...(init.headers || {}),
66
Authorization: this.apiKey,
67
+ "User-Agent": `squarecloud-sdk-js/${this.sdkVersion}`,
68
};
69
70
const url = new URL(path, `${this.baseUrl}/${this.version}/`);
0 commit comments