vinted_rs/
model.rs

1/*!
2 * The `model` module provides abstraction and serialization for the request and result
3 * objects of the Vinted API queries.
4 */
5
6/// The `filter` module provides structures and enums for filtering items in the Vinted API.
7///
8pub mod filter;
9
10/// The `item` module provides the `Item` struct representing an item in the Vinted API.
11///
12/// It depends on the `photo` module for handling item photos.
13///
14/// # Structs
15///
16/// - `Item`: Represents an item in the Vinted API.
17///    - `id`: The ID of the item.
18///    - `title`: The title of the item.
19///    - `size_title`: The size title of the item.
20///    - `brand_title`: The brand title of the item.
21///    - `currency`: The currency used for the item price.
22///    - `price`: The price of the item.
23///    - `photo`: The photo of the item.
24///    - `url`: The URL of the item.
25///    - `is_visible`: A flag indicating if the item is visible.
26///    - `promoted`: A flag indicating if the item is promoted.
27///    - `favourite_count`: The count of favorites for the item.
28pub mod item;
29
30/// The `items` module provides the `Items` struct representing a collection of items in the Vinted API.
31///
32/// It depends on the `item` module for representing individual items.
33///
34/// # Structs
35///
36/// - `Items`: Represents a collection of items in the Vinted API.
37///    - `items`: The list of items.
38///    - `pagination`: Pagination metadata of the query
39/// - `Pagination`: Some query metadata about the data given
40///
41/// # Methods
42///
43/// - `new(items: Vec<Item>) -> Self`: Creates a new instance of `Items` with the provided list of items.
44pub mod items;
45
46/// The `photo` module provides the `Photo` struct representing a photo in the Vinted API.
47///
48/// # Structs
49///
50/// - `Photo`: Represents a photo in the Vinted API.
51///    - `id`: The ID of the photo.
52///    - `url`: The URL of the photo.
53///    - `dominant_color`: The dominant color of the photo.
54///    - `dominant_color_opaque`: The opaque dominant color of the photo.
55pub mod photo;
56
57/// Reprents a valid payment method accepted by a user
58pub mod payment_method;
59/// The `User` struct represents a user in the Vinted API.
60///
61/// It depends on the `photo` module for handling user photos.
62///
63/// # Struct Fields
64///
65/// - `id`: The ID of the user.
66/// - `login`: The username of the user.
67/// - `photo`: The photo of the user.
68pub mod user;
69
70/// Serde configuration attributes to handle wrongly typed items
71pub mod serde_config;
72
73#[cfg(feature = "redis")]
74pub use redis_macros::{FromRedisValue, ToRedisArgs};
75pub use serde::{Deserialize, Serialize};