rewerse

package
v0.0.0-...-ac044ca Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 11, 2025 License: MIT Imports: 11 Imported by: 0

README

pkg

Go Reference

This Go Package implements some of the endpoints used by the Rewe app. The following functions are currently available:

  • MarketSearch: Search for Rewe markets using city, street, PLZ, market name, etc. Returns a list of markets with some basic information.
  • GetMarketDetails: Get details about a specific market using the unique market-id.
  • GetDiscountsRaw: Get all discounts for a specific market using the unique market-id. Returns the raw response parsed into a struct.
  • GetDiscounts: Get all discounts for a specific market using the unique market-id. Returns data cleaned of information deemed unnecessary by me (maybe opinionated).
  • GetCoupons: Get all global coupons. Returns raw data parsed into structs. I have no idea, what exactly the data means, but it's there. Open an issue if you have details.
  • GetRecalls: Get product recalls.
  • GetRecipeHub: Returns data from the recipe-page in the Rewe app.
  • GetShopOverview: Returns Recalls (again) and the Product-Categories available in the given market. Only available for markets who are pickup- or delivery-enabled.
  • GetCategoryProducts: Returns all products in a given category. Only available for markets who are pickup- or delivery-enabled.
  • GetProducts: Returns all products for a given query. Only available for markets who are pickup- or delivery-enabled.

Usage

To use any of the functions, the certificate of the Rewe app must be provided:

err := rewerse.SetCertificate("certificate.pem", "private.key")
if err != nil {
    panic(err)
}

I have written very basic string-functions for all structs except RawDiscounts, which allows printing the data to console easily. Below are examples of the data:

MarketSearch:

markets, _ := rewerse.MarketSearch("Köln")
fmt.Println(markets)
1763153: REWE Andrea Flammuth oHG, Kölner Str. 26, 50859 Köln / Lövenich
1763107: REWE Richrath SM GmbH & Co. oHG, Rhöndorfer Str. 17, 50939 Köln / Klettenberg
8100134: REWE Kelterbaum oHG, Rudolfplatz 9, 50674 Köln
1940357: REWE Holger Bertram oHG, Aachener Str. 1253, 50858 Köln / Weiden
1940281: REWE Silke Huerten oHG, Hohe Str. 30, 50667 Köln / Altstadt
1765268: REWE Markt Björn Rohe oHG, Bergisch Gladbacher Str. 667, 51067 Köln / Holweide
1765091: REWE Peter Ziegler oHG, Neusser Str. 100, 50670 Köln / Neustadt-Nord
1478368: S-Mart Lebensmittel Märkte GmbH & Co. KG, Sülzgürtel 47, 50937 Köln / Sülz
[...]

GetMarketDetails:

market, _ := rewerse.GetMarketDetails("1763153")
fmt.Println(market)
---Allgemein---------------------------------------------------
   ID:                    1763153
   Name:                  REWE Andrea Flammuth oHG
   Type-ID:               MARKET
   Standort:              Kölner Str. 26, 50859 Köln / Lövenich (50.9463, 6.8336)
   Tel-Nr:                02234-9489945
   Rohdaten:              {"attributes":[],"postalCode":"50859","city":"Köln / Lövenich"}

---Öffnungszeiten---------------------------------------------
   Aktell:                Geschlossen
   Nächste Änderung:      Öffnet am Sa, 07:00 (Typ: OPENS_NEXT_DAY)
   Wochenübersicht:       [{"days":"Mo - Sa","hours":"07:00 - 22:00"}]
   Besonderheiten:        []

---Verschiedenes-----------------------------------------------
   Features:              [] []
   Services:              []
   Aktionen:              [{ROUTE Route berechnen} {CALL Markt anrufen} {RATE Markt bewerten}]
   Bewertungs-URL:        https://meinfeedback.rewe.de/app/?p1=1763153&p2=2024-06-21T21:13:35Z&app=android
   Lieferservice:         false

GetDiscountsRaw:

discounts, _ := rewerse.GetDiscountsRaw("1763153")
fmt.Println(discounts)

Outputs data in the format of the struct RawDiscounts.

GetDiscounts:

discounts, _ := rewerse.GetDiscounts("1763153")
fmt.Println(discounts)
Top-Angebote in deinem Markt
    Philadelphia, 0.95€
    Gustavo Gusto Pizza Margherita, 3.49€
    [...]
Anpfiff zum Sparen!
    Salakis Schafskäse Natur, 1.79€
    Lorenz Saltletts Pausen Cracker, 1.49€
    [...]
