VRChat.Instances (vrchat v1.20.0)

View Source

API calls for all endpoints tagged Instances.

Summary

Functions

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-manage permission.

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"!

Get Instance By Short Name Returns an instance. Please read Instances Tutorial for more information on Instances.

Get Instance Short Name Returns an instance short name.

Functions

close_instance(connection, world_id, instance_id, opts \\ [])

@spec close_instance(Tesla.Env.client(), String.t(), String.t(), keyword()) ::
  {:ok, VRChat.Model.Instance.t()}
  | {:ok, VRChat.Model.Error.t()}
  | {:error, Tesla.Env.t()}

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-manage permission.

Parameters

  • connection (VRChat.Connection): Connection to server
  • world_id (String.t): Must be a valid world ID.
  • instance_id (String.t): Must be a valid instance ID.
  • opts (keyword): Optional parameters
    • :hardClose (boolean()): Whether to hard close the instance. Defaults to false.
    • :closedAt (DateTime.t): The time after which users won't be allowed to join the instances. If omitted, the instance will be closed immediately.

Returns

  • {:ok, VRChat.Model.Instance.t} on success
  • {:error, Tesla.Env.t} on failure

create_instance(connection, create_instance_request, opts \\ [])

@spec create_instance(
  Tesla.Env.client(),
  VRChat.Model.CreateInstanceRequest.t(),
  keyword()
) ::
  {:ok, VRChat.Model.Instance.t()}
  | {:ok, VRChat.Model.Error.t()}
  | {:error, Tesla.Env.t()}

Create Instance Create an instance

Parameters

  • connection (VRChat.Connection): Connection to server
  • create_instance_request (CreateInstanceRequest):
  • opts (keyword): Optional parameters

Returns

  • {:ok, VRChat.Model.Instance.t} on success
  • {:error, Tesla.Env.t} on failure

get_instance(connection, world_id, instance_id, opts \\ [])

@spec get_instance(Tesla.Env.client(), String.t(), String.t(), keyword()) ::
  {:ok, VRChat.Model.Instance.t()}
  | {:ok, VRChat.Model.Error.t()}
  | {:error, Tesla.Env.t()}

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"!

Parameters

  • connection (VRChat.Connection): Connection to server
  • world_id (String.t): Must be a valid world ID.
  • instance_id (String.t): Must be a valid instance ID.
  • opts (keyword): Optional parameters

Returns

  • {:ok, VRChat.Model.Instance.t} on success
  • {:error, Tesla.Env.t} on failure

get_instance_by_short_name(connection, short_name, opts \\ [])

@spec get_instance_by_short_name(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, VRChat.Model.Instance.t()}
  | {:ok, VRChat.Model.Error.t()}
  | {:error, Tesla.Env.t()}

Get Instance By Short Name Returns an instance. Please read Instances Tutorial for more information on Instances.

Parameters

  • connection (VRChat.Connection): Connection to server
  • short_name (String.t): Must be a valid instance short name.
  • opts (keyword): Optional parameters

Returns

  • {:ok, VRChat.Model.Instance.t} on success
  • {:error, Tesla.Env.t} on failure

get_short_name(connection, world_id, instance_id, opts \\ [])

@spec get_short_name(Tesla.Env.client(), String.t(), String.t(), keyword()) ::
  {:ok, VRChat.Model.InstanceShortNameResponse.t()}
  | {:ok, VRChat.Model.Error.t()}
  | {:error, Tesla.Env.t()}

Get Instance Short Name Returns an instance short name.

Parameters

  • connection (VRChat.Connection): Connection to server
  • world_id (String.t): Must be a valid world ID.
  • instance_id (String.t): Must be a valid instance ID.
  • opts (keyword): Optional parameters

Returns

  • {:ok, VRChat.Model.InstanceShortNameResponse.t} on success
  • {:error, Tesla.Env.t} on failure