Wootheex (wootheex v0.1.0) View Source
Link to this section Summary
Link to this section Types
Specs
browser_name() :: binary() | :other
Specs
browser_type() :: :browser | :full | :os | :other
Specs
browser_version() :: binary() | :other
Specs
category() :: :appliance | :crawler | :misc | :mobilephone | :pc | :smartphone | :other
Specs
os() :: binary() | :other
Specs
os_version() :: binary() | :other
Specs
parse_result() :: :other | {category(), browser_name(), browser_type(), browser_version(), os(), os_version(), vendor()}
Specs
user_agent() :: binary()
Specs
vendor() :: binary() | :other
Link to this section Functions
Specs
parse(user_agent()) :: parse_result()
Parse user agent to simple tuple with info (see spec and parse_result type)
iex> Wootheex.parse "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.155 Safari/537.36"
{:pc, "Chrome", :browser, "44.0.2403.155", "Mac OSX", "10.10.4", "Google"}