Obst und Gemüse
    Dunkle Tafeltrauben, 1.49€
    Aubergine, 1.00€
    [...]
PAYBACK Punkte Highlights
    Meggle Produkten, 0.00€
    Jacobs Kaffeekapseln, 0.00€

[...]

Discounts can be reordered by product category:

discounts, _ := rewerse.GetDiscounts("1763153")
discounts = discounts.GroupByProductCategory()
fmt.Println(discounts)
Garten & Outdoor
    Lavendel, 1.99€
    Schleierkraut-Duo, 1.69€
    [...]
Tiefkühl
    Gustavo Gusto Pizza Margherita, 3.49€
    Mövenpick Bourbon Vanille, 1.99€
    [...]
Süßes & Salziges
    Ritter Sport Schokolade, 0.88€
    Chio Tortillas, 1.11€
    [...]
Küche & Haushalt
    Somat Excellence Geschirrreiniger, 7.77€
    Somat Excellence Geschirrreiniger, 7.77€
    [...]
 
[...]

GetCoupons:

oneScanCoupons, coupons, _ := rewerse.GetCoupons()
fmt.Println(oneScanCoupons)
fmt.Println(coupons)

They are probably the same but in different formats. Not sure, I never used them. Let me know :)

Got 16 OneScan-Coupons

auf alle REWE Beste Wahl Produkte
Dieser Coupon kann pro Einkauf nur einmal eingelöst werden und ist nicht mit anderen Aktionen oder Gutscheinen kombinierbar.  *Dieser Coupon gilt nur in der REWE App und beim Kauf von mindestens zwei REWE Beste Wahl Produkten. Ausgenommen sind Aktionsartikel. Gültig vom 10.06. - 23.06.2024. Der Coupon ist nicht bei REWE nahkauf einlösbar. Eine Barauszahlung ist nicht möglich. Dieser Coupon ist auch einlösbar im REWE Lieferservice (ggf. abweichende Angebote) und REWE Abholservice. Bei REWE Lieferservice Bestellungen ist der Tag der Lieferung und bei REWE Abholservice Bestellungen der Tag der Abholung (nicht der Bestellung) maßgeblich.Gültig bis 23.06.2024
default_provider

Ritter Sport Schokolade versch. Sorten
Dieser Coupon kann pro Einkauf nur einmal eingelöst werden und ist nicht mit anderen Aktionen oder Gutscheinen kombinierbar.  *Dieser Coupon ist nicht bei REWE nahkauf einlösbar. Der Coupon ist nur beim Kauf von Ritter Sport Schokolade versch. Sorten je 100 g Tafel (1 kg = 7.70) gültig. Eine Barauszahlung ist nicht möglich. Keine Mehrfachrabattierung des gleichen Artikels durch gleichen oder weiteren Coupon möglich. Nur solange der Vorrat reicht. Änderungen im Sortiment vorbehalten. Produkte können ggf. nicht in allen Märkten erhältlich sein. Dieser Coupon ist auch einlösbar im REWE Lieferservice (ggf. abweichende Angebote) und REWE Abholservice. Bei REWE Lieferservice Bestellungen ist der Tag der Lieferung und bei REWE Abholservice Bestellungen der Tag der Abholung (nicht der Bestellung) maßgeblich.Gültig bis 23.06.2024
default_provider

[...]


Got 16 Coupons

auf alle REWE Beste Wahl Produkte // 5% Rabatt*
Beim Kauf von mindestens 2 Produkten

Ritter Sport Schokolade versch. Sorten // Knaller 0.77 € statt Aktionspreis 0.88 €!*
je 100 g Tafel (1 kg = 7.70)

[...]

GetRecalls:

recalls, _ := rewerse.GetRecalls()
fmt.Println(recalls)
Recalls:
Vorsorglicher Produktrückruf von „ja! Basilikum gerebelt“
Mögliche mikrobielle Verunreinigung durch Salmonellen
https://mediacenter.rewe.de/produktrueckrufe/ja-basilikum-gerebelt

Vorsorglicher Produktrückruf von ELVIS Minze Zartbitter 400 ml
Das Produkt enthält eine fehlerhafte Allergenkennzeichnung auf der Vorderseite und auf der Rückseite.
https://mediacenter.rewe.de/produktrueckrufe/elvis-minze-zartbitter-400-ml

GetRecipeHub:

recipes, _ := rewerse.GetRecipeHub()
fmt.Println(recipes)
Recipe Hub

