[−][src]Struct monzo_lib::Client
Monzo Client
Methods
impl Client
[src]
pub fn new(access_token: impl Into<String>) -> Self
[src]
Returns a new Monzo Client.
For more fine-grained control over the client configuration, see the builder API.
pub fn builder() -> ClientBuilder
[src]
return a ClientBuilder for configuring a new Client
The builder API can be used for more fine-grained control over the configuration of the client.
Example
use monzo_lib::Client; #[tokio::main] let client = Client::builder() .access_token("ACCESS_TOKEN") .refresh_token("REFRESH_TOKEN") .build();
pub async fn accounts<'_>(&'_ self) -> Result<Accounts>
[src]
Return a list of bank accounts associated with the Monzo account
Example
#[tokio::main] let accounts = client.accounts().await?;
pub async fn balance<'_>(
&'_ self,
account_id: impl AsRef<str>
) -> Result<Balance>
[src]
&'_ self,
account_id: impl AsRef<str>
) -> Result<Balance>
Return the balance of a given account
Example
#[tokio::main] let account_balance = client.balance("ACCOUNT_ID").await?;
pub async fn pots<'_>(&'_ self) -> Result<Pots>
[src]
Auto Trait Implementations
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
impl !RefUnwindSafe for Client
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,