Appwrite.Consts.Browser (appwrite v1.0.0)

View Source

Browser type codes used by the Appwrite Avatars service.

BrowserCode
Avant Browser"aa"
Android WebView Beta"an"
Google Chrome"ch"
Google Chrome iOS"ci"
Google Chrome Mobile"cm"
Chromium"cr"
Mozilla Firefox"ff"
Safari"sf"
Mobile Safari"mf"
Microsoft Edge"ps"
Microsoft Edge iOS"oi"
Opera Mini"om"
Opera"op"
Opera Next"on"

Summary

Functions

Returns true when value is a valid browser, otherwise false.

Guard — returns true when value is a valid browser.

Returns {:ok, value} if valid, or {:error, "Invalid browser"}.

Returns value if valid. Raises ArgumentError otherwise.

Returns all valid browser values.

Functions

valid?(value)

@spec valid?(String.t()) :: boolean()

Returns true when value is a valid browser, otherwise false.

valid_value(value)

(macro)

Guard — returns true when value is a valid browser.

Can be used in function heads:

def handle(v) when Elixir.Appwrite.Consts.Browser.valid_value(v), do: :ok

validate(value)

@spec validate(String.t()) :: {:ok, String.t()} | {:error, String.t()}

Returns {:ok, value} if valid, or {:error, "Invalid browser"}.

validate!(value)

@spec validate!(String.t()) :: String.t()

Returns value if valid. Raises ArgumentError otherwise.

values()

@spec values() :: [String.t()]

Returns all valid browser values.