pub struct BringClient { /* private fields */ }
Implementations§
Source§impl BringClient
impl BringClient
pub fn new(email: String, password: String) -> Self
pub async fn login(&mut self) -> Result<()>
pub async fn load_lists(&self) -> Result<LoadListsResponse>
pub async fn get_items(&self, list_uuid: &str) -> Result<GetItemsResponse>
pub async fn get_items_details( &self, list_uuid: &str, ) -> Result<Vec<GetItemsDetailsEntry>>
pub async fn save_item( &self, list_uuid: &str, item_name: &str, specification: &str, ) -> Result<()>
pub async fn remove_item(&self, list_uuid: &str, item_name: &str) -> Result<()>
pub async fn get_all_users_from_list( &self, list_uuid: &str, ) -> Result<GetAllUsersFromListResponse>
pub async fn load_translations( &self, locale: &str, ) -> Result<HashMap<String, String>>
Sourcepub async fn get_list_id_by_name(
&self,
list_name: &str,
) -> Result<Option<String>>
pub async fn get_list_id_by_name( &self, list_name: &str, ) -> Result<Option<String>>
Gets a list UUID by its name. Returns None if no list with the given name is found. Case-insensitive matching is used for convenience.
§Arguments
list_name
- The name of the list to find
§Returns
Result<Option<String>>
- The UUID of the list if found, None otherwise
§Example
let list_id = client.get_list_id_by_name("Groceries").await?;
if let Some(id) = list_id {
println!("Found list ID: {}", id);
} else {
println!("List not found!");
}
Sourcepub async fn get_list_id_by_name_required(
&self,
list_name: &str,
) -> Result<String>
pub async fn get_list_id_by_name_required( &self, list_name: &str, ) -> Result<String>
Gets a list UUID by its name, returning an error if the list is not found. This is a convenience wrapper around get_list_id_by_name for cases where you expect the list to exist.
§Arguments
list_name
- The name of the list to find
§Returns
Result<String>
- The UUID of the list
§Errors
Returns an error if the list is not found or if there’s an API error
Trait Implementations§
Source§impl Clone for BringClient
impl Clone for BringClient
Source§fn clone(&self) -> BringClient
fn clone(&self) -> BringClient
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for BringClient
impl !RefUnwindSafe for BringClient
impl Send for BringClient
impl Sync for BringClient
impl Unpin for BringClient
impl !UnwindSafe for BringClient
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