GithubHelp home page GithubHelp logo

monzo-lib's Introduction

Monzo

Latest Docs Continuous integration codecov

This crate is a Monzo client in pure rust.

It's ergonomic, strongly-typed, and asynchronous.

In order to use this client, you will first need to get an access token and/or refresh token for the Monzo API (see the monzo API docs)

Usage

use monzo::Client;

#[tokio::main]
async fn main() -> monzo::Result<()> {
    // You can create a simple monzo client using only an access token
    let quick_client = Client::new("ACCESS_TOKEN");

    // get a list of accounts
    let accounts = quick_client.accounts().await?;

    // get the id of one of the accounts
    let account_id = &accounts[0].id;

    // get the balance of that account
    let balance = quick_client.balance(account_id).await?;

    // If you have a refresh token and client credentials
    // you can create or upgrade a client which is capable
    // of refreshing its own access token.
    let mut refreshable_client =
        quick_client.with_refresh_tokens("CLIENT_ID", "CLIENT_SECRET", "REFRESH_TOKEN");

    refreshable_client.refresh_auth().await?;

    Ok(())
}

Contributing

see the following issue tags for good starting points for contributions

or checkout the project board

There are a couple of small gaps in the API surface, but the majority of the endpoints are already supported. If you need a piece of functionality that is not yet implemented, please open an issue or even better, a pull request.


License: Apache-2.0

monzo-lib's People

Contributors

danieleades avatar dependabot[bot] avatar github-actions[bot] avatar dewaldv avatar bred1810 avatar obbardc avatar reivilibre avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.