vrchat 1.3.0 → 1.3.1

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.
@@ -1,82 +1,82 @@
1
- /**
2
- * VRChat API Documentation
3
- *
4
- * The version of the OpenAPI document: 1.3.0
5
- * Contact: me@ruby.js.org
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
+ /**
2
+ * VRChat API Documentation
3
+ *
4
+ * The version of the OpenAPI document: 1.3.1
5
+ * Contact: me@ruby.js.org
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 +1,43 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * VRChat API Documentation
6
- *
7
- * The version of the OpenAPI document: 1.3.0
8
- * Contact: me@ruby.js.org
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;
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * VRChat API Documentation
6
+ *
7
+ * The version of the OpenAPI document: 1.3.1
8
+ * Contact: me@ruby.js.org
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/dist/index.d.ts CHANGED
@@ -1,12 +1,12 @@
1
- /**
2
- * VRChat API Documentation
3
- *
4
- * The version of the OpenAPI document: 1.3.0
5
- * Contact: me@ruby.js.org
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 * from "./api";
12
- export * from "./configuration";
1
+ /**
2
+ * VRChat API Documentation
3
+ *
4
+ * The version of the OpenAPI document: 1.3.1
5
+ * Contact: me@ruby.js.org
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 * from "./api";
12
+ export * from "./configuration";
package/dist/index.js CHANGED
@@ -1,26 +1,26 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * VRChat API Documentation
6
- *
7
- * The version of the OpenAPI document: 1.3.0
8
- * Contact: me@ruby.js.org
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 __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
15
- if (k2 === undefined) k2 = k;
16
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
17
- }) : (function(o, m, k, k2) {
18
- if (k2 === undefined) k2 = k;
19
- o[k2] = m[k];
20
- }));
21
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
22
- for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
23
- };
24
- Object.defineProperty(exports, "__esModule", { value: true });
25
- __exportStar(require("./api"), exports);
26
- __exportStar(require("./configuration"), exports);
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * VRChat API Documentation
6
+ *
7
+ * The version of the OpenAPI document: 1.3.1
8
+ * Contact: me@ruby.js.org
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 __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
15
+ if (k2 === undefined) k2 = k;
16
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
17
+ }) : (function(o, m, k, k2) {
18
+ if (k2 === undefined) k2 = k;
19
+ o[k2] = m[k];
20
+ }));
21
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
22
+ for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ __exportStar(require("./api"), exports);
26
+ __exportStar(require("./configuration"), exports);
package/example.js CHANGED
@@ -1,22 +1,22 @@
1
- const vrchat = require("vrchat");
2
- const configuration = new vrchat.Configuration({
3
- username: "username",
4
- password: "password"
5
- });
6
-
7
- const AuthenticationApi = new vrchat.AuthenticationApi(configuration);
8
- const UsersApi = new vrchat.UsersApi(configuration);
9
- const SystemApi = new vrchat.SystemApi(configuration);
10
-
11
- SystemApi.getCurrentOnlineUsers().then(resp => {
12
- console.log(`Current Online Users: ${resp.data}`);
13
-
14
- // Calling getCurrentUser on Authentication API logs you in if the user isn't already logged in.
15
- AuthenticationApi.getCurrentUser().then(resp => {
16
- console.log(`Logged in as: ${resp.data.displayName}`);
17
-
18
- UsersApi.getUser("usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469").then(resp => {
19
- console.log(resp.data.displayName); // Should print out "tupper"
20
- });
21
- });
1
+ const vrchat = require("vrchat");
2
+ const configuration = new vrchat.Configuration({
3
+ username: "username",
4
+ password: "password"
5
+ });
6
+
7
+ const AuthenticationApi = new vrchat.AuthenticationApi(configuration);
8
+ const UsersApi = new vrchat.UsersApi(configuration);
9
+ const SystemApi = new vrchat.SystemApi(configuration);
10
+
11
+ SystemApi.getCurrentOnlineUsers().then(resp => {
12
+ console.log(`Current Online Users: ${resp.data}`);
13
+
14
+ // Calling getCurrentUser on Authentication API logs you in if the user isn't already logged in.
15
+ AuthenticationApi.getCurrentUser().then(resp => {
16
+ console.log(`Logged in as: ${resp.data.displayName}`);
17
+
18
+ UsersApi.getUser("usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469").then(resp => {
19
+ console.log(resp.data.displayName); // Should print out "tupper"
20
+ });
21
+ });
22
22
  });
package/generate.sh CHANGED
@@ -1,30 +1,30 @@
1
- #!/bin/bash
2
-
3
- rm *.ts -rf
4
- openapi-generator-cli generate \
5
- -g typescript-axios \
6
- --additional-properties=npmName=vrchat \
7
- --git-user-id=vrchatapi \
8
- --git-repo-id=vrchatapi-javascript \
9
- -o . \
10
- -i https://vrchatapi.github.io/specification/openapi.yaml \
11
- --http-user-agent="vrchatapi-javascript"
12
-
13
- # Modify package.json
14
- sed -i 's/OpenAPI client for vrchat/🟡🔵 VRChat API Library for JavaScript and TypeScript/g' ./package.json
15
- sed -i 's/Unlicense/MIT/g' ./package.json
16
-
17
- # Enable global cookies
18
- 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
19
-
20
- sed -i '/"dependencies"/a "@types/tough-cookie": "^4.0.1",' ./package.json
21
- sed -i '/"dependencies"/a "axios-cookiejar-support": "^1.0.1",' ./package.json
22
- sed -i '/"dependencies"/a "tough-cookie": "^4.0.0",' ./package.json
23
-
24
- # Remove messily pasted markdown at top of every file
25
- for i in *.ts; do
26
- sed -i '/VRChat API Banner/d' $i
27
- done
28
-
29
- npm install
1
+ #!/bin/bash
2
+
3
+ rm *.ts -rf
4
+ openapi-generator-cli generate \
5
+ -g typescript-axios \
6
+ --additional-properties=npmName=vrchat \
7
+ --git-user-id=vrchatapi \
8
+ --git-repo-id=vrchatapi-javascript \
9
+ -o . \
10
+ -i https://vrchatapi.github.io/specification/openapi.yaml \
11
+ --http-user-agent="vrchatapi-javascript"
12
+
13
+ # Modify package.json
14
+ sed -i 's/OpenAPI client for vrchat/🟡🔵 VRChat API Library for JavaScript and TypeScript/g' ./package.json
15
+ sed -i 's/Unlicense/MIT/g' ./package.json
16
+
17
+ # Enable global cookies
18
+ 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
19
+
20
+ sed -i '/"dependencies"/a "@types/tough-cookie": "^4.0.1",' ./package.json
21
+ sed -i '/"dependencies"/a "axios-cookiejar-support": "^1.0.1",' ./package.json
22
+ sed -i '/"dependencies"/a "tough-cookie": "^4.0.0",' ./package.json
23
+
24
+ # Remove messily pasted markdown at top of every file
25
+ for i in *.ts; do
26
+ sed -i '/VRChat API Banner/d' $i
27
+ done
28
+
29
+ npm install
30
30
  npm run build
package/index.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * VRChat API Documentation
5
5
  *
6
- * The version of the OpenAPI document: 1.3.0
6
+ * The version of the OpenAPI document: 1.3.1
7
7
  * Contact: me@ruby.js.org
8
8
  *
9
9
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/openapitools.json CHANGED
@@ -1,7 +1,7 @@
1
- {
2
- "$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json",
3
- "spaces": 2,
4
- "generator-cli": {
5
- "version": "5.2.0"
6
- }
7
- }
1
+ {
2
+ "$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json",
3
+ "spaces": 2,
4
+ "generator-cli": {
5
+ "version": "5.2.0"
6
+ }
7
+ }