|
| 1 | +# InstancesApi |
| 2 | + |
| 3 | +All URIs are relative to *https://api.vrchat.cloud/api/1* |
| 4 | + |
| 5 | +Method | HTTP request | Description |
| 6 | +------------- | ------------- | ------------- |
| 7 | +[**getInstance**](InstancesApi.md#getInstance) | **GET** /instances/{worldId}:{instanceId} | Get Instance |
| 8 | +[**getShortName**](InstancesApi.md#getShortName) | **GET** /instances/{worldId}:{instanceId}/shortName | Get Instance Short Name |
| 9 | +[**sendSelfInvite**](InstancesApi.md#sendSelfInvite) | **POST** /instances/{worldId}:{instanceId}/invite | Send Self Invite |
| 10 | + |
| 11 | + |
| 12 | +<a name="getInstance"></a> |
| 13 | +# **getInstance** |
| 14 | +> Instance getInstance(worldId, instanceId) |
| 15 | +
|
| 16 | +Get Instance |
| 17 | + |
| 18 | +Returns an instance. |
| 19 | + |
| 20 | +### Example |
| 21 | +```java |
| 22 | +// Import classes: |
| 23 | +import io.github.vrchatapi.ApiClient; |
| 24 | +import io.github.vrchatapi.ApiException; |
| 25 | +import io.github.vrchatapi.Configuration; |
| 26 | +import io.github.vrchatapi.auth.*; |
| 27 | +import io.github.vrchatapi.models.*; |
| 28 | +import io.github.vrchatapi.api.InstancesApi; |
| 29 | + |
| 30 | +public class Example { |
| 31 | + public static void main(String[] args) { |
| 32 | + ApiClient defaultClient = Configuration.getDefaultApiClient(); |
| 33 | + defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); |
| 34 | + |
| 35 | + // Configure API key authorization: apiKeyCookie |
| 36 | + ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); |
| 37 | + apiKeyCookie.setApiKey("YOUR API KEY"); |
| 38 | + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) |
| 39 | + //apiKeyCookie.setApiKeyPrefix("Token"); |
| 40 | + |
| 41 | + // Configure API key authorization: authCookie |
| 42 | + ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); |
| 43 | + authCookie.setApiKey("YOUR API KEY"); |
| 44 | + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) |
| 45 | + //authCookie.setApiKeyPrefix("Token"); |
| 46 | + |
| 47 | + InstancesApi apiInstance = new InstancesApi(defaultClient); |
| 48 | + String worldId = "worldId_example"; // String | |
| 49 | + String instanceId = "instanceId_example"; // String | |
| 50 | + try { |
| 51 | + Instance result = apiInstance.getInstance(worldId, instanceId); |
| 52 | + System.out.println(result); |
| 53 | + } catch (ApiException e) { |
| 54 | + System.err.println("Exception when calling InstancesApi#getInstance"); |
| 55 | + System.err.println("Status code: " + e.getCode()); |
| 56 | + System.err.println("Reason: " + e.getResponseBody()); |
| 57 | + System.err.println("Response headers: " + e.getResponseHeaders()); |
| 58 | + e.printStackTrace(); |
| 59 | + } |
| 60 | + } |
| 61 | +} |
| 62 | +``` |
| 63 | + |
| 64 | +### Parameters |
| 65 | + |
| 66 | +Name | Type | Description | Notes |
| 67 | +------------- | ------------- | ------------- | ------------- |
| 68 | + **worldId** | **String**| | |
| 69 | + **instanceId** | **String**| | |
| 70 | + |
| 71 | +### Return type |
| 72 | + |
| 73 | +[**Instance**](Instance.md) |
| 74 | + |
| 75 | +### Authorization |
| 76 | + |
| 77 | +[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) |
| 78 | + |
| 79 | +### HTTP request headers |
| 80 | + |
| 81 | + - **Content-Type**: Not defined |
| 82 | + - **Accept**: application/json |
| 83 | + |
| 84 | +### HTTP response details |
| 85 | +| Status code | Description | Response headers | |
| 86 | +|-------------|-------------|------------------| |
| 87 | +**200** | Returns a single Instance object. | - | |
| 88 | +**401** | Error response due to missing apiKey or auth cookie. | - | |
| 89 | + |
| 90 | +<a name="getShortName"></a> |
| 91 | +# **getShortName** |
| 92 | +> String getShortName(worldId, instanceId) |
| 93 | +
|
| 94 | +Get Instance Short Name |
| 95 | + |
| 96 | +Returns an instance short name. |
| 97 | + |
| 98 | +### Example |
| 99 | +```java |
| 100 | +// Import classes: |
| 101 | +import io.github.vrchatapi.ApiClient; |
| 102 | +import io.github.vrchatapi.ApiException; |
| 103 | +import io.github.vrchatapi.Configuration; |
| 104 | +import io.github.vrchatapi.auth.*; |
| 105 | +import io.github.vrchatapi.models.*; |
| 106 | +import io.github.vrchatapi.api.InstancesApi; |
| 107 | + |
| 108 | +public class Example { |
| 109 | + public static void main(String[] args) { |
| 110 | + ApiClient defaultClient = Configuration.getDefaultApiClient(); |
| 111 | + defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); |
| 112 | + |
| 113 | + // Configure API key authorization: apiKeyCookie |
| 114 | + ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); |
| 115 | + apiKeyCookie.setApiKey("YOUR API KEY"); |
| 116 | + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) |
| 117 | + //apiKeyCookie.setApiKeyPrefix("Token"); |
| 118 | + |
| 119 | + // Configure API key authorization: authCookie |
| 120 | + ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); |
| 121 | + authCookie.setApiKey("YOUR API KEY"); |
| 122 | + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) |
| 123 | + //authCookie.setApiKeyPrefix("Token"); |
| 124 | + |
| 125 | + InstancesApi apiInstance = new InstancesApi(defaultClient); |
| 126 | + String worldId = "worldId_example"; // String | |
| 127 | + String instanceId = "instanceId_example"; // String | |
| 128 | + try { |
| 129 | + String result = apiInstance.getShortName(worldId, instanceId); |
| 130 | + System.out.println(result); |
| 131 | + } catch (ApiException e) { |
| 132 | + System.err.println("Exception when calling InstancesApi#getShortName"); |
| 133 | + System.err.println("Status code: " + e.getCode()); |
| 134 | + System.err.println("Reason: " + e.getResponseBody()); |
| 135 | + System.err.println("Response headers: " + e.getResponseHeaders()); |
| 136 | + e.printStackTrace(); |
| 137 | + } |
| 138 | + } |
| 139 | +} |
| 140 | +``` |
| 141 | + |
| 142 | +### Parameters |
| 143 | + |
| 144 | +Name | Type | Description | Notes |
| 145 | +------------- | ------------- | ------------- | ------------- |
| 146 | + **worldId** | **String**| | |
| 147 | + **instanceId** | **String**| | |
| 148 | + |
| 149 | +### Return type |
| 150 | + |
| 151 | +**String** |
| 152 | + |
| 153 | +### Authorization |
| 154 | + |
| 155 | +[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) |
| 156 | + |
| 157 | +### HTTP request headers |
| 158 | + |
| 159 | + - **Content-Type**: Not defined |
| 160 | + - **Accept**: text/plain, application/json |
| 161 | + |
| 162 | +### HTTP response details |
| 163 | +| Status code | Description | Response headers | |
| 164 | +|-------------|-------------|------------------| |
| 165 | +**200** | Returns an instance short name. | - | |
| 166 | +**401** | Error response due to missing apiKey or auth cookie. | - | |
| 167 | + |
| 168 | +<a name="sendSelfInvite"></a> |
| 169 | +# **sendSelfInvite** |
| 170 | +> Success sendSelfInvite(worldId, instanceId) |
| 171 | +
|
| 172 | +Send Self Invite |
| 173 | + |
| 174 | +Sends an invite to the instance to yourself. |
| 175 | + |
| 176 | +### Example |
| 177 | +```java |
| 178 | +// Import classes: |
| 179 | +import io.github.vrchatapi.ApiClient; |
| 180 | +import io.github.vrchatapi.ApiException; |
| 181 | +import io.github.vrchatapi.Configuration; |
| 182 | +import io.github.vrchatapi.auth.*; |
| 183 | +import io.github.vrchatapi.models.*; |
| 184 | +import io.github.vrchatapi.api.InstancesApi; |
| 185 | + |
| 186 | +public class Example { |
| 187 | + public static void main(String[] args) { |
| 188 | + ApiClient defaultClient = Configuration.getDefaultApiClient(); |
| 189 | + defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); |
| 190 | + |
| 191 | + // Configure API key authorization: apiKeyCookie |
| 192 | + ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); |
| 193 | + apiKeyCookie.setApiKey("YOUR API KEY"); |
| 194 | + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) |
| 195 | + //apiKeyCookie.setApiKeyPrefix("Token"); |
| 196 | + |
| 197 | + // Configure API key authorization: authCookie |
| 198 | + ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); |
| 199 | + authCookie.setApiKey("YOUR API KEY"); |
| 200 | + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) |
| 201 | + //authCookie.setApiKeyPrefix("Token"); |
| 202 | + |
| 203 | + InstancesApi apiInstance = new InstancesApi(defaultClient); |
| 204 | + String worldId = "worldId_example"; // String | |
| 205 | + String instanceId = "instanceId_example"; // String | |
| 206 | + try { |
| 207 | + Success result = apiInstance.sendSelfInvite(worldId, instanceId); |
| 208 | + System.out.println(result); |
| 209 | + } catch (ApiException e) { |
| 210 | + System.err.println("Exception when calling InstancesApi#sendSelfInvite"); |
| 211 | + System.err.println("Status code: " + e.getCode()); |
| 212 | + System.err.println("Reason: " + e.getResponseBody()); |
| 213 | + System.err.println("Response headers: " + e.getResponseHeaders()); |
| 214 | + e.printStackTrace(); |
| 215 | + } |
| 216 | + } |
| 217 | +} |
| 218 | +``` |
| 219 | + |
| 220 | +### Parameters |
| 221 | + |
| 222 | +Name | Type | Description | Notes |
| 223 | +------------- | ------------- | ------------- | ------------- |
| 224 | + **worldId** | **String**| | |
| 225 | + **instanceId** | **String**| | |
| 226 | + |
| 227 | +### Return type |
| 228 | + |
| 229 | +[**Success**](Success.md) |
| 230 | + |
| 231 | +### Authorization |
| 232 | + |
| 233 | +[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) |
| 234 | + |
| 235 | +### HTTP request headers |
| 236 | + |
| 237 | + - **Content-Type**: Not defined |
| 238 | + - **Accept**: application/json |
| 239 | + |
| 240 | +### HTTP response details |
| 241 | +| Status code | Description | Response headers | |
| 242 | +|-------------|-------------|------------------| |
| 243 | +**200** | Success response after sending an invite to yourself to the instance. | - | |
| 244 | +**401** | Error response due to missing apiKey or auth cookie. | - | |
| 245 | + |
0 commit comments