pub struct Client { /* private fields */ }
Implementations§
Source§impl Client
impl Client
pub fn new( consumer_key: &str, consumer_secret: &str, access_key: &str, access_secret: &str, timeout_sec: Option<Duration>, ) -> Self
pub fn new_by_env() -> Result<Self, VarError>
pub async fn get( &self, url: &str, query_options: &Vec<(&str, &str)>, ) -> Result<Response, Error>
pub async fn post( &self, url: &str, query_options: &Vec<(&str, &str)>, form_options: &Vec<(&str, &str)>, ) -> Result<Response, Error>
pub async fn json( &self, url: &str, query_options: &Vec<(&str, &str)>, data: &Value, ) -> Result<Response, Error>
pub async fn put( &self, url: &str, query_options: &Vec<(&str, &str)>, ) -> Result<Response, Error>
pub async fn delete( &self, url: &str, query_options: &Vec<(&str, &str)>, ) -> Result<Response, Error>
pub async fn multipart( &self, url: &str, query_options: &Vec<(&str, &str)>, data: Form, ) -> Result<Response, Error>
Auto Trait Implementations§
impl Freeze for Client
impl RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnwindSafe for Client
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