Skip to content

croaker/finapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A client for finAPI's API

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages