From 4fff6fa041263b9bc4a990d2609134912d126870 Mon Sep 17 00:00:00 2001 From: Jared Smith Date: Sun, 13 Oct 2019 16:42:06 -0700 Subject: [PATCH] :memo: Updated README.md --- README.md | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 4caac74..fac46ac 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,11 @@ # monzo.cr -TODO: Write a description here +[![Build Status](https://travis-ci.org/jaredsmithse/monzo.cr.svg?branch=master)](https://travis-ci.org/jaredsmithse/monzo.cr) +[![GitHub license](https://img.shields.io/github/license/c910335/mass-spec.svg)](https://github.com/c910335/mass-spec/blob/master/LICENSE) +[![GitHub release](https://img.shields.io/github/release/jaredsmithse/monzo.svg)](https://github.com/jaredsmithse/monzo/releases) + +The Monzo API is designed to be a predictable and intuitive interface for interacting with users’ accounts. +This is an API wrapper client for Monzo. It is still under construction and all help is welcome! ## Installation @@ -9,26 +14,40 @@ TODO: Write a description here ```yaml dependencies: monzo.cr: - github: your-github-user/monzo.cr + github: jaredsmithse/monzo.cr ``` 2. Run `shards install` ## Usage +#### Configuration +Instructions for obtaining your own API token can be found on the Monzo documentation website [here](https://docs.monzo.com/#authentication). ```crystal -require "monzo.cr" +require "monzo" + +Monzo::Client.configure do |settings| + settings.access_token = monzo_access_token + settings.base_url = "https://api.monzo.com" +end +client = Monzo::Client ``` -TODO: Write usage instructions here +#### Getting All Accounts Belonging To You +```crystal +client = Monzo::Client +accounts = client.budgets.get_all.each do |budget| + puts account.name +end +``` ## Development -TODO: Write development instructions here +For development, you will need a personal access token from Monzo. You can find instructions on how to acquire one for your account [here](https://docs.monzo.com/#authentication). ## Contributing -1. Fork it () +1. Fork it () 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Add some feature'`) 4. Push to the branch (`git push origin my-new-feature`) @@ -36,4 +55,4 @@ TODO: Write development instructions here ## Contributors -- [your-name-here](https://github.com/your-github-user) - creator and maintainer +- [@jaredsmithse](https://github.com/jaredsmithse) Jared Smith - creator, maintainer