Tibia Data v0.1.1 Util
Util module containing helpful functions used in the project.
Link to this section Summary
Functions
Function to extract the body from the response hash map.
Function for format string and replace spaces with '+' for url format.
Link to this section Functions
Link to this function
extract_body(response)
Function to extract the body from the response hash map.
Parameters
- response (HTTPoison.Response): A response from httpoison request.
Examples
iex> Util.extract_body(response)
{:ok, body}
Link to this function
format_string(text)
Function for format string and replace spaces with '+' for url format.
Parameters
- text (string): Text to be formatted in the url format.
Examples
iex> Util.format_string("Macabra Pune")
"Macabra+Pune"