Packages
Display Purposes API wrapper
Retired package: Deprecated - API of displaypurposes.com changed
Current section
Files
Jump to
Current section
Files
lib/display_purposes.ex
defmodule DisplayPurposes do
@moduledoc """
Display Purposes API wrapper
"""
@tags "tag/"
@graph "graph/"
@doc """
Get relevant hashtags for `word`
## Example
DisplayPurposes.tags("berlin")
"""
def tags(word, headers \\ [], options \\ [])
when is_binary(word) and is_list(headers) and is_list(options) do
DisplayPurposes.API.get(@tags <> word, headers, options)
end
@doc """
Get neighborhood graph of hashtag
## Example
DisplayPurposes.graph("budapest")
"""
def graph(word, headers \\ [], options \\ [])
when is_binary(word) and is_list(headers) and is_list(options) do
DisplayPurposes.API.get(@graph <> word, headers, options)
end
end