osu!ex v0.2.0 OsuEx.API.Enums View Source

Utility functions for handling enum values.

Link to this section Summary

Functions

Translates the approved status enum to an atom and vice versa

Translates the genre enum to an atom and vice versa

Translates the language enum to an atom and vice versa

Translates the game mode enum to an atom and vice versa

Translates the scoring type enum to an atom and vice versa

Translates the team enum to an atom and vice versa

Translates the team type enum to an atom and vice versa

Link to this section Functions

Link to this function

approved(arg1) View Source
approved(-2..4) :: atom()
approved(atom()) :: -2..4

Translates the approved status enum to an atom and vice versa.

Examples

iex> OsuEx.API.Enums.approved(-2)
:graveyard

iex> OsuEx.API.Enums.approved(:wip)
-1
Link to this function

genre(arg1) View Source
genre(0..7 | 9..10) :: atom()
genre(atom()) :: 0..7 | 9..10

Translates the genre enum to an atom and vice versa.

Examples

iex> OsuEx.API.Enums.genre(0)
:any

iex> OsuEx.API.Enums.genre(:unspecified)
1
Link to this function

language(arg1) View Source
language(0..11) :: atom()
language(atom()) :: 0..11

Translates the language enum to an atom and vice versa.

Examples

iex> OsuEx.API.Enums.language(0)
:any

iex> OsuEx.API.Enums.language(:other)
1
Link to this function

mode(arg1) View Source
mode(0..3) :: atom()
mode(atom()) :: 0..3

Translates the game mode enum to an atom and vice versa.

Examples

iex> OsuEx.API.Enums.mode(0)
:standard

iex> OsuEx.API.Enums.mode(:taiko)
1
Link to this function

scoring_type(arg1) View Source
scoring_type(0..3) :: atom()
scoring_type(atom()) :: 0..3

Translates the scoring type enum to an atom and vice versa.

Examples

iex> OsuEx.API.Enums.scoring_type(0)
:score

iex> OsuEx.API.Enums.scoring_type(:accuracy)
1
Link to this function

team(arg1) View Source
team(1..2) :: atom()
team(atom()) :: 1..2

Translates the team enum to an atom and vice versa.

Examples

iex> OsuEx.API.Enums.team(1)
:blue

iex> OsuEx.API.Enums.team(:red)
2
Link to this function

team_type(arg1) View Source
team_type(0..3) :: atom()
team_type(atom()) :: 0..3

Translates the team type enum to an atom and vice versa.

Examples

iex> OsuEx.API.Enums.team_type(0)
:head_to_head

iex> OsuEx.API.Enums.team_type(:tag_coop)
1