[−][src]Struct rustoa::Client
Implementations
impl Client
[src]
pub fn new(api_key: &str) -> Client
[src]
Create a new Client object.
Arguments
api_key
- Your Orange Alliance API key as aString
.
It returns a Client object.
pub fn api_version(&self) -> String
[src]
Get the version of The Orange Alliance API that this crate is using. This method takes no arguments and returns the version as a String.
Panics
This method can panic in three ways:
- The HTTP request to the API fails. This can be because the API is either down or you are being ratelimited.
- Serde cannot properly deserialize the JSON data in the response. This happens because the API has sent invalid JSON.
- The HashMap does not have the needed keys to process the data. This happens because the request was made to the wrong target or the API has sent back an error in JSON form.
pub fn team(&self, team_number: u32) -> Team
[src]
Trait Implementations
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]
T: 'static + ?Sized,
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> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut 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>,