pub struct Accounts { /* private fields */ }
Expand description
Accounts client.
This client is used to access the OP AccountsV3 API.
Implementations§
Source§impl Accounts
impl Accounts
Sourcepub fn new(options: Options) -> Accounts
pub fn new(options: Options) -> Accounts
Creates new Accounts client.
Bear in mind that this API is implemented to follow v3 so you must specify v3 as version for the Options.
Sourcepub async fn accounts(&self) -> Result<AccountList, Box<dyn Error>>
pub async fn accounts(&self) -> Result<AccountList, Box<dyn Error>>
Gets all accounts from the API and returns list of them.
Sourcepub async fn account(
&self,
account_id: String,
) -> Result<Account, Box<dyn Error>>
pub async fn account( &self, account_id: String, ) -> Result<Account, Box<dyn Error>>
Gets single account from the API based on accountId.
Sourcepub async fn transactions(
&self,
account_id: String,
params: Option<TransactionParams>,
) -> Result<TransactionList, Box<dyn Error>>
pub async fn transactions( &self, account_id: String, params: Option<TransactionParams>, ) -> Result<TransactionList, Box<dyn Error>>
Gets all transactions for a single account with account id with optional parameters for filtering the results.
Auto Trait Implementations§
impl Freeze for Accounts
impl RefUnwindSafe for Accounts
impl Send for Accounts
impl Sync for Accounts
impl Unpin for Accounts
impl UnwindSafe for Accounts
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more