Documentation
¶
Index ¶
- Constants
- type AutoCorrection
- type BasicRequest
- type Category
- type CommonDescription
- type EbayMarketplace
- type ErrorDetailV3
- type EstimatedAvailability
- type FieldGroupsOptions
- type FilterType
- type Filterer
- type GetItemByLegacyIdRequest
- func (r *GetItemByLegacyIdRequest) Execute() (GetItemByLegacyIdResponse, error)
- func (r *GetItemByLegacyIdRequest) ShowParams() url.Values
- func (r *GetItemByLegacyIdRequest) WithFieldGroups(fieldGroups ...FieldGroupsOptions) *GetItemByLegacyIdRequest
- func (r *GetItemByLegacyIdRequest) WithItemID(legacyItemID string) *GetItemByLegacyIdRequest
- func (r *GetItemByLegacyIdRequest) WithLegacyVariationID(legacyVariationID string) *GetItemByLegacyIdRequest
- func (r *GetItemByLegacyIdRequest) WithLegacyVariationSKY(legacyVariationSKY string) *GetItemByLegacyIdRequest
- type GetItemByLegacyIdResponse
- type GetItemsByItemGroupRequest
- type GetItemsByItemGroupResponse
- type Image
- type Item
- type ItemLocation
- type ItemSummary
- type ItemSummarySearchRequest
- func (r *ItemSummarySearchRequest) Execute() (ItemSummarySearchResponse, error)
- func (r *ItemSummarySearchRequest) ShowParams() url.Values
- func (r *ItemSummarySearchRequest) WithAutoCorrect(values ...string) *ItemSummarySearchRequest
- func (r *ItemSummarySearchRequest) WithCategoryID(categoryID string) *ItemSummarySearchRequest
- func (r *ItemSummarySearchRequest) WithFilterDeliveryCountry(country string) *ItemSummarySearchRequest
- func (r *ItemSummarySearchRequest) WithFilterDeliveryPostalCode(postalCode string) *ItemSummarySearchRequest
- func (r *ItemSummarySearchRequest) WithLimit(limit int) *ItemSummarySearchRequest
- func (r *ItemSummarySearchRequest) WithOffset(offset int) *ItemSummarySearchRequest
- func (r *ItemSummarySearchRequest) WithQuery(query string) *ItemSummarySearchRequest
- func (r *ItemSummarySearchRequest) WithSort(sortBy ...string) *ItemSummarySearchRequest
- type ItemSummarySearchResponse
- type LocalizedAspect
- type ManyValueFilter
- type MarketingPrice
- type OneValueFilter
- type Price
- type PrimaryItemGroup
- type Refinement
- type Seller
- type Service
- func (s *Service) NewGetItemByLegacyIdRequest() *GetItemByLegacyIdRequest
- func (s *Service) NewGetItemsByItemGroupRequest() *GetItemsByItemGroupRequest
- func (s *Service) NewItemSummarySearchRequest() *ItemSummarySearchRequest
- func (s *Service) WithApplicationToken(token string) *Service
- func (s *Service) WithLimit(limit int) *Service
- func (s *Service) WithMarketplace(marketplace EbayMarketplace) *Service
- func (s *Service) WithSandbox(isSandbox bool) *Service
- func (s *Service) WithTimeout(timeout time.Duration) *Service
- type ShippingOption
- type TwoValueFilter
Constants ¶
const URLProductionGetItemByLegacyId = "https://api.ebay.com/buy/browse/v1/item/get_item_by_legacy_id"
const URLProductionGetItemsByItemGroup = "https://api.ebay.com/buy/browse/v1/item/get_items_by_item_group"
const URLProductionItemSummarySearch = "https://api.ebay.com/buy/browse/v1/item_summary/search"
const URLSandboxGetItemByLegacyId = "https://api.sandbox.ebay.com/buy/browse/v1/item/get_item_by_legacy_id"
const URLSandboxGetItemsByItemGroup = "https://api.sandbox.ebay.com/buy/browse/v1/item/get_items_by_item_group"
const URLSandboxItemSummarySearch = "https://api.sandbox.ebay.com/buy/browse/v1/item_summary/search"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AutoCorrection ¶
type AutoCorrection struct {
Q string `json:"q"`
}
type BasicRequest ¶
type BasicRequest struct {
// contains filtered or unexported fields
}
type CommonDescription ¶ added in v0.0.2
type EbayMarketplace ¶
type EbayMarketplace string
const ( MarketplaceUSA EbayMarketplace = "EBAY_US" MarketplaceGB EbayMarketplace = "EBAY_GB" )
https://developer.ebay.com/api-docs/buy/static/ref-marketplace-supported.html
type ErrorDetailV3 ¶
type ErrorDetailV3 struct { }
type EstimatedAvailability ¶ added in v0.0.2
type FieldGroupsOptions ¶ added in v0.0.2
type FieldGroupsOptions string
const (
FieldGroupsPRODUCT FieldGroupsOptions = "PRODUCT"
)
type FilterType ¶
type FilterType string
const ( FilterDeliveryCountry FilterType = "deliveryCountry" FilterDeliveryPostalCode FilterType = "deliveryPostalCode" )
https://developer.ebay.com/api-docs/buy/static/ref-buy-browse-filters.html
type GetItemByLegacyIdRequest ¶ added in v0.0.2
type GetItemByLegacyIdRequest struct { LegacyItemID string LegacyVariationID string LegacyVariationSKU string FieldGroups []string BasicRequest }
GetItemByLegacyIdRequest ...
func (*GetItemByLegacyIdRequest) Execute ¶ added in v0.0.2
func (r *GetItemByLegacyIdRequest) Execute() (GetItemByLegacyIdResponse, error)
func (*GetItemByLegacyIdRequest) ShowParams ¶ added in v0.0.2
func (r *GetItemByLegacyIdRequest) ShowParams() url.Values
func (*GetItemByLegacyIdRequest) WithFieldGroups ¶ added in v0.0.2
func (r *GetItemByLegacyIdRequest) WithFieldGroups(fieldGroups ...FieldGroupsOptions) *GetItemByLegacyIdRequest
WithFieldGroups adds fieldsGroups parameter to GetItemByLegacyIdRequest
func (*GetItemByLegacyIdRequest) WithItemID ¶ added in v0.0.2
func (r *GetItemByLegacyIdRequest) WithItemID(legacyItemID string) *GetItemByLegacyIdRequest
WithItemID adds legacyItemID parameter to GetItemByLegacyIdRequest
func (*GetItemByLegacyIdRequest) WithLegacyVariationID ¶ added in v0.0.2
func (r *GetItemByLegacyIdRequest) WithLegacyVariationID(legacyVariationID string) *GetItemByLegacyIdRequest
WithLegacyVariationID adds legacyVariationID parameter to GetItemByLegacyIdRequest
func (*GetItemByLegacyIdRequest) WithLegacyVariationSKY ¶ added in v0.0.2
func (r *GetItemByLegacyIdRequest) WithLegacyVariationSKY(legacyVariationSKY string) *GetItemByLegacyIdRequest
WithLegacyVariationSKY adds legacyVariationSKY parameter to GetItemByLegacyIdRequest
type GetItemByLegacyIdResponse ¶ added in v0.0.2
type GetItemByLegacyIdResponse struct {
Item
}
GetItemByLegacyIdResponse is a responce for GetItemByLegacyIdRequest
type GetItemsByItemGroupRequest ¶ added in v0.0.2
type GetItemsByItemGroupRequest struct { ItemGroupID string BasicRequest }
GetItemsByItemGroupRequest ...
func (*GetItemsByItemGroupRequest) Execute ¶ added in v0.0.2
func (r *GetItemsByItemGroupRequest) Execute() (GetItemsByItemGroupResponse, error)
func (*GetItemsByItemGroupRequest) ShowParams ¶ added in v0.0.2
func (r *GetItemsByItemGroupRequest) ShowParams() url.Values
func (*GetItemsByItemGroupRequest) WithItemGroupID ¶ added in v0.0.2
func (r *GetItemsByItemGroupRequest) WithItemGroupID(itemGroupID string) *GetItemsByItemGroupRequest
WithItemGroupID adds itemGroupID parameter to GetItemsByItemGroupRequest
type GetItemsByItemGroupResponse ¶ added in v0.0.2
type GetItemsByItemGroupResponse struct { CommonDescriptions []CommonDescription `json:"commonDescriptions"` Items []Item `json:"items"` }
GetItemsByItemGroupResponse is a responce for GetItemsByItemGroupRequest
type Item ¶ added in v0.0.2
type Item struct { ItemID string `json:"itemId"` Title string `json:"title"` ShortDescription string `json:"shortDescription"` Price Price `json:"price"` CategoryPath string `json:"categoryPath"` Condition string `json:"condition"` ConditionID string `json:"conditionId"` //itemLocation Image Image AdditionalImages []Image `json:"additionalImages"` Brand string `json:"brand"` Seller Seller `json:"seller"` GTIN string `json:"gtin"` MPN string `json:"mpn"` EstimatedAvailabilities []EstimatedAvailability `json:"estimatedAvailabilities"` ShippingOptions []ShippingOption `json:"shippingOptions"` // shipToLocations // returnTerms // taxes LocalizedAspects []LocalizedAspect `json:"localizedAspects"` TopRatedBuyingExperience bool `json:"topRatedBuyingExperience"` BuyingOptions []string `json:"buyingOptions"` ItemWebURL string `json:"itemWebUrl"` //paymentMethods PrimaryItemGroup PrimaryItemGroup `json:"primaryItemGroup"` //enabledForGuestCheckout //eligibleForInlineCheckout LegacyItemID string `json:"legacyItemId"` //priorityListing //adultOnly CategoryID string `json:"categoryId"` }
type ItemLocation ¶
type ItemSummary ¶
type ItemSummary struct { ItemID string `json:"itemId"` Title string `json:"title"` ShortDescription string `json:"shortDescription"` Image Image `json:"image"` BidCount int `json:"bidCount"` WatchCount int `json:"watchCount"` ItemEndDate string `json:"itemEndDate"` ItemAffiliateWebURL string `json:"itemAffiliateWebUrl"` Price Price `json:"price"` ItemHref string `json:"itemHref"` Seller Seller `json:"seller"` MarketingPrice MarketingPrice `json:"marketingPrice"` Condition string `json:"condition"` ConditionID string `json:"conditionId"` ThumbnailImages []Image `json:"thumbnailImages"` ShippingOptions []ShippingOption `json:"shippingOptions"` BuyingOptions []string `json:"buyingOptions"` CurrentBidPrice Price `json:"currentBidPrice"` Epid string `json:"epid"` ItemWebURL string `json:"itemWebUrl"` ItemLocation ItemLocation `json:"itemLocation"` Categories []Category `json:"categories"` AdditionalImages []Image `json:"additionalImages"` LegacyItemID string `json:"legacyItemId"` AdultOnly bool `json:"adultOnly"` AvailableCoupons bool `json:"availableCoupons"` PriorityListing bool `json:"priorityListing"` TopRatedBuyingExperience bool `json:"topRatedBuyingExperience"` }
type ItemSummarySearchRequest ¶
type ItemSummarySearchRequest struct { Q string Limit string Offset string CategoryIDs []string AutoCorrect []string Sort []string FilterMap map[string]Filterer BasicRequest }
func (*ItemSummarySearchRequest) Execute ¶
func (r *ItemSummarySearchRequest) Execute() (ItemSummarySearchResponse, error)
func (*ItemSummarySearchRequest) ShowParams ¶
func (r *ItemSummarySearchRequest) ShowParams() url.Values
func (*ItemSummarySearchRequest) WithAutoCorrect ¶
func (r *ItemSummarySearchRequest) WithAutoCorrect(values ...string) *ItemSummarySearchRequest
WithAutoCorrect adds autocorrecting option to ItemSummarySearchRequest Leave empty to omit
func (*ItemSummarySearchRequest) WithCategoryID ¶
func (r *ItemSummarySearchRequest) WithCategoryID(categoryID string) *ItemSummarySearchRequest
WithCategoryID adds categories for search to ItemSummarySearchRequest Leave empty to omit
func (r *ItemSummarySearchRequest) WithCategories(categories ...string) *ItemSummarySearchRequest { r.CategoryIDs = categories return r }
func (*ItemSummarySearchRequest) WithFilterDeliveryCountry ¶
func (r *ItemSummarySearchRequest) WithFilterDeliveryCountry(country string) *ItemSummarySearchRequest
WithFilterDeliveryCountry adds filter by deliveryCountry to ItemSummarySearchRequest Parameter for this function is Two-character ISO 3166 Country Code ("US", "GB" etc.)
func (*ItemSummarySearchRequest) WithFilterDeliveryPostalCode ¶
func (r *ItemSummarySearchRequest) WithFilterDeliveryPostalCode(postalCode string) *ItemSummarySearchRequest
WithFilterDeliveryPostalCode adds filter by deliveryPostalCode to ItemSummarySearchRequest Must be used with deliveryCountry parameter.
func (*ItemSummarySearchRequest) WithLimit ¶
func (r *ItemSummarySearchRequest) WithLimit(limit int) *ItemSummarySearchRequest
WithLimit sets limit of items per page to ItemSummarySearchRequest Default : 50
func (*ItemSummarySearchRequest) WithOffset ¶
func (r *ItemSummarySearchRequest) WithOffset(offset int) *ItemSummarySearchRequest
WithOffset adds offset to skip during the call. Field of ItemSummarySearchRequest Default : 0
func (*ItemSummarySearchRequest) WithQuery ¶
func (r *ItemSummarySearchRequest) WithQuery(query string) *ItemSummarySearchRequest
WithQuery adds query parameter to ItemSummarySearchRequest
func (*ItemSummarySearchRequest) WithSort ¶
func (r *ItemSummarySearchRequest) WithSort(sortBy ...string) *ItemSummarySearchRequest
WithSort adds sorting order to ItemSummarySearchRequest Default: BestMatch
type ItemSummarySearchResponse ¶
type ItemSummarySearchResponse struct { AutoCorrections AutoCorrection `json:"autoCorrections"` Href string `json:"href"` Next string `json:"next"` Prev string `json:"prev"` ItemSummaries []ItemSummary `json:"itemSummaries"` Limit int `json:"limit"` Offset int `json:"offset"` Total int `json:"total"` }
type LocalizedAspect ¶ added in v0.0.2
type ManyValueFilter ¶
type MarketingPrice ¶
type OneValueFilter ¶
func (OneValueFilter) ToQueryParams ¶
func (ovf OneValueFilter) ToQueryParams() string
type PrimaryItemGroup ¶ added in v0.0.2
type PrimaryItemGroup struct { ItemGroupID string `json:"itemGroupId"` ItemGroupType string `json:"itemGroupType"` ItemGroupHref string `json:"itemGroupHref"` ItemGroupTitle string `json:"itemGroupTitle"` ItemGroupImage Image `json:"itemGroupImage"` ItemGroupAdditionalImages []Image `json:"itemGroupAdditionalImages"` }
type Refinement ¶
type Refinement struct { }
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
NewService creates new Service. It requires already created Application Token. You can use this repo to create token https://github.com/hotafrika/ebay-common More info here https://developer.ebay.com/api-docs/static/oauth-client-credentials-grant.html
func (*Service) NewGetItemByLegacyIdRequest ¶ added in v0.0.2
func (s *Service) NewGetItemByLegacyIdRequest() *GetItemByLegacyIdRequest
NewGetItemByLegacyIdRequest creates new GetItemByLegacyIdRequest
func (*Service) NewGetItemsByItemGroupRequest ¶ added in v0.0.2
func (s *Service) NewGetItemsByItemGroupRequest() *GetItemsByItemGroupRequest
NewGetItemsByItemGroupRequest creates new GetItemsByItemGroupRequest
func (*Service) NewItemSummarySearchRequest ¶
func (s *Service) NewItemSummarySearchRequest() *ItemSummarySearchRequest
NewItemSummarySearchRequest creates new ItemSummarySearchRequest
func (*Service) WithApplicationToken ¶
WithApplicationToken sets application token (Authorization) header for HTTP client. The same header will be for all child requests.
func (*Service) WithLimit ¶
WithLimit tells to Service to create requests with specified limit per page. Default: 50
func (*Service) WithMarketplace ¶
func (s *Service) WithMarketplace(marketplace EbayMarketplace) *Service
WithMarketplace sets marketplace header for HTTP client. The same header will be for all child requests.
func (*Service) WithSandbox ¶
WithSandbox tells to Service to create Sandbox requests.
type ShippingOption ¶
type ShippingOption struct { GuaranteedDelivery bool `json:"guaranteedDelivery"` MaxEstimatedDeliveryDate string `json:"maxEstimatedDeliveryDate"` MinEstimatedDeliveryDate string `json:"minEstimatedDeliveryDate"` ShippingCostType string `json:"shippingCostType"` ShippingCost Price `json:"shippingCost"` }