Documentation
¶
Index ¶
- type GetItems
- func (q *GetItems) ASINs(itms []string) *GetItems
- func (q *GetItems) EnableBrowseNodeInfo(flag bool) *GetItems
- func (q *GetItems) EnableImages(flag bool) *GetItems
- func (q *GetItems) EnableItemInfo(flag bool) *GetItems
- func (q *GetItems) EnableOffers(flag bool) *GetItems
- func (q *GetItems) EnableParentASIN(flag bool) *GetItems
- func (q *GetItems) Operation() paapi5.Operation
- func (q *GetItems) Payload() ([]byte, error)
- func (q *GetItems) String() string
- type RequestFilter
- type RequestType
- type SearchItems
- func (q *SearchItems) EnableBrowseNodeInfo(flag bool) *SearchItems
- func (q *SearchItems) EnableImages(flag bool) *SearchItems
- func (q *SearchItems) EnableItemInfo(flag bool) *SearchItems
- func (q *SearchItems) EnableOffers(flag bool) *SearchItems
- func (q *SearchItems) EnableParentASIN(flag bool) *SearchItems
- func (q *SearchItems) EnableSearchRefinements(flag bool) *SearchItems
- func (q *SearchItems) Operation() paapi5.Operation
- func (q *SearchItems) Payload() ([]byte, error)
- func (q *SearchItems) Search(searchParam string, searchType RequestType) *SearchItems
- func (q *SearchItems) String() string
- func (q *SearchItems) WithFilters(filters ...map[RequestFilter]interface{}) *SearchItems
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetItems ¶
type GetItems struct { OpeCode paapi5.Operation `json:"Operation"` Marketplace string PartnerTag string PartnerType string ItemIds []string `json:",omitempty"` ItemIdType string `json:",omitempty"` Resources []string `json:",omitempty"` // contains filtered or unexported fields }
GetItems is query data class for PA-API v5
func NewGetItems ¶
New creates new GetItems instance
func (*GetItems) EnableBrowseNodeInfo ¶
EnableBrowseNodeInfo sets enableBrowseNodeInfo flag in GetItems instance
func (*GetItems) EnableImages ¶
EnableImages sets enableImages flag in GetItems instance
func (*GetItems) EnableItemInfo ¶
EnableItemInfo sets enableItemInfo flag in GetItems instance
func (*GetItems) EnableOffers ¶
EnableOffers sets enableOffers flag in GetItems instance
func (*GetItems) EnableParentASIN ¶
EnableParentASIN sets enableParentASIN flag in GetItems instance
type RequestFilter ¶ added in v0.3.0
type RequestFilter int
RequestFilter signals the types of filters to use
const ( Availability RequestFilter = iota + 1 BrowseNodeID Condition CurrencyOfPreference DeliveryFlags ItemCount ItemPage LanguagesOfPreference MaxPrice Merchant MinPrice MinReviewsRating MinSavingPercent OfferCount SearchIndex SortBy )
Constants for RequestFilter
type RequestType ¶ added in v0.3.0
type RequestType int
RequestType signals the type of request to search for
const ( Actor RequestType = iota + 1 Artist Author Brand Keywords Title )
Constants for RequestType
type SearchItems ¶ added in v0.3.0
type SearchItems struct { OpeCode paapi5.Operation `json:"Operation"` Marketplace string PartnerTag string PartnerType string Resources []string `json:",omitempty"` // contains filtered or unexported fields }
SearchItems is a query data class for PA-API v5
func NewSearchItems ¶ added in v0.3.0
func NewSearchItems(marketplace, partnerTag, partnerType string) *SearchItems
NewSearchItems creates a new SearchItems instance
func (*SearchItems) EnableBrowseNodeInfo ¶ added in v0.3.0
func (q *SearchItems) EnableBrowseNodeInfo(flag bool) *SearchItems
EnableBrowseNodeInfo sets the enableBrowseNodeInfo flag in SearchItems instance
func (*SearchItems) EnableImages ¶ added in v0.3.0
func (q *SearchItems) EnableImages(flag bool) *SearchItems
EnableImages sets the enableImages flag in SearchItems instance
func (*SearchItems) EnableItemInfo ¶ added in v0.3.0
func (q *SearchItems) EnableItemInfo(flag bool) *SearchItems
EnableItemInfo sets the enableItemInfo flag in SearchItems instance
func (*SearchItems) EnableOffers ¶ added in v0.3.0
func (q *SearchItems) EnableOffers(flag bool) *SearchItems
EnableOffers sets the enableOffers flag in SearchItems instance
func (*SearchItems) EnableParentASIN ¶ added in v0.3.0
func (q *SearchItems) EnableParentASIN(flag bool) *SearchItems
EnableParentASIN sets the enableParentASIN flag in SearchItems instance
func (*SearchItems) EnableSearchRefinements ¶ added in v0.3.0
func (q *SearchItems) EnableSearchRefinements(flag bool) *SearchItems
EnableSearchRefinements sets the enableOffers flag in SearchItems instance
func (*SearchItems) Operation ¶ added in v0.3.0
func (q *SearchItems) Operation() paapi5.Operation
Operation returns the type of the PA-API operation
func (*SearchItems) Payload ¶ added in v0.3.0
func (q *SearchItems) Payload() ([]byte, error)
Payload defines the resources to be returned
func (*SearchItems) Search ¶ added in v0.3.0
func (q *SearchItems) Search(searchParam string, searchType RequestType) *SearchItems
Search is a generic search query funtion to obtain informations from the "SearchItems"-operation
func (*SearchItems) String ¶ added in v0.3.0
func (q *SearchItems) String() string
Stringer interface
func (*SearchItems) WithFilters ¶ added in v0.3.0
func (q *SearchItems) WithFilters(filters ...map[RequestFilter]interface{}) *SearchItems
WithFilters adds filtered requests to the search query