Recipe of the Day
--------------------
Kräuter-Fisch auf Bandnudeln
40 min
Einfach
https://www.rewe.de/rezepte/kraeuter-fisch-bandnudeln/

Popular Recipes
--------------------
Kräuter-Fisch auf Bandnudeln
40 min
Einfach
https://www.rewe.de/rezepte/kraeuter-fisch-bandnudeln/

Hähnchen Marinade Honig-Senf
15 min
Einfach
https://www.rewe.de/rezepte/haehnchen-marinade-honig-senf/

[...]

Available Categories
--------------------
Vegetarisch
Fleisch
Backen
Nachspeisen
Fisch
Vorspeisen
Kuchen

GetShopOverview:

so, _ := rewerse.GetShopOverview("831002")
fmt.Println(so.StringAll())
---Grillsaison-------------------------------------------------
   ID:                    3752
   Name:                  Grillsaison
   Slug:                  grillsaison
   ProductCount:          475
   ImageURL:              https://shop.rewe-static.de/mobile/categories/images/v2/3752.png
   Child-Amnt:            8
   Children:
      Grillfleisch & -fisch
         ID:                    3753
         Name:                  Grillfleisch & -fisch
         Slug:                  grillfleisch-fisch
         ProductCount:          87
         ImageURL:              https://shop.rewe-static.de/mobile/categories/images/v2/3753.png
         Child-Amnt:            5
         Children:
            Bratwürstchen
               ID:                    3754
               Name:                  Bratwürstchen
               Slug:                  bratwuerstchen
               ProductCount:          14
               ImageURL:              https://shop.rewe-static.de/mobile/categories/images/v2/3754.png
               Child-Amnt:            0
               [...]

GetCategoryProducts:

cs, _ := rewerse.GetCategoryProducts("831002", "bratwuerstchen", nil)
fmt.Println(cs)
Products for query *
Page 1 of 1
---------------------------------------------------------------
Wiesenhof Bruzzzler 400g
Wilhelm Brandenburg Rostbratwürstchen 200g
REWE Bio Original Nürnberger Rostbratwürstchen 160g
REWE Feine Welt Salsiccia Peperoncino 300g
Wolf Berner Würstchen 250g, 3 Stück
Wilhelm Brandenburg Metzgerbratwurst mittelgrob 400g
Steinhaus Krakauer mit Emmentaler geräuchert 500g
Die Thüringer Rostbratwurst 500g
[...]

GetProducts:

pr, _ := rewerse.GetProducts("831002", "paprika", nil)
fmt.Println(pr)
Products for query paprika
Page 1 of 9
---------------------------------------------------------------
Paprika rot 500g
Spitzpaprika gelb 500g
Spitzpaprika rot 500g
Paprika Mix 500g
Paprika rot ca. 250g
Bio Paprika 400g
[...]

Documentation

Overview

Package rewerse provides a simple interface to interact with the REWE API. Only Getters are implemented.

Index

Constants

This section is empty.

Variables

View Source
var (
	Client *http.Client
)

Functions

func BuildCustomRequest

func BuildCustomRequest(host, path string) (req *http.Request, err error)

func CloseWithWrap

func CloseWithWrap(f io.Closer, e *error)

func DoRequest

func DoRequest(req *http.Request, dest any) (err error)

func GetCoupons

func GetCoupons() (oc OneScanCoupons, c Coupons, err error)

GetCoupons returns all available coupons There are two differerent coupons-structs: OneScanCoupons and Coupons I'm not sure what the difference is and I don't really care either. Please let me know!

func SetCertificate

func SetCertificate(clientCert, clientKey string) error

Types

type CloseError

type CloseError struct {
	OriginalError, CloseError error
}

func (CloseError) Error

func (c CloseError) Error() string

type Coupons

type Coupons struct {
	Data struct {
		GetCoupons struct {
			CouponStatus string `json:"couponStatus"`
			PaybackEwe   any    `json:"paybackEwe"`
			Coupons      []struct {
				CouponID   int    `json:"couponId"`
				CouponType string `json:"couponType"`
				Title      string `json:"title"`
				Subtitle   string `json:"subtitle"`
				Validity   struct {
					ValidFrom time.Time `json:"validFrom"`
					ValidTo   time.Time `json:"validTo"`
				} `json:"validity"`
				ProductLogo string `json:"productLogo"`
				Description struct {
					RedeemDescription any    `json:"redeemDescription"`
					Combinability     string `json:"combinability"`
					Validity          any    `json:"validity"`
					TermsOfUse        string `json:"termsOfUse"`
					Disclaimer        any    `json:"disclaimer"`
				} `json:"description"`
				OfferTitle            string `json:"offerTitle"`
				DisplayClassification any    `json:"displayClassification"`
				CouponDetails         any    `json:"couponDetails"`
				Activated             any    `json:"activated"`
				Preview               any    `json:"preview"`
				IsNew                 any    `json:"isNew"`
			} `json:"coupons"`
		} `json:"getCoupons"`
	} `json:"data"`
	Extensions struct {
		HTTP []struct {
			Path         []string `json:"path"`
			Message      string   `json:"message"`
			StatusCode   int      `json:"statusCode"`
			ResponseBody any      `json:"responseBody"`
		} `json:"http"`
	} `json:"extensions"`
}

