[−][src]Struct hackgt_nfc::api::CheckinAPI
Methods
impl CheckinAPI
[src]
An implementation of the HackGT Check-In API
pub fn login(username: &str, password: &str, url: &str) -> Result<Self, Error>
[src]
Log into the API using a username / password combination provided to you
Note: this will block for a few seconds because the server has a high PBKDF2 iteration count by default
pub fn from_token(auth_token: String, url: &str) -> Self
[src]
Create an API instance directly from an auth token
Can be used to instantly resume an API instance after having obtained a token previously
pub fn auth_token(&self) -> &str
[src]
pub fn add_user(&self, username: &str, password: &str) -> Result<(), Error>
[src]
Creates a new user with the provided username / password combination
Can be used to provision sub-devices like with checkin-embedded
pub fn delete_user(&self, username: &str) -> Result<(), Error>
[src]
pub fn check_in(&self, uuid: &str, tag: &str) -> Result<CheckInReturn, Error>
[src]
Check a user into a tag
Returns a three item tuple containing:
- Check in success (true / false)
- User information
- Tag information (for the tag specified)
pub fn check_out(&self, uuid: &str, tag: &str) -> Result<CheckInReturn, Error>
[src]
Check a user out of tag
See documentation for check_in
for more details
pub fn get_tags_names(&self, only_current: bool) -> Result<Vec<String>, Error>
[src]
Get a list of tag names from the check-in instance
Can optionally be filtered to only include tags that are currently active (computed from start
/ end
attributes in check-in database)
Auto Trait Implementations
impl !RefUnwindSafe for CheckinAPI
impl Send for CheckinAPI
impl Sync for CheckinAPI
impl Unpin for CheckinAPI
impl !UnwindSafe for CheckinAPI
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, 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>,