vrchat 1.20.2 → 2.20.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/dist/base.d.ts DELETED
@@ -1,54 +0,0 @@
1
- /**
2
- * VRChat API Documentation
3
- *
4
- * The version of the OpenAPI document: 1.20.2
5
- * Contact: vrchatapi.lpv0t@aries.fyi
6
- *
7
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
8
- * https://openapi-generator.tech
9
- * Do not edit the class manually.
10
- */
11
- import { Configuration } from "./configuration";
12
- import { AxiosInstance, AxiosRequestConfig } from 'axios';
13
- export declare const BASE_PATH: string;
14
- /**
15
- *
16
- * @export
17
- */
18
- export declare const COLLECTION_FORMATS: {
19
- csv: string;
20
- ssv: string;
21
- tsv: string;
22
- pipes: string;
23
- };
24
- /**
25
- *
26
- * @export
27
- * @interface RequestArgs
28
- */
29
- export interface RequestArgs {
30
- url: string;
31
- options: AxiosRequestConfig;
32
- }
33
- /**
34
- *
35
- * @export
36
- * @class BaseAPI
37
- */
38
- export declare class BaseAPI {
39
- protected basePath: string;
40
- protected axios: AxiosInstance;
41
- protected configuration: Configuration | undefined;
42
- constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
43
- }
44
- /**
45
- *
46
- * @export
47
- * @class RequiredError
48
- * @extends {Error}
49
- */
50
- export declare class RequiredError extends Error {
51
- field: string;
52
- name: "RequiredError";
53
- constructor(field: string, msg?: string);
54
- }
package/dist/base.js DELETED
@@ -1,81 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * VRChat API Documentation
6
- *
7
- * The version of the OpenAPI document: 1.20.2
8
- * Contact: vrchatapi.lpv0t@aries.fyi
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
- var __extends = (this && this.__extends) || (function () {
15
- var extendStatics = function (d, b) {
16
- extendStatics = Object.setPrototypeOf ||
17
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
18
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
19
- return extendStatics(d, b);
20
- };
21
- return function (d, b) {
22
- if (typeof b !== "function" && b !== null)
23
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
24
- extendStatics(d, b);
25
- function __() { this.constructor = d; }
26
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
27
- };
28
- })();
29
- Object.defineProperty(exports, "__esModule", { value: true });
30
- exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
31
- // Some imports not used depending on template conditions
32
- // @ts-ignore
33
- var axios_1 = require("axios");
34
- exports.BASE_PATH = "https://api.vrchat.cloud/api/1".replace(/\/+$/, "");
35
- /**
36
- *
37
- * @export
38
- */
39
- exports.COLLECTION_FORMATS = {
40
- csv: ",",
41
- ssv: " ",
42
- tsv: "\t",
43
- pipes: "|",
44
- };
45
- /**
46
- *
47
- * @export
48
- * @class BaseAPI
49
- */
50
- var BaseAPI = /** @class */ (function () {
51
- function BaseAPI(configuration, basePath, axios) {
52
- if (basePath === void 0) { basePath = exports.BASE_PATH; }
53
- if (axios === void 0) { axios = axios_1.default; }
54
- this.basePath = basePath;
55
- this.axios = axios;
56
- if (configuration) {
57
- this.configuration = configuration;
58
- this.basePath = configuration.basePath || this.basePath;
59
- }
60
- }
61
- return BaseAPI;
62
- }());
63
- exports.BaseAPI = BaseAPI;
64
- ;
65
- /**
66
- *
67
- * @export
68
- * @class RequiredError
69
- * @extends {Error}
70
- */
71
- var RequiredError = /** @class */ (function (_super) {
72
- __extends(RequiredError, _super);
73
- function RequiredError(field, msg) {
74
- var _this = _super.call(this, msg) || this;
75
- _this.field = field;
76
- _this.name = "RequiredError";
77
- return _this;
78
- }
79
- return RequiredError;
80
- }(Error));
81
- exports.RequiredError = RequiredError;
package/dist/common.d.ts DELETED
@@ -1,64 +0,0 @@
1
- /**
2
- * VRChat API Documentation
3
- *
4
- * The version of the OpenAPI document: 1.20.2
5
- * Contact: vrchatapi.lpv0t@aries.fyi
6
- *
7
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
8
- * https://openapi-generator.tech
9
- * Do not edit the class manually.
10
- */
11
- import { Configuration } from "./configuration";
12
- import { RequestArgs } from "./base";
13
- import { AxiosInstance, AxiosResponse } from 'axios';
14
- /**
15
- *
16
- * @export
17
- */
18
- export declare const DUMMY_BASE_URL = "https://example.com";
19
- /**
20
- *
21
- * @throws {RequiredError}
22
- * @export
23
- */
24
- export declare const assertParamExists: (functionName: string, paramName: string, paramValue: unknown) => void;
25
- /**
26
- *
27
- * @export
28
- */
29
- export declare const setApiKeyToObject: (object: any, keyParamName: string, configuration?: Configuration) => Promise<void>;
30
- /**
31
- *
32
- * @export
33
- */
34
- export declare const setBasicAuthToObject: (object: any, configuration?: Configuration) => void;
35
- /**
36
- *
37
- * @export
38
- */
39
- export declare const setBearerAuthToObject: (object: any, configuration?: Configuration) => Promise<void>;
40
- /**
41
- *
42
- * @export
43
- */
44
- export declare const setOAuthToObject: (object: any, name: string, scopes: string[], configuration?: Configuration) => Promise<void>;
45
- /**
46
- *
47
- * @export
48
- */
49
- export declare const setSearchParams: (url: URL, ...objects: any[]) => void;
50
- /**
51
- *
52
- * @export
53
- */
54
- export declare const serializeDataIfNeeded: (value: any, requestOptions: any, configuration?: Configuration) => any;
55
- /**
56
- *
57
- * @export
58
- */
59
- export declare const toPathString: (url: URL) => string;
60
- /**
61
- *
62
- * @export
63
- */
64
- export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) => <T = unknown, R = AxiosResponse<T, any>>(axios?: AxiosInstance, basePath?: string) => Promise<R>;
package/dist/common.js DELETED
@@ -1,249 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * VRChat API Documentation
6
- *
7
- * The version of the OpenAPI document: 1.20.2
8
- * Contact: vrchatapi.lpv0t@aries.fyi
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
- var __assign = (this && this.__assign) || function () {
15
- __assign = Object.assign || function(t) {
16
- for (var s, i = 1, n = arguments.length; i < n; i++) {
17
- s = arguments[i];
18
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
19
- t[p] = s[p];
20
- }
21
- return t;
22
- };
23
- return __assign.apply(this, arguments);
24
- };
25
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
26
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
27
- return new (P || (P = Promise))(function (resolve, reject) {
28
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
29
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
30
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
31
- step((generator = generator.apply(thisArg, _arguments || [])).next());
32
- });
33
- };
34
- var __generator = (this && this.__generator) || function (thisArg, body) {
35
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
36
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
37
- function verb(n) { return function (v) { return step([n, v]); }; }
38
- function step(op) {
39
- if (f) throw new TypeError("Generator is already executing.");
40
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
41
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
42
- if (y = 0, t) op = [op[0] & 2, t.value];
43
- switch (op[0]) {
44
- case 0: case 1: t = op; break;
45
- case 4: _.label++; return { value: op[1], done: false };
46
- case 5: _.label++; y = op[1]; op = [0]; continue;
47
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
48
- default:
49
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
50
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
51
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
52
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
53
- if (t[2]) _.ops.pop();
54
- _.trys.pop(); continue;
55
- }
56
- op = body.call(thisArg, _);
57
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
58
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
59
- }
60
- };
61
- Object.defineProperty(exports, "__esModule", { value: true });
62
- exports.createRequestFunction = exports.toPathString = exports.serializeDataIfNeeded = exports.setSearchParams = exports.setOAuthToObject = exports.setBearerAuthToObject = exports.setBasicAuthToObject = exports.setApiKeyToObject = exports.assertParamExists = exports.DUMMY_BASE_URL = void 0;
63
- var base_1 = require("./base");
64
- /**
65
- *
66
- * @export
67
- */
68
- exports.DUMMY_BASE_URL = 'https://example.com';
69
- /**
70
- *
71
- * @throws {RequiredError}
72
- * @export
73
- */
74
- var assertParamExists = function (functionName, paramName, paramValue) {
75
- if (paramValue === null || paramValue === undefined) {
76
- throw new base_1.RequiredError(paramName, "Required parameter ".concat(paramName, " was null or undefined when calling ").concat(functionName, "."));
77
- }
78
- };
79
- exports.assertParamExists = assertParamExists;
80
- /**
81
- *
82
- * @export
83
- */
84
- var setApiKeyToObject = function (object, keyParamName, configuration) {
85
- return __awaiter(this, void 0, void 0, function () {
86
- var localVarApiKeyValue, _a;
87
- return __generator(this, function (_b) {
88
- switch (_b.label) {
89
- case 0:
90
- if (!(configuration && configuration.apiKey)) return [3 /*break*/, 5];
91
- if (!(typeof configuration.apiKey === 'function')) return [3 /*break*/, 2];
92
- return [4 /*yield*/, configuration.apiKey(keyParamName)];
93
- case 1:
94
- _a = _b.sent();
95
- return [3 /*break*/, 4];
96
- case 2: return [4 /*yield*/, configuration.apiKey];
97
- case 3:
98
- _a = _b.sent();
99
- _b.label = 4;
100
- case 4:
101
- localVarApiKeyValue = _a;
102
- object[keyParamName] = localVarApiKeyValue;
103
- _b.label = 5;
104
- case 5: return [2 /*return*/];
105
- }
106
- });
107
- });
108
- };
109
- exports.setApiKeyToObject = setApiKeyToObject;
110
- /**
111
- *
112
- * @export
113
- */
114
- var setBasicAuthToObject = function (object, configuration) {
115
- if (configuration && (configuration.username || configuration.password)) {
116
- object["auth"] = { username: configuration.username, password: configuration.password };
117
- }
118
- };
119
- exports.setBasicAuthToObject = setBasicAuthToObject;
120
- /**
121
- *
122
- * @export
123
- */
124
- var setBearerAuthToObject = function (object, configuration) {
125
- return __awaiter(this, void 0, void 0, function () {
126
- var accessToken, _a;
127
- return __generator(this, function (_b) {
128
- switch (_b.label) {
129
- case 0:
130
- if (!(configuration && configuration.accessToken)) return [3 /*break*/, 5];
131
- if (!(typeof configuration.accessToken === 'function')) return [3 /*break*/, 2];
132
- return [4 /*yield*/, configuration.accessToken()];
133
- case 1:
134
- _a = _b.sent();
135
- return [3 /*break*/, 4];
136
- case 2: return [4 /*yield*/, configuration.accessToken];
137
- case 3:
138
- _a = _b.sent();
139
- _b.label = 4;
140
- case 4:
141
- accessToken = _a;
142
- object["Authorization"] = "Bearer " + accessToken;
143
- _b.label = 5;
144
- case 5: return [2 /*return*/];
145
- }
146
- });
147
- });
148
- };
149
- exports.setBearerAuthToObject = setBearerAuthToObject;
150
- /**
151
- *
152
- * @export
153
- */
154
- var setOAuthToObject = function (object, name, scopes, configuration) {
155
- return __awaiter(this, void 0, void 0, function () {
156
- var localVarAccessTokenValue, _a;
157
- return __generator(this, function (_b) {
158
- switch (_b.label) {
159
- case 0:
160
- if (!(configuration && configuration.accessToken)) return [3 /*break*/, 5];
161
- if (!(typeof configuration.accessToken === 'function')) return [3 /*break*/, 2];
162
- return [4 /*yield*/, configuration.accessToken(name, scopes)];
163
- case 1:
164
- _a = _b.sent();
165
- return [3 /*break*/, 4];
166
- case 2: return [4 /*yield*/, configuration.accessToken];
167
- case 3:
168
- _a = _b.sent();
169
- _b.label = 4;
170
- case 4:
171
- localVarAccessTokenValue = _a;
172
- object["Authorization"] = "Bearer " + localVarAccessTokenValue;
173
- _b.label = 5;
174
- case 5: return [2 /*return*/];
175
- }
176
- });
177
- });
178
- };
179
- exports.setOAuthToObject = setOAuthToObject;
180
- function setFlattenedQueryParams(urlSearchParams, parameter, key) {
181
- if (key === void 0) { key = ""; }
182
- if (typeof parameter === "object") {
183
- if (Array.isArray(parameter)) {
184
- parameter.forEach(function (item) { return setFlattenedQueryParams(urlSearchParams, item, key); });
185
- }
186
- else {
187
- Object.keys(parameter).forEach(function (currentKey) {
188
- return setFlattenedQueryParams(urlSearchParams, parameter[currentKey], "".concat(key).concat(key !== '' ? '.' : '').concat(currentKey));
189
- });
190
- }
191
- }
192
- else {
193
- if (urlSearchParams.has(key)) {
194
- urlSearchParams.append(key, parameter);
195
- }
196
- else {
197
- urlSearchParams.set(key, parameter);
198
- }
199
- }
200
- }
201
- /**
202
- *
203
- * @export
204
- */
205
- var setSearchParams = function (url) {
206
- var objects = [];
207
- for (var _i = 1; _i < arguments.length; _i++) {
208
- objects[_i - 1] = arguments[_i];
209
- }
210
- var searchParams = new URLSearchParams(url.search);
211
- setFlattenedQueryParams(searchParams, objects);
212
- url.search = searchParams.toString();
213
- };
214
- exports.setSearchParams = setSearchParams;
215
- /**
216
- *
217
- * @export
218
- */
219
- var serializeDataIfNeeded = function (value, requestOptions, configuration) {
220
- var nonString = typeof value !== 'string';
221
- var needsSerialization = nonString && configuration && configuration.isJsonMime
222
- ? configuration.isJsonMime(requestOptions.headers['Content-Type'])
223
- : nonString;
224
- return needsSerialization
225
- ? JSON.stringify(value !== undefined ? value : {})
226
- : (value || "");
227
- };
228
- exports.serializeDataIfNeeded = serializeDataIfNeeded;
229
- /**
230
- *
231
- * @export
232
- */
233
- var toPathString = function (url) {
234
- return url.pathname + url.search + url.hash;
235
- };
236
- exports.toPathString = toPathString;
237
- /**
238
- *
239
- * @export
240
- */
241
- var createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
242
- return function (axios, basePath) {
243
- if (axios === void 0) { axios = globalAxios; }
244
- if (basePath === void 0) { basePath = BASE_PATH; }
245
- var axiosRequestArgs = __assign(__assign({}, axiosArgs.options), { url: ((configuration === null || configuration === void 0 ? void 0 : configuration.basePath) || basePath) + axiosArgs.url });
246
- return axios.request(axiosRequestArgs);
247
- };
248
- };
249
- exports.createRequestFunction = createRequestFunction;
@@ -1,82 +0,0 @@
1
- /**
2
- * VRChat API Documentation
3
- *
4
- * The version of the OpenAPI document: 1.20.2
5
- * Contact: vrchatapi.lpv0t@aries.fyi
6
- *
7
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
8
- * https://openapi-generator.tech
9
- * Do not edit the class manually.
10
- */
11
- export interface ConfigurationParameters {
12
- apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
13
- username?: string;
14
- password?: string;
15
- accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
16
- basePath?: string;
17
- baseOptions?: any;
18
- formDataCtor?: new () => any;
19
- }
20
- export declare class Configuration {
21
- /**
22
- * parameter for apiKey security
23
- * @param name security name
24
- * @memberof Configuration
25
- */
26
- apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
27
- /**
28
- * parameter for basic security
29
- *
30
- * @type {string}
31
- * @memberof Configuration
32
- */
33
- username?: string;
34
- /**
35
- * parameter for basic security
36
- *
37
- * @type {string}
38
- * @memberof Configuration
39
- */
40
- password?: string;
41
- /**
42
- * parameter for oauth2 security
43
- * @param name security name
44
- * @param scopes oauth2 scope
45
- * @memberof Configuration
46
- */
47
- accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
48
- /**
49
- * override base path
50
- *
51
- * @type {string}
52
- * @memberof Configuration
53
- */
54
- basePath?: string;
55
- /**
56
- * base options for axios calls
57
- *
58
- * @type {any}
59
- * @memberof Configuration
60
- */
61
- baseOptions?: any;
62
- /**
63
- * The FormData constructor that will be used to create multipart form data
64
- * requests. You can inject this here so that execution environments that
65
- * do not support the FormData class can still run the generated client.
66
- *
67
- * @type {new () => FormData}
68
- */
69
- formDataCtor?: new () => any;
70
- constructor(param?: ConfigurationParameters);
71
- /**
72
- * Check if the given MIME is a JSON MIME.
73
- * JSON MIME examples:
74
- * application/json
75
- * application/json; charset=UTF8
76
- * APPLICATION/JSON
77
- * application/vnd.company+json
78
- * @param mime - MIME (Multipurpose Internet Mail Extensions)
79
- * @return True if the given MIME is JSON, false otherwise.
80
- */
81
- isJsonMime(mime: string): boolean;
82
- }
@@ -1,43 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * VRChat API Documentation
6
- *
7
- * The version of the OpenAPI document: 1.20.2
8
- * Contact: vrchatapi.lpv0t@aries.fyi
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.Configuration = void 0;
16
- var Configuration = /** @class */ (function () {
17
- function Configuration(param) {
18
- if (param === void 0) { param = {}; }
19
- this.apiKey = param.apiKey;
20
- this.username = param.username;
21
- this.password = param.password;
22
- this.accessToken = param.accessToken;
23
- this.basePath = param.basePath;
24
- this.baseOptions = param.baseOptions;
25
- this.formDataCtor = param.formDataCtor;
26
- }
27
- /**
28
- * Check if the given MIME is a JSON MIME.
29
- * JSON MIME examples:
30
- * application/json
31
- * application/json; charset=UTF8
32
- * APPLICATION/JSON
33
- * application/vnd.company+json
34
- * @param mime - MIME (Multipurpose Internet Mail Extensions)
35
- * @return True if the given MIME is JSON, false otherwise.
36
- */
37
- Configuration.prototype.isJsonMime = function (mime) {
38
- var jsonMime = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
39
- return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
40
- };
41
- return Configuration;
42
- }());
43
- exports.Configuration = Configuration;
package/example.js DELETED
@@ -1,44 +0,0 @@
1
- const vrchat = require("vrchat");
2
- const readline = require("readline")
3
-
4
- const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
5
- const prompt = (query) => new Promise((resolve) => rl.question(query, resolve));
6
-
7
-
8
- const configuration = new vrchat.Configuration({
9
- username: "username",
10
- password: "password",
11
- baseOptions: {
12
- headers: { "User-Agent": "ExampleProgram/0.0.1 my@email.com"}
13
- }
14
- });
15
-
16
- const authenticationApi = new vrchat.AuthenticationApi(configuration);
17
- const usersApi = new vrchat.UsersApi(configuration);
18
- const systemApi = new vrchat.SystemApi(configuration);
19
-
20
- async function main() {
21
- var currentUser = (await authenticationApi.getCurrentUser()).data;
22
-
23
- if (currentUser["requiresTwoFactorAuth"] && currentUser["requiresTwoFactorAuth"][0] === "emailOtp") {
24
- await authenticationApi.verify2FAEmailCode({ code: await prompt("email Code\n") })
25
- currentUser = (await authenticationApi.getCurrentUser()).data;
26
- }
27
- if (currentUser["requiresTwoFactorAuth"] && currentUser["requiresTwoFactorAuth"][0] === "totp") {
28
- await authenticationApi.verify2FA({ code: await prompt("2fa Code\n") })
29
- currentUser = (await authenticationApi.getCurrentUser()).data;
30
- }
31
-
32
- console.log(`Logged in as: ${currentUser.displayName}`);
33
-
34
- const currentOnlineUsers = (await systemApi.getCurrentOnlineUsers()).data;
35
- console.log(`Current Online Users: ${resp.data}`);
36
-
37
- const tupperUser = (await usersApi.getUser("usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469")).data;
38
- console.log(resp.data.displayName);
39
- }
40
-
41
- main();
42
-
43
-
44
-
package/generate.sh DELETED
@@ -1,33 +0,0 @@
1
- #!/bin/bash
2
-
3
- npm install @openapitools/openapi-generator-cli
4
-
5
- rm *.ts -rf
6
-
7
- ./node_modules/\@openapitools/openapi-generator-cli/main.js generate \
8
- -g typescript-axios \
9
- --additional-properties=npmName=vrchat \
10
- --git-user-id=vrchatapi \
11
- --git-repo-id=vrchatapi-javascript \
12
- -o . \
13
- -i https://raw.githubusercontent.com/vrchatapi/specification/gh-pages/openapi.yaml \
14
- --http-user-agent="vrchatapi-javascript"
15
-
16
- # Modify package.json
17
- sed -i 's/OpenAPI client for vrchat/🟡🔵 VRChat API Library for JavaScript and TypeScript/g' ./package.json
18
- sed -i 's/Unlicense/MIT/g' ./package.json
19
-
20
- # Enable global cookies
21
- sed -i '/^import { BASE_PATH/a import axiosCookieJarSupport from "axios-cookiejar-support";axiosCookieJarSupport(globalAxios);import { CookieJar } from "tough-cookie";globalAxios.defaults.jar = new CookieJar();globalAxios.defaults.withCredentials = true;' ./api.ts
22
-
23
- sed -i '/"dependencies"/a "@types/tough-cookie": "^4.0.1",' ./package.json
24
- sed -i '/"dependencies"/a "axios-cookiejar-support": "^1.0.1",' ./package.json
25
- sed -i '/"dependencies"/a "tough-cookie": "^4.0.0",' ./package.json
26
-
27
- # Remove messily pasted markdown at top of every file
28
- for i in *.ts; do
29
- sed -i '/VRChat API Banner/d' $i
30
- done
31
-
32
- npm install
33
- npm run build
package/index.ts DELETED
@@ -1,17 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * VRChat API Documentation
5
- *
6
- * The version of the OpenAPI document: 1.20.2
7
- * Contact: vrchatapi.lpv0t@aries.fyi
8
- *
9
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
10
- * https://openapi-generator.tech
11
- * Do not edit the class manually.
12
- */
13
-
14
-
15
- export * from "./api";
16
- export * from "./configuration";
17
-
package/openapitools.json DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json",
3
- "spaces": 2,
4
- "generator-cli": {
5
- "version": "6.2.1"
6
- }
7
- }