Coupons is a struct for the raw data returned by the Coupons endpoint

func (Coupons) String

func (cs Coupons) String() string

type Discount

type Discount struct {
	Title           string
	Subtitle        string
	Images          []string
	PriceRaw        string
	Price           float64
	Manufacturer    string
	ArticleNo       string
	NutriScore      string
	ProductCategory string
}

Discount is the actual discount with some of the information provided by rewe.

type DiscountCategory

type DiscountCategory struct {
	ID     string
	Title  string
	Index  int
	Offers []Discount
}

DiscountCategory is the category defined by rewe for the presentation of the discounts. It contains an index for sorting the categories in their intended order and the actual discounts. Calling GroupByProductCategory reorders the discounts by their product category (z. B. "Nahrungsmittel").

type Discounts

type Discounts struct {
	Categories []DiscountCategory
	ValidUntil time.Time
}

Discounts is the struct that holds cleaned up discount data.

func GetDiscounts

func GetDiscounts(marketID string) (ds Discounts, err error)

GetDiscounts returns the discounts from the API with less bloat. It contains the discount categories, which in turn contain the actual discounts. I removed various parameters I deemed unnecessary and parsed into different datatypes where it made sense to me. The struct Discounts also provides some helper methods.

func (Discounts) GroupByProductCategory

func (d Discounts) GroupByProductCategory() Discounts

GroupByProductCategory groups the discounts by their product category and returns the results.

func (Discounts) String

func (d Discounts) String() string

type Market

type Market struct {
	ID           string `json:"id"`
	Name         string `json:"name"`
	AddressLine1 string `json:"addressLine1"`
	RawValues    struct {
		PostalCode string `json:"postalCode"`
		City       string `json:"city"`
	} `json:"rawValues"`
}

Market represents a single search result

func (Market) String

func (m Market) String() string

type MarketDetails

type MarketDetails struct {
	MarketItem struct {
		ID                string `json:"id"`
		Name              string `json:"name"`
		TypeID            string `json:"typeId"`
		AddressLine1      string `json:"addressLine1"`
		AddressLine2      string `json:"addressLine2"`
		OpeningInfo       string `json:"openingInfo"`
		OpeningInfoPrefix string `json:"openingInfoPrefix"`
		OpeningType       string `json:"openingType"`
		FeatureTypes      []any  `json:"featureTypes"`
		Location          struct {
			Latitude  float64 `json:"latitude"`
			Longitude float64 `json:"longitude"`
		} `json:"location"`
		RawValues struct {
			Attributes []any  `json:"attributes"`
			PostalCode string `json:"postalCode"`
			City       string `json:"city"`
		} `json:"rawValues"`
	} `json:"marketItem"`
	Phone        string `json:"phone"`
	RatingURL    string `json:"ratingUrl"`
	IsLSFK       bool   `json:"isLSFK"`
	OpeningTimes []struct {
		Days  string `json:"days"`
		Hours string `json:"hours"`
	} `json:"openingTimes"`
	SpecialOpeningTimes []any `json:"specialOpeningTimes"`
	Services            []any `json:"services"`
	FeatureCategories   []any `json:"featureCategories"`
	Actions             []struct {
		Type  string `json:"type"`
		Title string `json:"title"`
	} `json:"actions"`
}

MarketDetails is a struct that holds detailed information about a single market It is returned by the GetMarketDetails function

func GetMarketDetails

func GetMarketDetails(marketID string) (md MarketDetails, err error)

GetMarketDetails returns the details of the market with the given ID.

func (MarketDetails) String

func (md MarketDetails) String() string

type Markets

type Markets []Market

Markets is a struct that holds a list of Market structs It is returned by the MarketSearch

func MarketSearch

func MarketSearch(searchQuery string) (markets Markets, err error)

