Skip to content

Latest commit

 

History

History
40 lines (29 loc) · 1.2 KB

README.md

File metadata and controls

40 lines (29 loc) · 1.2 KB

finAPI Client

The client generated by swagger-codegen is messy and hard to use because it implements a lot of features like models with validations and so on.

This is an attempt to create a more light-weight, rubyesque client for the API. The design is heavily inspired by Ismael Celis' Writing a Hypermedia Client in Ruby. Thanks for the article!

How To

Since there aren't many endpoints supported at the moment, the only real use-case is to retrieve a user's transactions from the API. To do so you must add a new user to your finAPI account using other means than this client (e.g. the sandbox @ https://sandbox.finapi.io). Once you have a user, you can initialize a new session using the user's token:

# Initialize a new session
session = FinAPI::Session.new("USERS_API_TOKEN")

You can then retrieve the users transactions like this:

# Retrieve a single transaction by ID
session.transactions.find(123)

# Retrieve an interable collection of transactions
session.transactions.all

The #all method supports additional parameters as by the API spec.

Supported Endpoints

GET /transactions/{id} GET /transactions