Appwrite. Consts. Flag
(appwrite v1.0.0)
View Source
ISO 3166-1 alpha-2 country codes used by the Appwrite Avatars flag endpoint.
Pass any value from values/0 to Appwrite.Services.Avatars.get_flag/4.
Summary
Functions
Returns true when value is a valid country flag, otherwise false.
Guard — returns true when value is a valid country flag.
Returns {:ok, value} if valid, or {:error, "Invalid country flag"}.
Returns value if valid. Raises ArgumentError otherwise.
Returns all valid country flag values.
Functions
Returns true when value is a valid country flag, otherwise false.
Guard — returns true when value is a valid country flag.
Can be used in function heads:
def handle(v) when Elixir.Appwrite.Consts.Flag.valid_value(v), do: :ok
Returns {:ok, value} if valid, or {:error, "Invalid country flag"}.
Returns value if valid. Raises ArgumentError otherwise.
@spec values() :: [String.t()]
Returns all valid country flag values.