rewe 0.2.1

A rewe mobile api implementation for rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::{models::{product::ProductDetails, market_context::MarketContext}, errors::ReweError, paths::ApiPath};

/// Get details/information for a product by its listing_id in a [`MarketContext`]
pub async fn get_product_details(
    listing_id: &str,
    market_ctx: &MarketContext
) -> Result<ProductDetails, ReweError> {
    ApiPath::ProductDetails.get(&[
        ("marketCode", market_ctx.market_id.to_string().as_str()),
        ("listingId", listing_id),
        ("serviceTypes", market_ctx.service_types.to_str())
    ], None).await
}