pub struct Api { /* private fields */ }Expand description
OpenFairDB API
Implementations
sourceimpl Api
impl Api
pub fn new(url: String) -> Self
pub async fn search(&self, txt: &str, bbox: &MapBbox) -> Result<SearchResponse>
pub async fn places(&self, ids: &[String]) -> Result<Vec<Entry>>
pub async fn create_place(&self, place: &NewPlace) -> Result<()>
pub async fn update_place(&self, id: &str, place: &UpdatePlace) -> Result<()>
pub async fn get_places_clearance_with_api_token(
&self,
api_token: &str
) -> Result<Vec<PendingClearanceForPlace>>
pub async fn get_place_history_with_api_token(
&self,
api_token: &str,
id: &str
) -> Result<PlaceHistory>
pub async fn post_places_clearance_with_api_token(
&self,
api_token: &str,
clearances: Vec<ClearanceForPlace>
) -> Result<ResultCount>
pub async fn post_login(&self, req: &Credentials) -> Result<()>
pub async fn post_logout(&self) -> Result<()>
pub async fn get_users_current(&self) -> Result<User>
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Api
impl Send for Api
impl Sync for Api
impl Unpin for Api
impl UnwindSafe for Api
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more