pub struct Client { /* private fields */ }Expand description
CSFloat API Client
Implementations§
Source§impl Client
impl Client
Sourcepub fn new(api_key: impl Into<String>) -> Result<Self>
pub fn new(api_key: impl Into<String>) -> Result<Self>
Create a new CSFloat client with API key
Sourcepub fn with_proxy(
api_key: impl Into<String>,
proxy_url: impl AsRef<str>,
) -> Result<Self>
pub fn with_proxy( api_key: impl Into<String>, proxy_url: impl AsRef<str>, ) -> Result<Self>
Create a new CSFloat client with API key and proxy
Sourcepub async fn get_exchange_rates(&self) -> Result<ExchangeRates>
pub async fn get_exchange_rates(&self) -> Result<ExchangeRates>
Get exchange rates
Sourcepub async fn get_location(&self) -> Result<Value>
pub async fn get_location(&self) -> Result<Value>
Get user’s location
Sourcepub async fn get_account_standing(&self) -> Result<Value>
pub async fn get_account_standing(&self) -> Result<Value>
Get account standing
Sourcepub async fn get_pending_trades(&self, limit: u32, page: u32) -> Result<Value>
pub async fn get_pending_trades(&self, limit: u32, page: u32) -> Result<Value>
Get pending trades
Sourcepub async fn get_buy_orders(
&self,
listing_id: &str,
limit: u32,
) -> Result<Vec<BuyOrder>>
pub async fn get_buy_orders( &self, listing_id: &str, limit: u32, ) -> Result<Vec<BuyOrder>>
Get buy orders for a listing
Sourcepub async fn get_my_buy_orders(&self, page: u32, limit: u32) -> Result<Value>
pub async fn get_my_buy_orders(&self, page: u32, limit: u32) -> Result<Value>
Get user’s own buy orders
Sourcepub async fn get_sales(
&self,
market_hash_name: &str,
paint_index: Option<i32>,
) -> Result<Value>
pub async fn get_sales( &self, market_hash_name: &str, paint_index: Option<i32>, ) -> Result<Value>
Get sales history
Sourcepub async fn get_schema(&self) -> Result<SchemaResponse>
pub async fn get_schema(&self) -> Result<SchemaResponse>
Get schema with weapon pricing data This endpoint returns average prices for each skin in different wear conditions
Sourcepub fn get_all_listings(&self) -> ListingsRequestBuilder<'_>
pub fn get_all_listings(&self) -> ListingsRequestBuilder<'_>
Get all listings with builder pattern
Sourcepub async fn get_specific_listing(&self, listing_id: &str) -> Result<Listing>
pub async fn get_specific_listing(&self, listing_id: &str) -> Result<Listing>
Get specific listing
Sourcepub async fn get_inventory(&self) -> Result<Value>
pub async fn get_inventory(&self) -> Result<Value>
Get inventory
Sourcepub async fn get_watchlist(&self, limit: u32) -> Result<Value>
pub async fn get_watchlist(&self, limit: u32) -> Result<Value>
Get watchlist
Sourcepub async fn get_offers(&self, limit: u32) -> Result<Value>
pub async fn get_offers(&self, limit: u32) -> Result<Value>
Get offers
Sourcepub async fn get_trade_history(
&self,
role: TradeRole,
limit: u32,
page: u32,
) -> Result<Value>
pub async fn get_trade_history( &self, role: TradeRole, limit: u32, page: u32, ) -> Result<Value>
Get trade history
Sourcepub async fn delete_listing(&self, listing_id: &str) -> Result<Value>
pub async fn delete_listing(&self, listing_id: &str) -> Result<Value>
Delete a listing
Sourcepub async fn delete_buy_order(&self, id: &str) -> Result<Value>
pub async fn delete_buy_order(&self, id: &str) -> Result<Value>
Delete a buy order
Sourcepub async fn delete_watchlist(&self, id: i64) -> Result<Value>
pub async fn delete_watchlist(&self, id: i64) -> Result<Value>
Delete from watchlist
Sourcepub async fn create_listing(
&self,
request: CreateListingRequest,
) -> Result<Value>
pub async fn create_listing( &self, request: CreateListingRequest, ) -> Result<Value>
Create a listing
Sourcepub async fn create_buy_order(
&self,
request: CreateBuyOrderRequest,
) -> Result<Value>
pub async fn create_buy_order( &self, request: CreateBuyOrderRequest, ) -> Result<Value>
Create a buy order
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin 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