VRChat.Avatars (vrchat v1.20.0)

View Source

API calls for all endpoints tagged Avatars.

Summary

Functions

Create Avatar Create an avatar. It's possible to optionally specify a ID if you want a custom one. Attempting to create an Avatar with an already claimed ID will result in a DB error.

Delete Avatar Delete an avatar. Notice an avatar is never fully "deleted", only its ReleaseStatus is set to "hidden" and the linked Files are deleted. The AvatarID is permanently reserved.

Delete generated Impostor Delete generated Impostor for that avatar.

Enqueue Impostor generation Enqueue Impostor generation for that avatar.

Get Avatar Get information about a specific Avatar.

List Favorited Avatars Search and list favorited avatars by query filters.

Get Impostor Queue Stats Gets service stats for queued impostor.

List Licensed Avatars List licensed avatars.

Get Own Avatar Get the current avatar for the user. This will return an error for any other user than the one logged in.

Search Avatars Search and list avatars by query filters. You can only search your own or featured avatars. It is not possible as a normal user to search other peoples avatars.

Select Avatar Switches into that avatar.

Select Fallback Avatar Switches into that avatar as your fallback avatar.

Update Avatar Update information about a specific avatar.

Functions

create_avatar(connection, opts \\ [])

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

Create Avatar Create an avatar. It's possible to optionally specify a ID if you want a custom one. Attempting to create an Avatar with an already claimed ID will result in a DB error.

Parameters

  • connection (VRChat.Connection): Connection to server
  • opts (keyword): Optional parameters
    • :body (CreateAvatarRequest):

Returns

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

delete_avatar(connection, avatar_id, opts \\ [])

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

Delete Avatar Delete an avatar. Notice an avatar is never fully "deleted", only its ReleaseStatus is set to "hidden" and the linked Files are deleted. The AvatarID is permanently reserved.

Parameters

  • connection (VRChat.Connection): Connection to server
  • avatar_id (String.t): Must be a valid avatar ID.
  • opts (keyword): Optional parameters

Returns

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

delete_impostor(connection, avatar_id, opts \\ [])

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

Delete generated Impostor Delete generated Impostor for that avatar.

Parameters

  • connection (VRChat.Connection): Connection to server
  • avatar_id (String.t): Must be a valid avatar ID.
  • opts (keyword): Optional parameters

Returns

  • {:ok, nil} on success
  • {:error, Tesla.Env.t} on failure

enqueue_impostor(connection, avatar_id, opts \\ [])

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

Enqueue Impostor generation Enqueue Impostor generation for that avatar.

Parameters

  • connection (VRChat.Connection): Connection to server
  • avatar_id (String.t): Must be a valid avatar ID.
  • opts (keyword): Optional parameters

Returns

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

get_avatar(connection, avatar_id, opts \\ [])

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

Get Avatar Get information about a specific Avatar.

Parameters

  • connection (VRChat.Connection): Connection to server
  • avatar_id (String.t): Must be a valid avatar ID.
  • opts (keyword): Optional parameters

Returns

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

get_favorited_avatars(connection, opts \\ [])

@spec get_favorited_avatars(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, VRChat.Model.Error.t()}
  | {:ok, [VRChat.Model.Avatar.t()]}
  | {:error, Tesla.Env.t()}

List Favorited Avatars Search and list favorited avatars by query filters.

Parameters

  • connection (VRChat.Connection): Connection to server
  • opts (keyword): Optional parameters
    • :featured (boolean()): Filters on featured results.
    • :sort (SortOption): The sort order of the results.
    • :n (integer()): The number of objects to return.
    • :order (OrderOption): Result ordering
    • :offset (integer()): A zero-based offset from the default object sorting from where search results start.
    • :search (String.t): Filters by world name.
    • :tag (String.t): Tags to include (comma-separated). Any of the tags needs to be present.
    • :notag (String.t): Tags to exclude (comma-separated).
    • :releaseStatus (ReleaseStatus): Filter by ReleaseStatus.
    • :maxUnityVersion (String.t): The maximum Unity version supported by the asset.
    • :minUnityVersion (String.t): The minimum Unity version supported by the asset.
    • :platform (String.t): The platform the asset supports.
    • :userId (String.t): Target user to see information on, admin-only.