MarketSearch searches for markets based on the given query. Fuzzy search; accepts PLZ, city, marketname, street, etc.

func (Markets) String

func (ms Markets) String() string

type OneScanCoupons

type OneScanCoupons struct {
	AppID   string `json:"appId"`
	Code    string `json:"code"`
	Coupons []struct {
		ImageURL       string `json:"imageUrl"`
		Description    string `json:"description"`
		Banner         string `json:"banner"`
		Title          string `json:"title"`
		Subtitle       string `json:"subtitle"`
		Provider       string `json:"provider"`
		Validity       string `json:"validity"`
		InformationURL string `json:"informationUrl"`
		RawValues      struct {
			ID string `json:"id"`
		} `json:"rawValues"`
	} `json:"coupons"`
}

OneScanCoupons is a struct for the raw data returned by the OneScan-Coupons endpoint

func (OneScanCoupons) String

func (o OneScanCoupons) String() string

type Product

type Product struct {
	ProductID    string `json:"productId"`
	Title        string `json:"title"`
	DepositLabel any    `json:"depositLabel"`
	ImageURL     string `json:"imageURL"`
	Attributes   struct {
		IsBulkyGood     bool `json:"isBulkyGood"`
		IsOrganic       bool `json:"isOrganic"`
		IsVegan         bool `json:"isVegan"`
		IsVegetarian    bool `json:"isVegetarian"`
		IsDairyFree     bool `json:"isDairyFree"`
		IsGlutenFree    bool `json:"isGlutenFree"`
		IsBiocide       bool `json:"isBiocide"`
		IsAgeRestricted any  `json:"isAgeRestricted"`
		IsRegional      bool `json:"isRegional"`
		IsNew           bool `json:"isNew"`
	} `json:"attributes"`
	OrderLimit          int      `json:"orderLimit"`
	Categories          []string `json:"categories"`
	DetailsViewRequired bool     `json:"detailsViewRequired"`
	ArticleID           string   `json:"articleId"`
	Listing             struct {
		ListingID          string `json:"listingId"`
		ListingVersion     int    `json:"listingVersion"`
		CurrentRetailPrice int    `json:"currentRetailPrice"`
		TotalRefundPrice   any    `json:"totalRefundPrice"`
		Grammage           string `json:"grammage"`
		Discount           any    `json:"discount"`
		LoyaltyBonus       any    `json:"loyaltyBonus"`
	} `json:"listing"`
	Advertisement any `json:"advertisement"`
}

type ProductOpts

type ProductOpts struct {
	Page           int
	ObjectsPerPage int
}

type ProductSearchResults

type ProductSearchResults struct {
	Data struct {
		Products struct {
			Pagination struct {
				ObjectsPerPage int `json:"objectsPerPage"`
				CurrentPage    int `json:"currentPage"`
				PageCount      int `json:"pageCount"`
				ObjectCount    int `json:"objectCount"`
			} `json:"pagination"`
			Search struct {
				Term struct {
					Original  string `json:"original"`
					Corrected any    `json:"corrected"`
				} `json:"term"`
			} `json:"search"`
			Products []Product `json:"products"`
		} `json:"products"`
	} `json:"data"`
	Extensions struct {
		HTTP []struct {
			Path         []string `json:"path"`
			Message      string   `json:"message"`
			StatusCode   int      `json:"statusCode"`
			ResponseBody any      `json:"responseBody"`
		} `json:"http"`
	} `json:"extensions"`
}

func GetCategoryProducts

func GetCategoryProducts(marketID, categorySlug string, opts *ProductOpts) (ProductSearchResults, error)

func GetProducts

func GetProducts(marketID, search string, opts *ProductOpts) (ProductSearchResults, error)

func (ProductSearchResults) String

func (psr ProductSearchResults) String() string

type RawDiscounts

