View Source VRChat.Avatars (vrchat v1.11.1)

API calls for all endpoints tagged Avatars.

Link to this section 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.

Get Avatar Get information about a specific Avatar.

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

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.

Link to this section Functions

Link to this function

create_avatar(connection, opts \\ [])

View Source
@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

Parameters

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

returns

Returns

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

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

View Source
@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

Parameters

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

returns

Returns

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

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

View Source
@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

Parameters

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

returns

Returns

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

get_favorited_avatars(connection, opts \\ [])

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

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

parameters

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

Returns

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

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

View Source
@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

Parameters

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

returns

Returns

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

search_avatars(connection, opts \\ [])

View Source
@spec search_avatars(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, [VRChat.Model.Avatar.t()]}
  | {:ok, VRChat.Model.Error.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

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

Returns

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

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

View Source
@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

Parameters

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

returns

Returns

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

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

View Source
@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

Parameters

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

returns

Returns

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

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

View Source
@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

Parameters

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

returns

Returns

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