query

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2021 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 {
	Query
}

GetItems type is embedded Query for GetItems operation in 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() *GetItems

EnableBrowseNodeInfo sets the resource of BrowseNodeInfo

func (*GetItems) EnableCustomerReviews added in v0.7.0

func (q *GetItems) EnableCustomerReviews() *GetItems

EnableCustomerReviews sets the resource of CustomerReviews

func (*GetItems) EnableImages

func (q *GetItems) EnableImages() *GetItems

EnableImages sets the resource of Images

func (*GetItems) EnableItemInfo

func (q *GetItems) EnableItemInfo() *GetItems

EnableItemInfo sets the resource of ItemInfo

func (*GetItems) EnableOffers

func (q *GetItems) EnableOffers() *GetItems

EnableOffers sets the resource of Offers

func (*GetItems) EnableParentASIN

func (q *GetItems) EnableParentASIN() *GetItems

EnableParentASIN sets the resource of ParentASIN

func (*GetItems) Request added in v0.5.0

func (q *GetItems) Request(request RequestFilter, value interface{}) *GetItems

RequestFilters adds RequestFilter to Query instance

type Query added in v0.5.0

type Query struct {
	OpeCode paapi5.Operation `json:"Operation"`

	Resources []string `json:",omitempty"`
	// contains filtered or unexported fields
}

Query is a query data class for PA-API v5

func New added in v0.5.0

func New(opeCode paapi5.Operation) *Query

New creates a new Query instance

func (*Query) BrowseNodeInfo added in v0.5.0

func (q *Query) BrowseNodeInfo() *Query

BrowseNodeInfo sets the resource of BrowseNodeInfo

func (*Query) CustomerReviews added in v0.7.0

func (q *Query) CustomerReviews() *Query

CustomerReviews sets the resource of CustomerReviews resource

func (*Query) Images added in v0.5.0

func (q *Query) Images() *Query

Images sets the resource of Images

func (*Query) ItemInfo added in v0.5.0

func (q *Query) ItemInfo() *Query

ItemInfo sets the resource of ItemInfo

func (*Query) Offers added in v0.5.0

func (q *Query) Offers() *Query

Offers sets the resource of Offers

func (*Query) Operation added in v0.5.0

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

Operation returns the type of the PA-API operation

func (*Query) ParentASIN added in v0.5.0

func (q *Query) ParentASIN() *Query

ParentASIN sets the resource of ParentASIN

func (*Query) Payload added in v0.5.0

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

Payload defines the resources to be returned

func (*Query) RequestFilters added in v0.5.0

func (q *Query) RequestFilters(requests ...RequestMap) *Query

RequestFilters adds RequestFilter to Query instance

func (*Query) SearchRefinements added in v0.5.0

func (q *Query) SearchRefinements() *Query

SearchRefinements sets the resource of SearchRefinements

func (*Query) String added in v0.5.0

func (q *Query) String() string

Stringer interface

func (*Query) With added in v0.5.0

func (q *Query) With() *Query

With returns this instance

type RequestFilter added in v0.3.0

type RequestFilter int

RequestFilter signals the types of filters to use

const (
	Actor RequestFilter = iota + 1
	Artist
	Author
	Availability
	Brand
	BrowseNodeID
	Condition
	CurrencyOfPreference
	DeliveryFlags
	ItemIds
	ItemIdType
	ItemCount
	ItemPage
	Keywords
	LanguagesOfPreference
	Marketplace
	MaxPrice
	Merchant
	MinPrice
	MinReviewsRating
	MinSavingPercent
	OfferCount
	PartnerTag
	PartnerType
	Properties
	SearchIndex
	SortBy
	Title
)

Constants for RequestFilter

type RequestMap added in v0.5.0

type RequestMap map[RequestFilter]interface{}

RequestMap is mapping data for RequestFilter

type SearchItems added in v0.3.0

type SearchItems struct {
	Query
}

SearchItems type is embedded Query for SearchItems operation in 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() *SearchItems

EnableBrowseNodeInfo sets the enableBrowseNodeInfo flag in SearchItems instance

func (*SearchItems) EnableCustomerReviews added in v0.7.0

func (q *SearchItems) EnableCustomerReviews() *SearchItems

EnableCustomerReviews sets the enableCustomerReviews flag in SearchItems instance

func (*SearchItems) EnableImages added in v0.3.0

func (q *SearchItems) EnableImages() *SearchItems

EnableImages sets the enableImages flag in SearchItems instance

func (*SearchItems) EnableItemInfo added in v0.3.0

func (q *SearchItems) EnableItemInfo() *SearchItems

EnableItemInfo sets the enableItemInfo flag in SearchItems instance

func (*SearchItems) EnableOffers added in v0.3.0

func (q *SearchItems) EnableOffers() *SearchItems

EnableOffers sets the enableOffers flag in SearchItems instance

func (*SearchItems) EnableParentASIN added in v0.3.0

func (q *SearchItems) EnableParentASIN() *SearchItems

EnableParentASIN sets the enableParentASIN flag in SearchItems instance

func (*SearchItems) EnableSearchRefinements added in v0.3.0

func (q *SearchItems) EnableSearchRefinements() *SearchItems

EnableSearchRefinements sets the enableOffers flag in SearchItems instance

func (*SearchItems) Request added in v0.5.0

func (q *SearchItems) Request(request RequestFilter, value interface{}) *SearchItems

Request adds RequestFilter to Query instance

func (*SearchItems) Search added in v0.3.0

func (q *SearchItems) Search(searchType RequestFilter, searchParam string) *SearchItems

Search is a generic search query funtion to obtain informations from the "SearchItems"-operation

Jump to

Keyboard shortcuts

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