vrchat 1.20.0-next.1752332210 → 1.20.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.
@@ -0,0 +1,44 @@
1
+ on:
2
+ repository_dispatch:
3
+ types: [spec_release]
4
+ #on: push
5
+
6
+ name: Generate VRChat API SDK
7
+
8
+ jobs:
9
+ generate:
10
+ runs-on: ubuntu-latest
11
+ name: Generate VRChat API SDK
12
+ steps:
13
+ - uses: actions/setup-node@v1
14
+ with:
15
+ node-version: 16
16
+ - uses: actions/checkout@v2
17
+ - name: 'Cache node_modules'
18
+ uses: actions/cache@v4
19
+ with:
20
+ path: node_modules
21
+ key: ${{ runner.os }}-node-v16-${{ hashFiles('**/generate.sh') }}
22
+ restore-keys: |
23
+ ${{ runner.os }}-node-v16
24
+ - name: Install OpenAPI Generator CLI
25
+ run: npm install @openapitools/openapi-generator-cli
26
+ - name: Set OpenAPI Generator version
27
+ run: ./node_modules/\@openapitools/openapi-generator-cli/main.js version-manager set 6.3.1
28
+ - name: Generate SDK Client
29
+ run: bash ./generate.sh
30
+ - name: Check version number
31
+ run: |
32
+ echo "spec_version=$(grep "version" ./package.json | cut -d "\"" -f 4)" >> $GITHUB_ENV
33
+ - name: Print version number
34
+ run: echo ${{ env.spec_version }}
35
+ - name: Deploy SDK back into main branch
36
+ uses: JamesIves/github-pages-deploy-action@v4
37
+ with:
38
+ branch: main
39
+ folder: .
40
+ commit-message: "Upgrade Node SDK to spec ${{ env.spec_version }}"
41
+ - name: Upload to NPM
42
+ uses: JS-DevTools/npm-publish@v1
43
+ with:
44
+ token: ${{ secrets.NPM_TOKEN }}
@@ -0,0 +1,8 @@
1
+ .npmignore
2
+ api.ts
3
+ base.ts
4
+ common.ts
5
+ configuration.ts
6
+ index.ts
7
+ package.json
8
+ tsconfig.json
@@ -0,0 +1 @@
1
+ 6.2.1
@@ -0,0 +1,29 @@
1
+ # OpenAPI Generator Ignore
2
+ # Generated by openapi-generator https://github.com/openapitools/openapi-generator
3
+
4
+ # Use this file to prevent files from being overwritten by the generator.
5
+ # The patterns follow closely to .gitignore or .dockerignore.
6
+
7
+ # As an example, the C# client generator defines ApiClient.cs.
8
+ # You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
9
+ #ApiClient.cs
10
+
11
+ # You can match any string of characters against a directory, file or extension with a single asterisk (*):
12
+ #foo/*/qux
13
+ # The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
14
+
15
+ # You can recursively match patterns against a directory, file or extension with a double asterisk (**):
16
+ #foo/**/qux
17
+ # This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
18
+
19
+ # You can also negate patterns with an exclamation (!).
20
+ # For example, you can ignore all files in a docs folder with the file extension .md:
21
+ #docs/*.md
22
+ # Then explicitly reverse the ignore rule for a single file:
23
+ #!docs/README.md
24
+
25
+
26
+ # VRChatAPI: Do not modify .gitignore to avoid comitting "dist"
27
+ .gitignore
28
+ README.md
29
+ git_push.sh
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2025 Owners of GitHub organization "vrchatapi" and individual contributors.
3
+ Copyright (c) 2021 Owners of GitHub organisation "vrchatapi" and individual contributors.
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md ADDED
@@ -0,0 +1,69 @@
1
+ ![](https://github.com/vrchatapi/vrchatapi.github.io/blob/main/static/assets/img/lang/lang_javascript_banner_1500x300.png?raw=true)
2
+
3
+ # VRChat API Library for JavaScript/TypeScript
4
+
5
+ A JavaScript/TypeScript/NodeJS client to interact with the unofficial VRChat API. Supports all REST calls specified in the [API specification](https://github.com/vrchatapi/specification).
6
+
7
+ ## Disclaimer
8
+
9
+ This is the official response of the VRChat Team (from Tupper more specifically) on the usage of the VRChat API.
10
+
11
+ > Use of the API using applications other than the approved methods (website, VRChat application) are not officially supported. You may use the API for your own application, but keep these guidelines in mind:
12
+ > * We do not provide documentation or support for the API.
13
+ > * Do not make queries to the API more than once per 60 seconds.
14
+ > * Abuse of the API may result in account termination.
15
+ > * Access to API endpoints may break at any given time, with no warning.
16
+
17
+ As stated, this documentation was not created with the help of the official VRChat team. Therefore this documentation is not an official documentation of the VRChat API and may not be always up to date with the latest versions. If you find that a page or endpoint is not longer valid please create an issue and tell us so we can fix it.
18
+
19
+ ## Getting Started
20
+
21
+ First add the package to to your project:
22
+ ```bash
23
+ npm install vrchat
24
+ ```
25
+
26
+ Below is an example on how to login to the API and fetch your own user information.
27
+
28
+ ```javascript
29
+ // Step 1. We begin with creating a Configuration, which contains the username and password for authentication, as well as an options dictionary, which contains the user agent header.
30
+ const vrchat = require("vrchat");
31
+
32
+ const configuration = new vrchat.Configuration({
33
+ username: "username",
34
+ password: "password"
35
+ });
36
+
37
+ const options = { headers: { "User-Agent": "ExampleProgram/0.0.1 my@email.com"}};
38
+
39
+ // Step 2. VRChat consists of several API's (WorldsApi, UsersApi, FilesApi, NotificationsApi, FriendsApi, etc...)
40
+ // Here we instantiate the Authentication API which is required for logging in.
41
+ const AuthenticationApi = new vrchat.AuthenticationApi(configuration);
42
+
43
+ // Step 3. Calling getCurrentUser on Authentication API logs you in if the user isn't already logged in.
44
+ AuthenticationApi.getCurrentUser(options).then(async resp => {
45
+ var currentUser = resp.data;
46
+
47
+ // Step 3.5. Calling email verify2fa if the account has 2FA disabled
48
+ if (currentUser["requiresTwoFactorAuth"] && currentUser["requiresTwoFactorAuth"][0] === "emailOtp") {
49
+ await AuthenticationApi.verify2FAEmailCode({ code: "123456" }, options)
50
+ currentUser = (await AuthenticationApi.getCurrentUser(options)).data;
51
+ }
52
+
53
+ // Step 3.5. Calling verify2fa if the account has 2FA enabled
54
+ if (currentUser["requiresTwoFactorAuth"] && currentUser["requiresTwoFactorAuth"][0] === "totp") {
55
+ await AuthenticationApi.verify2FA({ code: "123456" }, options)
56
+ currentUser = (await AuthenticationApi.getCurrentUser(options)).data;
57
+ }
58
+
59
+ console.log(`Logged in as: ${currentUser.displayName}`);
60
+ });
61
+ ```
62
+
63
+ See [example.js](https://github.com/vrchatapi/vrchatapi-javascript/blob/master/example.js) for more example usage on getting started.
64
+
65
+ ## Contributing
66
+
67
+ Contributions are welcome, but do not add features that should be handled by the OpenAPI specification.
68
+
69
+ Join the [Discord server](https://discord.gg/Ge2APMhPfD) to get in touch with us.