import 'package:vrchat_dart_generated/api.dart';
All URIs are relative to https://api.vrchat.cloud/api/1
Method | HTTP request | Description |
---|---|---|
closeInstance | DELETE /instances/{worldId}:{instanceId} | Close Instance |
createInstance | POST /instances | Create Instance |
getInstance | GET /instances/{worldId}:{instanceId} | Get Instance |
getInstanceByShortName | GET /instances/s/{shortName} | Get Instance By Short Name |
getShortName | GET /instances/{worldId}:{instanceId}/shortName | Get Instance Short Name |
Instance closeInstance(worldId, instanceId, hardClose, closedAt)
Close Instance
Close an instance or update the closedAt time when it will be closed. You can only close an instance if the ownerId is yourself or if the instance owner is a group and you have the group-instance-moderate
permission.
import 'package:vrchat_dart_generated/api.dart';
// TODO Configure API key authorization: authCookie
//defaultApiClient.getAuthentication<ApiKeyAuth>('authCookie').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('authCookie').apiKeyPrefix = 'Bearer';
final api = VrchatDartGenerated().getInstancesApi();
final String worldId = worldId_example; // String | Must be a valid world ID.
final String instanceId = instanceId_example; // String | Must be a valid instance ID.
final bool hardClose = true; // bool | Whether to hard close the instance. Defaults to false.
final DateTime closedAt = 2013-10-20T19:20:30+01:00; // DateTime | The time after which users won't be allowed to join the instances. If omitted, the instance will be closed immediately.
try {
final response = api.closeInstance(worldId, instanceId, hardClose, closedAt);
print(response);
} catch on DioException (e) {
print('Exception when calling InstancesApi->closeInstance: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
worldId | String | Must be a valid world ID. | |
instanceId | String | Must be a valid instance ID. | |
hardClose | bool | Whether to hard close the instance. Defaults to false. | [optional] |
closedAt | DateTime | The time after which users won't be allowed to join the instances. If omitted, the instance will be closed immediately. | [optional] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Instance createInstance(createInstanceRequest)
Create Instance
Create an instance
import 'package:vrchat_dart_generated/api.dart';
// TODO Configure API key authorization: authCookie
//defaultApiClient.getAuthentication<ApiKeyAuth>('authCookie').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('authCookie').apiKeyPrefix = 'Bearer';
final api = VrchatDartGenerated().getInstancesApi();
final CreateInstanceRequest createInstanceRequest = ; // CreateInstanceRequest |
try {
final response = api.createInstance(createInstanceRequest);
print(response);
} catch on DioException (e) {
print('Exception when calling InstancesApi->createInstance: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
createInstanceRequest | CreateInstanceRequest |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Instance getInstance(worldId, instanceId)
Get Instance
Returns an instance. Please read Instances Tutorial for more information on Instances. If an invalid instanceId is provided, this endpoint will simply return "null"!
import 'package:vrchat_dart_generated/api.dart';
// TODO Configure API key authorization: authCookie
//defaultApiClient.getAuthentication<ApiKeyAuth>('authCookie').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('authCookie').apiKeyPrefix = 'Bearer';
final api = VrchatDartGenerated().getInstancesApi();
final String worldId = worldId_example; // String | Must be a valid world ID.
final String instanceId = instanceId_example; // String | Must be a valid instance ID.
try {
final response = api.getInstance(worldId, instanceId);
print(response);
} catch on DioException (e) {
print('Exception when calling InstancesApi->getInstance: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
worldId | String | Must be a valid world ID. | |
instanceId | String | Must be a valid instance ID. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Instance getInstanceByShortName(shortName)
Get Instance By Short Name
Returns an instance. Please read Instances Tutorial for more information on Instances.
import 'package:vrchat_dart_generated/api.dart';
// TODO Configure API key authorization: authCookie
//defaultApiClient.getAuthentication<ApiKeyAuth>('authCookie').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('authCookie').apiKeyPrefix = 'Bearer';
final api = VrchatDartGenerated().getInstancesApi();
final String shortName = shortName_example; // String | Must be a valid instance short name.
try {
final response = api.getInstanceByShortName(shortName);
print(response);
} catch on DioException (e) {
print('Exception when calling InstancesApi->getInstanceByShortName: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
shortName | String | Must be a valid instance short name. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InstanceShortNameResponse getShortName(worldId, instanceId)
Get Instance Short Name
Returns an instance short name.
import 'package:vrchat_dart_generated/api.dart';
// TODO Configure API key authorization: authCookie
//defaultApiClient.getAuthentication<ApiKeyAuth>('authCookie').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('authCookie').apiKeyPrefix = 'Bearer';
final api = VrchatDartGenerated().getInstancesApi();
final String worldId = worldId_example; // String | Must be a valid world ID.
final String instanceId = instanceId_example; // String | Must be a valid instance ID.
try {
final response = api.getShortName(worldId, instanceId);
print(response);
} catch on DioException (e) {
print('Exception when calling InstancesApi->getShortName: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
worldId | String | Must be a valid world ID. | |
instanceId | String | Must be a valid instance ID. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]