Skip to content

Latest commit

 

History

History

up-bank-api

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

up-bank-api

A Haskell wrapper for the Up Bank API ⚡. Provides client functions with servant-client.

Features

  • Accounts
  • Categories
  • Tags
  • Transactions
  • Webhooks

Usage

Check out src/Demo.hs for an example program and src/Up/API.hs to see the implemented client functions.

$ git clone https://github.com/ldgrp/up-bank-hs.git
$ cd up-bank-hs
$ UP_BANK_TOKEN=up:yeah:TOKEN cabal run

Demo.hs expects an UP_BANK_TOKEN environemnt variable. Get your personal access token here.

All client functions f which return paginated responses ClientM (Paginated a) have an unpaginated version f_ which will unfold the paginated response to a list ClientM [a].

run :: IO ()
run = do
    -- Retrieve the full list of transactions across all accounts.
    res <- query (listTransactions_ Nothing Nothing Nothing Nothing)
    BLC.putStrLn $ encodePretty res
      
main :: IO ()
main = run