Struct authy::Client
[−]
[src]
pub struct Client { pub retry_count: u8, pub retry_wait: u16, // some fields omitted }
The Authy REST client.
This allows the rest of this library to interact with the Authy API service.
Fields
retry_count: u8
Configure the client to retry the request retry_count
number of times
when the service is unavailable.
retry_wait: u16
Duration of time to wait between retry attempts.
Methods
impl Client
[src]
fn new(api_url: &str, api_key: &str) -> Client
Create a new client to the Authy service.
fn get(
&self,
prefix: &str,
path: &str,
url_params: Option<Vec<(String, String)>>
) -> Result<(Status, Value), AuthyError>
&self,
prefix: &str,
path: &str,
url_params: Option<Vec<(String, String)>>
) -> Result<(Status, Value), AuthyError>
Send a get
request to the Authy service. This is intended to be used
by the library and not the user.
fn post(
&self,
prefix: &str,
path: &str,
url_params: Option<Vec<(String, String)>>,
post_params: Option<Vec<(String, String)>>
) -> Result<(Status, Value), AuthyError>
&self,
prefix: &str,
path: &str,
url_params: Option<Vec<(String, String)>>,
post_params: Option<Vec<(String, String)>>
) -> Result<(Status, Value), AuthyError>
Send a post
request to the Authy service. This is intended to be used
by the library and not the user.