type RawDiscounts struct {
	Data struct {
		Offers struct {
			Handout struct {
				Width  int `json:"width"`
				Height int `json:"height"`
				Images []struct {
					Original  string `json:"original"`
					Thumbnail string `json:"thumbnail"`
				} `json:"images"`
			} `json:"handout"`
			Categories []struct {
				ID              string `json:"id"`
				Title           string `json:"title"`
				MoodURL         any    `json:"moodUrl"`
				Order           int    `json:"order"`
				BackgroundColor string `json:"backgroundColor"`
				ForegroundColor string `json:"foregroundColor"`
				Offers          []struct {
					CellType  string   `json:"cellType"`
					Overline  string   `json:"overline"`
					Title     string   `json:"title"`
					Subtitle  string   `json:"subtitle"`
					Images    []string `json:"images"`
					Biozid    bool     `json:"biozid"`
					PriceData struct {
						Price        string `json:"price"`
						RegularPrice string `json:"regularPrice"`
					} `json:"priceData"`
					LoyaltyBonus any `json:"loyaltyBonus"`
					Detail       struct {
						Sensational any    `json:"sensational"`
						PitchIn     string `json:"pitchIn"`
						Tags        []any  `json:"tags"`
						Contents    []struct {
							Header string   `json:"header"`
							Titles []string `json:"titles"`
						} `json:"contents"`
						Biocide    bool   `json:"biocide"`
						NutriScore string `json:"nutriScore"`
					} `json:"detail"`
					RawValues struct {
						CategoryTitle string  `json:"categoryTitle"`
						PriceAverage  float64 `json:"priceAverage"`
						FlyerPage     int     `json:"flyerPage"`
						Nan           string  `json:"nan"`
					} `json:"rawValues"`
				} `json:"offers"`
			} `json:"categories"`
			UntilDate       float64 `json:"untilDate"`
			HasOnlineOffers bool    `json:"hasOnlineOffers"`
		} `json:"offers"`
	} `json:"data"`
	Extensions struct {
		HTTP []struct {
			Path         []string `json:"path"`
			Message      string   `json:"message"`
			StatusCode   int      `json:"statusCode"`
			ResponseBody any      `json:"responseBody"`
		} `json:"http"`
	} `json:"extensions"`
}

RawDiscounts is the struct that holds the raw discount data from the rewe API.

func GetDiscountsRaw

func GetDiscountsRaw(marketID string) (rd RawDiscounts, err error)

GetDiscountsRaw returns the raw data from the API in a RawDiscounts struct. It contains links to the handout (Prospekt) as well as discount categories, which in turn contain the actual discounts.

type Recall

type Recall struct {
	RecallURL      string `json:"recallUrl"`
	SubjectProduct string `json:"subjectProduct"`
	SubjectReason  string `json:"subjectReason"`
}

Recall is the struct for a single recall

func (Recall) String

func (r Recall) String() string

type Recalls

type Recalls []Recall

Recalls is the struct for Rewe Product-Recalls

func GetRecalls

func GetRecalls() (r Recalls, err error)

GetRecalls returns all currently ongoing recalls from Rewe

func (Recalls) String

func (rs Recalls) String() string

type Recipe

type Recipe struct {
	ID                    string `json:"id"`
	Title                 string `json:"title"`
	DetailURL             string `json:"detailUrl"`
	ImageURL              string `json:"imageUrl"`
	Duration              string `json:"duration"`
	DifficultyLevel       int    `json:"difficultyLevel"`
	DifficultyDescription string `json:"difficultyDescription"`
}

Recipe is the struct for a single recipe

func (Recipe) String

func (r Recipe) String() string

type RecipeHub

type RecipeHub struct {
	RecipeOfTheDay Recipe   `json:"recipeOfTheDay"`
	PopularRecipes []Recipe `json:"popularRecipes"`
	Categories     []struct {
		Type        string `json:"type"`
		Title       string `json:"title"`
		SearchQuery string `json:"searchQuery"`
	} `json:"categories"`
}

RecipeHub is the struct for the Data returned by the Rewe Recipe-Page

func GetRecipeHub

func GetRecipeHub() (r RecipeHub, err error)

GetRecipeHub returns the Data from the RecipeHub

func (RecipeHub) String

func (rh RecipeHub) String() string

type ShopCategory

type ShopCategory struct {
	ID              string `json:"id"`
	Name            string `json:"name"`
	Slug            string `json:"slug"`
	ProductCount    int    `json:"productCount"`
	ImageURL        string `json:"imageUrl"`
	ChildCategories []ShopCategory
}

func (ShopCategory) String

func (sc ShopCategory) String() string

func (ShopCategory) StringAll

func (sc ShopCategory) StringAll() string

type ShopOverview

type ShopOverview struct {
	ProductRecalls    Recalls        `json:"productRecalls"`
	ProductCategories []ShopCategory `json:"productCategories"`
}

func GetShopOverview

func GetShopOverview(marketID string) (so ShopOverview, err error)

func (ShopOverview) GetName

func (so ShopOverview) GetName() string

func (ShopOverview) String

func (so ShopOverview) String() string

func (ShopOverview) StringAll

func (so ShopOverview) StringAll() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