query

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

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

func NewGetItems(marketplace, partnerTag, partnerType string) *GetItems

New creates new GetItems instance

func (*GetItems) ASINs

func (q *GetItems) ASINs(itms []string) *GetItems

ASINs sets ItemIds in GetItems instance

func (*GetItems) EnableBrowseNodeInfo

func (q *GetItems) EnableBrowseNodeInfo(flag bool) *GetItems

EnableBrowseNodeInfo sets enableBrowseNodeInfo flag in GetItems instance

func (*GetItems) EnableImages

func (q *GetItems) EnableImages(flag bool) *GetItems

EnableImages sets enableImages flag in GetItems instance

func (*GetItems) EnableItemInfo

func (q *GetItems) EnableItemInfo(flag bool) *GetItems

EnableItemInfo sets enableItemInfo flag in GetItems instance

func (*GetItems) EnableOffers

func (q *GetItems) EnableOffers(flag bool) *GetItems

EnableOffers sets enableOffers flag in GetItems instance

func (*GetItems) EnableParentASIN

func (q *GetItems) EnableParentASIN(flag bool) *GetItems

EnableParentASIN sets enableParentASIN flag in GetItems instance

func (*GetItems) Operation

func (q *GetItems) Operation() paapi5.Operation

func (*GetItems) Payload

func (q *GetItems) Payload() ([]byte, error)

func (*GetItems) String

func (q *GetItems) String() string

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

Jump to

Keyboard shortcuts

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