gocardless_unofficial/
lib.rs

1//! # Unofficial GoCardless Rust SDK
2//!
3//! [![Crates.io Version](https://img.shields.io/crates/v/gocardless-unofficial)](https://crates.io/crates/gocardless-unofficial)
4//! [![docs.rs](https://img.shields.io/docsrs/gocardless-unofficial)](https://docs.rs/gocardless-unofficial)
5//!
6//! An unofficial rust library to interact with the [GoCardless Bank Account Data API](https://gocardless.com/bank-account-data/).
7//!
8//! ## Usage
9//!
10//! Add the following to `Cargo.toml`
11//! ```toml
12//! [dependencies]
13//! gocardless-unofficial = "0.1"
14//! ```
15//!
16//! ```rs
17//! use gocardless_unofficial::Client;
18//!
19//! #[tokio::main]
20//! pub async fn main() -> Result<(), Box<dyn std::error::Error>> {
21//!     let secret_id = std::env::var("GOCARDLESS_SECRET_ID").unwrap();
22//!     let secret_key = std::env::var("GOCARDLESS_SECRET_KEY").unwrap();
23//!
24//!     let client = Client::new(secret_id, secret_key).await?;
25//!
26//!     // use client to interact with GoCardless!
27//!
28//!     Ok(())
29//! }
30//! ```
31//!
32//! See [here](/examples) for more examples.
33//!
34//! ## Authorization
35//!
36//! Head to the [User Secrets](https://bankaccountdata.gocardless.com/user-secrets/) page, generate a new user secret and copy both the secret ID and secret key.
37//!
38//! Next, pass the secret ID and secret key to the `Client::new` constructor as `String`!
39
40mod model;
41pub use model::*;
42
43mod client;
44pub use client::*;