Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/barisbalic/crystal-monzo
A simple Crystal wrapper for the Monzo API.
https://github.com/barisbalic/crystal-monzo
Last synced: about 1 month ago
JSON representation
A simple Crystal wrapper for the Monzo API.
- Host: GitHub
- URL: https://github.com/barisbalic/crystal-monzo
- Owner: barisbalic
- License: mit
- Created: 2016-07-11T00:52:12.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-01-12T21:51:50.000Z (almost 8 years ago)
- Last Synced: 2024-08-03T17:15:17.888Z (4 months ago)
- Language: Crystal
- Homepage:
- Size: 13.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-crystal - crystal-monzo - A client for the [Monzo API](https://monzo.com/docs/) (Third-party APIs)
- awesome-monzo - crystal-monzo - A simple wrapper for the Monzo API (Code & Client Libraries)
README
# crystal-monzo
[![crystal-docs.org](https://crystal-docs.org/badge.svg)](https://crystal-docs.org/barisbalic/crystal-monzo)A [Crystal](https://crystal-lang.org) client for the [Monzo API](https://monzo.com/docs/).
## Installation
Add this to your application's `shard.yml`:
```yaml
dependencies:
crystal-monzo:
github: barisbalic/crystal-monzo
```## Usage
```crystal
require "monzo"client = Monzo.new("SATSUI-NO-HADOU")
client.accounts.each do |account|
balance = client.balance(account)
puts balance.spend_today
end
```The client API follows the documented API reasonably closely, the only significant divergence being that the "who_am_i"
calls are made with `client.identity`. Only because "who_am_i" really annoyed me.## Development
In order to run the tests you will need to set the `MONZO_TOKEN` environment variable to a valid API token. You can
then run the tests with:```sh
MONZO_TOKEN=magicbeans crystal spec
```## Contributing
1. Fork it ( https://github.com/barisbalic/crystal-monzo/fork )
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)
5. Create a new Pull Request## Contributors
- [barisbalic](https://github.com/barisbalic) Baris Balic - creator, maintainer