Skip to main content

amazon_spapi/client_apis/
catalog_items_v0.rs

1use crate::{client::SpapiClient, models};
2use anyhow::Result;
3
4impl SpapiClient {
5    /// Returns the parent categories to which an item belongs, based on the specified ASIN or SellerSKU.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 2 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).
6    pub async fn list_catalog_categories(
7        &self,
8        marketplace_id: &str,
9        asin: Option<&str>,
10        seller_sku: Option<&str>,
11    ) -> Result<models::catalog_items_v0::ListCatalogCategoriesResponse> {
12        let configuration = self.create_configuration().await?;
13        let guard = self
14            .limiter()
15            .wait("/catalog/v0/listCatalogCategories", 1.0, 2)
16            .await?;
17        let res = crate::apis::catalog_items_v0::list_catalog_categories(
18            &configuration,
19            marketplace_id,
20            asin,
21            seller_sku,
22        )
23        .await?;
24        guard.mark_response().await;
25        Ok(res)
26    }
27}