pub struct Client { /* private fields */ }Expand description
Client for the auto-api.com car listings API.
Implementations§
Source§impl Client
impl Client
Sourcepub fn set_base_url(&mut self, base_url: &str)
pub fn set_base_url(&mut self, base_url: &str)
Sets a custom base URL.
Sourcepub fn set_api_version(&mut self, version: &str)
pub fn set_api_version(&mut self, version: &str)
Sets a custom API version (default: “v2”).
Sourcepub async fn get_filters(&self, source: &str) -> Result<Value, Error>
pub async fn get_filters(&self, source: &str) -> Result<Value, Error>
Returns available filters for a source (brands, models, body types, etc.)
Sourcepub async fn get_offers(
&self,
source: &str,
params: &OffersParams,
) -> Result<OffersResponse, Error>
pub async fn get_offers( &self, source: &str, params: &OffersParams, ) -> Result<OffersResponse, Error>
Returns a paginated list of offers with optional filters.
Sourcepub async fn get_offer(
&self,
source: &str,
inner_id: &str,
) -> Result<OffersResponse, Error>
pub async fn get_offer( &self, source: &str, inner_id: &str, ) -> Result<OffersResponse, Error>
Returns a single offer by inner_id.
Sourcepub async fn get_change_id(
&self,
source: &str,
date: &str,
) -> Result<i64, Error>
pub async fn get_change_id( &self, source: &str, date: &str, ) -> Result<i64, Error>
Returns a change_id for the given date (format: yyyy-mm-dd).
Sourcepub async fn get_changes(
&self,
source: &str,
change_id: i64,
) -> Result<ChangesResponse, Error>
pub async fn get_changes( &self, source: &str, change_id: i64, ) -> Result<ChangesResponse, Error>
Returns a changes feed (added/changed/removed) starting from change_id.
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnsafeUnpin for Client
impl !UnwindSafe for Client
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