amazon_spapi/client_apis/
seller_v1.rs1use crate::{
2 client::{ApiEndpoint, ApiMethod, SpapiClient},
3 models::sellers::{GetAccountResponse, GetMarketplaceParticipationsResponse},
4};
5use anyhow::Result;
6
7impl SpapiClient {
8 pub async fn get_marketplace_participations(
9 &self,
10 ) -> Result<GetMarketplaceParticipationsResponse> {
11 let configuration = self.create_configuration().await?;
12 let _ = self
13 .limiter()
14 .wait("/sellers/v1/marketplaceParticipations", 0.016, 15)
15 .await?;
16 let res = crate::apis::sellers_api::get_marketplace_participations(&configuration).await?;
17 Ok(res)
18 }
19
20 pub async fn get_account(&self) -> Result<GetAccountResponse> {
21 let endpoint = ApiEndpoint {
22 version: "sellers_v1",
23 path: "/sellers/v1/account",
24 path_params: None,
25 method: ApiMethod::Get,
26 rate: 0.016,
27 burst: 15,
28 };
29 let res = self.request(&endpoint, None, None, None).await?;
30 Self::from_json(&res)
31 }
32}