Returns

  • {:ok, [%Avatar{}, ...]} on success
  • {:error, Tesla.Env.t} on failure

get_impostor_queue_stats(connection, opts \\ [])

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

Get Impostor Queue Stats Gets service stats for queued impostor.

Parameters

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

Returns

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

get_licensed_avatars(connection, opts \\ [])

@spec get_licensed_avatars(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, VRChat.Model.Error.t()}
  | {:ok, [VRChat.Model.Avatar.t()]}
  | {:error, Tesla.Env.t()}

List Licensed Avatars List licensed avatars.

Parameters

  • connection (VRChat.Connection): Connection to server
  • opts (keyword): Optional parameters
    • :n (integer()): The number of objects to return.
    • :offset (integer()): A zero-based offset from the default object sorting from where search results start.

Returns

  • {:ok, [%Avatar{}, ...]} on success
  • {:error, Tesla.Env.t} on failure

get_own_avatar(connection, user_id, opts \\ [])

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

Get Own Avatar Get the current avatar for the user. This will return an error for any other user than the one logged in.

Parameters

  • connection (VRChat.Connection): Connection to server
  • user_id (String.t): Must be a valid user ID.
  • opts (keyword): Optional parameters

Returns

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

search_avatars(connection, opts \\ [])

@spec search_avatars(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, VRChat.Model.Error.t()}
  | {:ok, [VRChat.Model.Avatar.t()]}
  | {:error, Tesla.Env.t()}

Search Avatars Search and list avatars by query filters. You can only search your own or featured avatars. It is not possible as a normal user to search other peoples avatars.

Parameters

  • connection (VRChat.Connection): Connection to server
  • opts (keyword): Optional parameters
    • :featured (boolean()): Filters on featured results.
    • :sort (SortOption): The sort order of the results.
    • :user (String.t): Set to me for searching own avatars.
    • :userId (String.t): Filter by UserID.
    • :n (integer()): The number of objects to return.
    • :order (OrderOption): Result ordering
    • :offset (integer()): A zero-based offset from the default object sorting from where search results start.
    • :tag (String.t): Tags to include (comma-separated). Any of the tags needs to be present.
    • :notag (String.t): Tags to exclude (comma-separated).
    • :releaseStatus (ReleaseStatus): Filter by ReleaseStatus.
    • :maxUnityVersion (String.t): The maximum Unity version supported by the asset.
    • :minUnityVersion (String.t): The minimum Unity version supported by the asset.
    • :platform (String.t): The platform the asset supports.

Returns

  • {:ok, [%Avatar{}, ...]} on success
  • {:error, Tesla.Env.t} on failure

select_avatar(connection, avatar_id, opts \\ [])

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

Select Avatar Switches into that avatar.

Parameters

  • connection (VRChat.Connection): Connection to server
  • avatar_id (String.t): Must be a valid avatar ID.
  • opts (keyword): Optional parameters

Returns

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

select_fallback_avatar(connection, avatar_id, opts \\ [])

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

Select Fallback Avatar Switches into that avatar as your fallback avatar.

Parameters

  • connection (VRChat.Connection): Connection to server
  • avatar_id (String.t): Must be a valid avatar ID.
  • opts (keyword): Optional parameters

Returns

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

update_avatar(connection, avatar_id, opts \\ [])

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

Update Avatar Update information about a specific avatar.

Parameters

  • connection (VRChat.Connection): Connection to server
  • avatar_id (String.t): Must be a valid avatar ID.
  • opts (keyword): Optional parameters
    • :body (UpdateAvatarRequest):

Returns

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