Struct rewe::models::market_context::MarketContext
source · pub struct MarketContext {
pub market_id: u32,
pub zip_code: String,
pub service_types: MarketService,
}
Expand description
Use the MarketContext to build a simple context for the markt you selected, because the Rewe api needs this data.
Go to rewe.de and select the button Choose market in the top right corner. After you choose your market you will be redirect to a URL that looks like this: https://www.rewe.de/marktseite/erfurt-rieth/2900003/rewe-markt-mainzer-str-39/
. The part between your city and the street (in this example 2900003
) is your market id. You can build a market context now:
let ctx = MarketContext::new(market_id, zip_code);
// in this example:
let ctx = MarketContext::new(2900003, "99089");
Fields§
§market_id: u32
§zip_code: String
§service_types: MarketService
Implementations§
Trait Implementations§
source§impl Clone for MarketContext
impl Clone for MarketContext
source§fn clone(&self) -> MarketContext
fn clone(&self) -> MarketContext
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more