Favro
Favro client library for Elixir. Simplifies interactions with the Favro API and automatically traverses paginated results in order to retrieve all requested data.
Installation
If available in Hex, the package can be installed
by adding favro to your list of dependencies in mix.exs:
def deps do
[
{:favro, "~> 0.1.0"}
]
endUsage
Initialize a new handle using Favro.new/4:
handle = Favro.new("my_username", "my_api_key", "my_organization_id")Alternatively, set the Application configuration variables corresponding to your organization ID and credentials:
# config.exs
config :favro, [
username: "my_username",
password: "my_api_key",
organization: "my_organization_id"
]
All Favro module functions accept a handle, or will use a default handle based on the application config.
# List Cards
{:ok, cards} = Favro.list_cards(collection: "collection")
# List Archived Cards
{:ok, cards} = Favro.list_cards(collection: "collection", archived: true)
# Create a Card
{:ok, card} = Favro.create_card(%Favro.Card{name: "Card Name", collection_id: "collection"})Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/favro.