Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bryanjos/balanced-elixir
Balanced Api Client for Elixir
https://github.com/bryanjos/balanced-elixir
Last synced: 4 days ago
JSON representation
Balanced Api Client for Elixir
- Host: GitHub
- URL: https://github.com/bryanjos/balanced-elixir
- Owner: bryanjos
- Created: 2014-02-28T04:56:24.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-12-10T01:27:34.000Z (almost 10 years ago)
- Last Synced: 2024-09-04T14:21:06.731Z (2 months ago)
- Language: Elixir
- Size: 395 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- freaking_awesome_elixir - Elixir - Balanced API Client for Elixir. (Third Party APIs)
- fucking-awesome-elixir - balanced - Balanced API Client for Elixir. (Third Party APIs)
- awesome-elixir - balanced - Balanced API Client for Elixir. (Third Party APIs)
README
# Balanced-Elixir
Balanced API v1.1 Client for Elixir
Usage:
use the following:
```elixir
{:balanced, "~> 3.1.0"}
```[Documentation](http://hexdocs.pm/balanced)
Usage:
```elixir
#looks for an application variable in the `:balanced` app named `:secret_key` or an environment variable named BALANCED_SECRET_KEY
{:ok, balanced} = Balanced.new#alternatively, you can pass in the secret key as well
{:ok, balanced} = Balanced.new("my_secret_key")#then pass in the balanced pid when calling functions
{status, response} = Balanced.BankAccounts.get(balanced, bank_account_id)
```status is either `:ok` or `:error`
response is a Map converted from the json response from Balanced.
Information about the balanced api can be found at [http://docs.balancedpayments.com/1.1/api/](http://docs.balancedpayments.com/1.1/api/)
All calls return either {:ok, response} or {:error, response} where response is a map of the Balanced API response