Giter Club home page Giter Club logo

monzo_elixir's Introduction

Monzo Elixir

Build Status

An Elixir client for the Monzo API.

Installation

Add monzo to your list of dependencies in mix.exs:

def deps do
  [{:monzo, "~> 0.3.0"}]
end

Usage

iex> {:ok, client} = Monzo.Client.authenticate("client_id", "client_secret", "authorization_code")
{:ok,
 %Monzo.Client{access_token: "access_token",
  client_id: "client_id", expires_in: 21600,
  refresh_token: "refresh_token",
  token_type: "Bearer", user_id: "user_id"}}

iex> {:ok, [account]} = Monzo.Account.list(client)
{:ok,
 [%Monzo.Account{created: "2008-05-02T19:00:00.000Z",
   description: "Tony Stark", id: "acc_01"}]}

iex> Monzo.Transaction.List(client, account.id)
{:ok,
 [%Monzo.Transaction{account_balance: 10000, amount: -5000, category: "entertainment",
   created: "2008-05-09T18:00:00Z", currency: "GBP", decline_reason: nil,
   description: "AVENGERS LTD", id: "tx_01",
   is_load: true, merchant: "merch_01", metadata: %{}, notes: "",
   settled: "2008-05-09T19:00:00Z"},
  %Monzo.Transaction{account_balance: 4000, amount: -1000, category: "cash",
   created: "2008-05-10T18:00:00Z", currency: "GBP", decline_reason: nil,
   description: "NEW AVENGERS",
   id: "tx_02", is_load: false,
   merchant: "merch_02", metadata: %{}, notes: "",
   settled: "2008-05-10Y19:00:00Z"},

TODO

  • Pagination
  • Attachments
  • Annotate transaction
  • Better support for error code: 405, 406, 429, 500, 504

LICENSE

See LICENSE

monzo_elixir's People

Contributors

stevedomin avatar dependabot[bot] avatar morgz avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.