zilla

package
v0.0.0-...-49967f6 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AggregateRating

type AggregateRating struct {
	WorstRating int    `json:"worstRating"`
	ReviewCount int    `json:"reviewCount"`
	RatingValue string `json:"ratingValue"`
	BestRating  int    `json:"bestRating"`
}

type Image

type Image struct {
	ContentUrl string `json:"contentUrl"`
	Caption    string `json:"caption"`
}

type Offer

type Offer struct {
	Seller        Thing  `json:"seller"`
	PriceCurrency string `json:"priceCurrency"`
	Price         string `json:"price"`
	ItemCondition string `json:"itemCondition"`
	Availability  string `json:"availability"`
}

type ParseResult

type ParseResult struct {
	Products   []Product
	SkuDetails []SkuDetails
}

type Parser

type Parser struct {
	// contains filtered or unexported fields
}

func NewParser

func NewParser(r io.Reader) *Parser

func (*Parser) Parse

func (p *Parser) Parse() (ParseResult, error)

type Product

type Product struct {
	Sku             int             `json:"sku"`
	ProductID       int             `json:"productID"`
	Offers          Offer           `json:"offers"`
	Name            string          `json:"name"`
	Image           Image           `json:"image"`
	Description     string          `json:"description"`
	Color           string          `json:"color"`
	Category        string          `json:"category"`
	Brand           Thing           `json:"brand"`
	AggregateRating AggregateRating `json:"aggregateRating"`
}

type SkuDetails

type SkuDetails struct {
	AvailabilityLabel           string `json:"availability_label"`
	AvailabilityMessage         string `json:"availability_message"`
	Closeout                    bool   `json:"closeout"`
	Compound                    bool   `json:"compound"`
	Id                          int    `json:"id"`
	InStock                     bool   `json:"in_stock"`
	IsGuaranteedHolidayShipping bool   `json:"is_guaranteed_holiday_shipping"`
	IsPremiumEligible           bool   `json:"is_premium_eligible"`
	LoyaltyEarnings             string `json:"loyalty_earnings"`
	LoyaltyPrice                string `json:"loyalty_price"`
	LoyaltySavings              string `json:"loyalty_savings"`
	Msrp                        string `json:"msrp"`
	OptionsDescription          string `json:"options_description"`
	PercentOff                  int    `json:"percent_off"`
	Retail                      string `json:"retail"`
	SavingsAmount               string `json:"savings_amount"`
	ShowRetail                  bool   `json:"show_retail"`
}

type Thing

type Thing struct {
	Name string `json:"name"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL