Struct coinbase::client::Client[][src]

pub struct Client { /* fields omitted */ }

Implementations

impl Client[src]

pub async fn list_accounts(
    &self,
    pagination: &PaginationOptions
) -> Result<PagedResponse<Account>>
[src]

List accounts

Lists current user’s accounts to which the authentication method has access to.

pub async fn get_account(&self, account_id: &str) -> Result<Response<Account>>[src]

Show an account

Show current user’s account. To access the primary account for a given currency, a currency string (BTC or ETH) can be used instead of the account id in the URL.

impl Client[src]

pub fn from_api_key(
    api_key: String,
    api_secret: String
) -> Result<Client, InvalidKeyLength>
[src]

pub fn from_env() -> Result<Client, InvalidKeyLength>[src]

pub async fn send_request<T, U>(
    &self,
    method: Method,
    url: &str,
    req: Option<&T>
) -> Result<U> where
    T: Serialize,
    U: for<'de> Deserialize<'de>, 
[src]

impl Client[src]

pub async fn list_transactions(
    &self,
    account_id: &str,
    pagination: &PaginationOptions
) -> Result<PagedResponse<Transaction>>
[src]

List transactions

Lists account’s transactions. See transaction resource for more information.

pub async fn get_transaction(
    &self,
    account_id: &str,
    transaction_id: &str
) -> Result<Response<Transaction>>
[src]

Show a transaction

Show an individual transaction for an account. See transaction resource for more information.

impl Client[src]

pub async fn get_user(&self, user_id: &str) -> Result<Response<User>>[src]

Show a user

Get any user’s public information with their ID.

pub async fn get_current_user(&self) -> Result<Response<User>>[src]

Show current user

Get current user’s public information.

pub async fn get_auth_info(&self) -> Result<Response<Auth>>[src]

Show authorization information

Get current user’s authorization information including granted scopes and send limits when using OAuth2 authentication.

pub async fn update_user<'a>(
    &self,
    update: &'a UserUpdate<'a>
) -> Result<Response<User>>
[src]

Update current user

Modify current user and their preferences.

Trait Implementations

impl Clone for Client[src]

impl Debug for Client[src]

Auto Trait Implementations

impl !RefUnwindSafe for Client

impl Send for Client

impl Sync for Client

impl Unpin for Client

impl !UnwindSafe for Client

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.