Documentation ¶
Overview ¶
Package skroutz implements a v3.1 client.
Index ¶
- type Address
- type AuthorizationResponse
- type Categories
- func (c *Categories) GetCategories() (out *GetCategoriesCollectionOutput, err error)
- func (c *Categories) GetCategoryFavorites(categoryID int) (out *GetManufacturersCollectionOutput, err error)
- func (c *Categories) GetCategoryManufacturers(categoryID int) (out *GetManufacturersCollectionOutput, err error)
- func (c *Categories) GetCategorySpecifications(categoryID int) (out *GetSpecificationCollectionOutput, err error)
- func (c *Categories) GetCategorySpecificationsByGroup(categoryID int) (out *GetSpecificationGroupCollectionOutput, err error)
- func (c *Categories) GetChildrenCategories(categoryID int) (out *GetCategoriesCollectionOutput, err error)
- func (c *Categories) GetParentCategory(categoryID int) (out *GetSingleCategoryOutput, err error)
- func (c *Categories) GetRootCategory() (out *GetSingleCategoryOutput, err error)
- func (c *Categories) GetSingleCategory(categoryID int) (out *GetSingleCategoryOutput, err error)
- type Client
- type Config
- type Description
- type Error
- type ErrorDescription
- type FilterGroups
- type FlagsContent
- type GetAlternativeOutput
- type GetAutocompleteCollectionOutput
- type GetAutocompleteOutput
- type GetAverageCollectionOutput
- type GetAverageOutput
- type GetCategoriesCollectionOutput
- type GetCategoryOutput
- type GetDropOutput
- type GetFLOutput
- type GetFOutput
- type GetFavoriteListOutput
- type GetFavoriteListQueryInput
- type GetFavoriteOutput
- type GetFavoriteQueryInput
- type GetFavoritesCollectionOutput
- type GetFilterGroupCollectionOutput
- type GetFilterGroupOutput
- type GetFlagOutput
- type GetFlagQueryInput
- type GetFlagsOptionCollectionOutput
- type GetFlagsOptionOutput
- type GetGroupsCollectionOutput
- type GetGroupsOutput
- type GetLocationOutput
- type GetLocationsCollectionOutput
- type GetManufacturerOutput
- type GetManufacturersCollectionOutput
- type GetMetaOutput
- type GetPaginationOutput
- type GetPriceHistoryCollectionOutput
- type GetProductOutput
- type GetProductsCollectionOutput
- type GetReviewOutput
- type GetReviewsCollectionOutput
- type GetSKUOutput
- type GetSKURatingBreakdownOutput
- type GetSKUReviewFlagOutput
- type GetSKUReviewVoteOutput
- type GetSKUSCollectionOutput
- type GetSKUSSpecificationsCollectionsOutput
- type GetSearchQueryInput
- type GetShopOutput
- type GetShopReviewOutput
- type GetShopReviewsCollectionOutput
- type GetShopsCollectionOutput
- type GetSingleCategoryOutput
- type GetSingleFavoriteListOutput
- type GetSingleFavoriteOutput
- type GetSingleManufacturerOutput
- type GetSingleProductOutput
- type GetSingleSKUOutput
- type GetSingleShopLocationOutput
- type GetSingleShopOutput
- type GetSpecificationCollectionOutput
- type GetSpecificationGroupCollectionOutput
- type GetSpecificationOutput
- type GetUserFavoriteListsCollectionOutput
- type GetUserOutput
- type GetVoteOutput
- type GetVoteQueryInput
- type Manufacturers
- func (c *Manufacturers) GetManufacturers() (out *GetManufacturersCollectionOutput, err error)
- func (c *Manufacturers) GetManufacturersCategories(manufacturerID int) (out *GetCategoriesCollectionOutput, err error)
- func (c *Manufacturers) GetManufacturersSKUS(manufacturerID int) (out *GetSKUSCollectionOutput, err error)
- func (c *Manufacturers) GetSingleManufacturer(manufacturerID int) (out *GetSingleManufacturerOutput, err error)
- type Products
- type SKUS
- func (c *SKUS) FlagSKUReview(skuID int, reviewID int, f *GetFlagQueryInput) (out *GetSKUReviewFlagOutput, err error)
- func (c *SKUS) GetCategorySKUS(categoryID int, sq *GetSearchQueryInput) (out *GetSKUSCollectionOutput, err error)
- func (c *SKUS) GetSKUSFavorite(skuID int) (out *GetFavoritesCollectionOutput, err error)
- func (c *SKUS) GetSKUSPriceHistory(skuID int) (out *GetPriceHistoryCollectionOutput, err error)
- func (c *SKUS) GetSKUSProducts(skuID int) (out *GetProductsCollectionOutput, err error)
- func (c *SKUS) GetSKUSReviews(skuID int, sq *GetSearchQueryInput) (out *GetReviewsCollectionOutput, err error)
- func (c *SKUS) GetSKUSSpecifications(skuID int, sq *GetSearchQueryInput) (out *GetSKUSSpecificationsCollectionsOutput, err error)
- func (c *SKUS) GetSimilarSKUS(skuID int) (out *GetSKUSCollectionOutput, err error)
- func (c *SKUS) GetSingleSKU(skuID int) (out *GetSingleSKUOutput, err error)
- func (c *SKUS) VoteSKUReview(skuID int, reviewID int, v *GetVoteQueryInput) (out *GetSKUReviewVoteOutput, err error)
- type Search
- type Shops
- func (c *Shops) GetShopLocations(shopID int, sq *GetSearchQueryInput) (out *GetLocationsCollectionOutput, err error)
- func (c *Shops) GetShopReviews(shopID int, sq *GetSearchQueryInput) (out *GetShopReviewsCollectionOutput, err error)
- func (c *Shops) GetSingleShop(shopID int) (out *GetSingleShopOutput, err error)
- func (c *Shops) GetSingleShopLocation(shopID int, locationID int, sq *GetSearchQueryInput) (out *GetSingleShopLocationOutput, err error)
- func (c *Shops) SearchShop(sq *GetSearchQueryInput) (out *GetShopsCollectionOutput, err error)
- type User
- func (c *User) CreateFavorite(f *GetFavoriteQueryInput) (out *GetSingleFavoriteOutput, err error)
- func (c *User) CreateFavoriteList(fl *GetFavoriteListQueryInput) (out *GetFavoriteListQueryInput, err error)
- func (c *User) DeleteFavorite(favoriteID int) (io.ReadCloser, error)
- func (c *User) DeleteFavoriteList(favoriteListID int) (io.ReadCloser, error)
- func (c *User) GetListFavoritesBelongingToList(favoriteListID int) (out *GetFavoritesCollectionOutput, err error)
- func (c *User) GetUser() (out *GetUserOutput, err error)
- func (c *User) GetUserFavoriteLists() (out *GetUserFavoriteListsCollectionOutput, err error)
- func (c *User) GetUserFavorites() (out *GetFavoritesCollectionOutput, err error)
- func (c *User) GetUserSingleFavorite(favoriteListID int) (out *GetSingleFavoriteOutput, err error)
- func (c *User) UpdateFavorite(favoriteID int, sq *GetSearchQueryInput) (out *GetSingleFavoriteOutput, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address struct { ID int64 `json:"id"` StreetNumber string `json:"street_number"` Street string `json:"street"` PostCode string `json:"postcode"` City string `json:"city"` Region string `json:"region"` Country string `json:"country"` }
Address request output.
type AuthorizationResponse ¶
type AuthorizationResponse struct { AccessToken string `json:"access_token"` TokenType string `json:"token_type"` Expires float64 `json:"expires_in"` }
AuthorizationResponse represents an individual Skroutz authorization. Skroutz API docs: https://developer.skroutz.gr/authorization/
func Authorization ¶
func Authorization(clientID string, clientSecret string) (*AuthorizationResponse, error)
Authorization requires clientID and clientSecret request one from http://skroutz.it/API_access.
type Categories ¶
type Categories struct {
*Client
}
Categories client.
func (*Categories) GetCategories ¶
func (c *Categories) GetCategories() (out *GetCategoriesCollectionOutput, err error)
GetCategories lists all categories. https://developer.skroutz.gr/api/v3/category/#list-all-categories
func (*Categories) GetCategoryFavorites ¶
func (c *Categories) GetCategoryFavorites(categoryID int) (out *GetManufacturersCollectionOutput, err error)
GetCategoryFavorites list a category's favorites.Requires user token with the 'favorites' permission. https://developer.skroutz.gr/api/v3/category/#list-a-categorys-favorites
func (*Categories) GetCategoryManufacturers ¶
func (c *Categories) GetCategoryManufacturers(categoryID int) (out *GetManufacturersCollectionOutput, err error)
GetCategoryManufacturers list a category's manufacturers. https://developer.skroutz.gr/api/v3/category/#list-a-categorys-manufacturers
func (*Categories) GetCategorySpecifications ¶
func (c *Categories) GetCategorySpecifications(categoryID int) (out *GetSpecificationCollectionOutput, err error)
GetCategorySpecifications list a category's specifications. https://developer.skroutz.gr/api/v3/category/#list-a-categorys-specifications
func (*Categories) GetCategorySpecificationsByGroup ¶
func (c *Categories) GetCategorySpecificationsByGroup(categoryID int) (out *GetSpecificationGroupCollectionOutput, err error)
GetCategorySpecificationsByGroup list a category's specifications.
func (*Categories) GetChildrenCategories ¶
func (c *Categories) GetChildrenCategories(categoryID int) (out *GetCategoriesCollectionOutput, err error)
GetChildrenCategories list the children categories of a category. https://developer.skroutz.gr/api/v3/category/#list-the-children-categories-of-a-category
func (*Categories) GetParentCategory ¶
func (c *Categories) GetParentCategory(categoryID int) (out *GetSingleCategoryOutput, err error)
GetParentCategory retrieve the parent of a category. https://developer.skroutz.gr/api/v3/category/#retrieve-the-parent-of-a-category
func (*Categories) GetRootCategory ¶
func (c *Categories) GetRootCategory() (out *GetSingleCategoryOutput, err error)
GetRootCategory retrieve the root category https://developer.skroutz.gr/api/v3/category/#retrieve-the-root-category
func (*Categories) GetSingleCategory ¶
func (c *Categories) GetSingleCategory(categoryID int) (out *GetSingleCategoryOutput, err error)
GetSingleCategory retrieve a single category. https://developer.skroutz.gr/api/v3/category/#retrieve-a-single-category
type Client ¶
type Client struct { *Config User *User Search *Search Categories *Categories SKUS *SKUS Products *Products FlagsContent *FlagsContent FilterGroups *FilterGroups Shops *Shops Manufacturers *Manufacturers }
Client struct.
type Description ¶
Description error.
type Error ¶
type Error struct { Status string StatusCode int Description []Description `json:"errors"` }
Error response struct.
type ErrorDescription ¶
type ErrorDescription struct {
Description []Description `json:"errors"`
}
ErrorDescription contains error json from the skroutz api.
type FilterGroups ¶
type FilterGroups struct {
*Client
}
FilterGroups client.
func (*FilterGroups) GetFilterGroups ¶
func (c *FilterGroups) GetFilterGroups(categoryID int) (out *GetFilterGroupCollectionOutput, err error)
GetFilterGroups list FilterGroups. https://developer.skroutz.gr/api/v3/filter_groups/#list-filtergroups
type FlagsContent ¶
type FlagsContent struct {
*Client
}
FlagsContent client.
func (*FlagsContent) GetAllFlags ¶
func (c *FlagsContent) GetAllFlags() (out *GetFlagsOptionCollectionOutput, err error)
GetAllFlags retrieve all flags. https://developer.skroutz.gr/api/v3/flag/#retrieve-all-flags
type GetAlternativeOutput ¶
type GetAlternativeOutput struct { Term string `json:"term"` Count int `json:"count"` Important bool `json:"important"` Drops []GetDropOutput `json:"drop"` }
GetAlternativeOutput struct for meta.
type GetAutocompleteCollectionOutput ¶
type GetAutocompleteCollectionOutput struct {
Autocomplete []GetAutocompleteOutput `json:"autocomplete"`
}
GetAutocompleteCollectionOutput struct.
type GetAutocompleteOutput ¶
type GetAutocompleteOutput struct { K string `json:"k"` I int64 `json:"i"` D struct { N string `json:"n"` ID int64 `json:"id"` } `json:"d"` }
GetAutocompleteOutput struct.
type GetAverageCollectionOutput ¶
type GetAverageCollectionOutput struct { Average []GetAverageOutput `json:"average"` Lowest []GetAverageOutput `json:"lowest"` }
GetAverageCollectionOutput request output.
type GetAverageOutput ¶
type GetAverageOutput struct { Date string `json:"date"` Price float64 `json:"price"` ShopName string `json:"shop_name"` }
GetAverageOutput request output.
type GetCategoriesCollectionOutput ¶
type GetCategoriesCollectionOutput struct { Categories []GetCategoryOutput `json:"categories"` Meta GetMetaOutput `json:"meta"` }
GetCategoriesCollectionOutput request output.
type GetCategoryOutput ¶
type GetCategoryOutput struct { ID int `json:"id"` Name string `json:"name"` ChildrenCount int `json:"children_count"` ImageURL string `json:"image_url"` ParentID int `json:"parent_id"` Fashion bool `json:"fashion"` LayoutMode string `json:"layout_mode"` WebURI string `json:"web_uri"` Code string `json:"code"` Path string `json:"path"` ShowSpecifications bool `json:"show_specifications"` ManufacturerTitle string `json:"manufacturer_title"` }
GetCategoryOutput request output.
type GetDropOutput ¶
GetDropOutput request output.
type GetFLOutput ¶
type GetFLOutput struct {
Name string `url:"name,omitempty"`
}
GetFLOutput request output.
type GetFOutput ¶
type GetFOutput struct {
SkuID int64 `url:"sku_id,omitempty"`
}
GetFOutput request output.
type GetFavoriteListOutput ¶
type GetFavoriteListOutput struct { ID int64 `json:"id"` Name string `json:"name"` CategoryID int64 `json:"category_id"` }
GetFavoriteListOutput request output.
type GetFavoriteListQueryInput ¶
type GetFavoriteListQueryInput struct {
GetFLOutput `url:"favorite_list"`
}
GetFavoriteListQueryInput request input.
type GetFavoriteOutput ¶
type GetFavoriteOutput struct { ID int `json:"id"` HaveIt bool `json:"have_it"` UserID int64 `json:"user_id"` UserNotes string `json:"user_notes"` SkuID int64 `json:"sku_id"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` GetAbsoluteThreshold string `json:"get_absolute_threshold"` }
GetFavoriteOutput request output.
type GetFavoriteQueryInput ¶
type GetFavoriteQueryInput struct {
GetFOutput `url:"favorite"`
}
GetFavoriteQueryInput request input.
type GetFavoritesCollectionOutput ¶
type GetFavoritesCollectionOutput struct { Favorites []GetFavoriteOutput `json:"favorites"` Meta GetMetaOutput `json:"meta"` }
GetFavoritesCollectionOutput request output.
type GetFilterGroupCollectionOutput ¶
type GetFilterGroupCollectionOutput struct { FilterGroups []GetFilterGroupOutput `json:"filter_groups"` Meta GetMetaOutput `json:"meta"` }
GetFilterGroupCollectionOutput request output.
type GetFilterGroupOutput ¶
type GetFilterGroupOutput struct { ID int64 `json:"id"` Name string `json:"name"` Active bool `json:"active"` CategoryID int64 `json:"category_id"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` Hint string `json:"hint"` Combined bool `json:"combined"` FilterType int `json:"filter_type"` }
GetFilterGroupOutput request output.
type GetFlagOutput ¶
type GetFlagOutput struct {
Reason string `url:"reason,omitempty"`
}
GetFlagOutput request output.
type GetFlagQueryInput ¶
type GetFlagQueryInput struct {
Flag GetFlagOutput `url:"flag"`
}
GetFlagQueryInput request input.
type GetFlagsOptionCollectionOutput ¶
type GetFlagsOptionCollectionOutput struct {
Flags []GetFlagsOptionOutput `json:"flags"`
}
GetFlagsOptionCollectionOutput request output.
type GetFlagsOptionOutput ¶
type GetFlagsOptionOutput struct { Reason string `json:"reason"` Description string `json:"description"` }
GetFlagsOptionOutput request output.
type GetGroupsCollectionOutput ¶
type GetGroupsCollectionOutput struct {
Groups []GetGroupsOutput `json:"groups"`
}
GetGroupsCollectionOutput request output.
type GetGroupsOutput ¶
type GetGroupsOutput struct { ID float64 `json:"id"` Name string `json:"name"` Order float64 `json:"order"` }
GetGroupsOutput request output.
type GetLocationOutput ¶
type GetLocationOutput struct { ID int64 `json:"id"` Headquarter bool `json:"headquarter"` Phones []string `json:"phones"` PickupPoint bool `json:"pickup_point"` Store bool `json:"store"` FullAddress string `json:"full_address"` Structured string `json:"structured"` Lat string `json:"lat"` Lng string `json:"lng"` Info string `json:"info"` Address Address `json:"address"` }
GetLocationOutput request output.
type GetLocationsCollectionOutput ¶
type GetLocationsCollectionOutput struct { Locations []GetLocationOutput `json:"locations"` Meta GetMetaOutput `json:"meta"` }
GetLocationsCollectionOutput request output.
type GetManufacturerOutput ¶
type GetManufacturerOutput struct { ID float64 `json:"id"` Name string `json:"name"` ImageURL string `json:"image_url"` }
GetManufacturerOutput request output.
type GetManufacturersCollectionOutput ¶
type GetManufacturersCollectionOutput struct { Manufacturers []GetSpecificationOutput `json:"manufacturers"` Meta GetMetaOutput `json:"meta"` }
GetManufacturersCollectionOutput request output.
type GetMetaOutput ¶
type GetMetaOutput struct { Q string `json:"q,omitempty"` Alternatives []GetAlternativeOutput `json:"alternatives,omitempty"` StrongMatches struct { SKU GetSKUOutput `json:"sku,omitempty"` Manufacturer GetManufacturerOutput `json:"manufacturer,omitempty"` GetCategoryOutput GetCategoryOutput `json:"category,omitempty"` } `json:"strong_matches,omitempty"` OrderedBy string `json:"ordered_by,omitempty"` AvailableFilters struct { Filters map[string]int64 `json:"filters,omitempty"` Manufacturers map[string]int64 `json:"manufacturers,omitempty"` } `json:"available_filters,omitempty"` AppliedFilters struct { Filters []int64 `json:"filters,omitempty"` Manufacturers []int64 `json:"manufacturers,omitempty"` } `json:"applied_filters,omitempty"` ShowInTiles bool `json:"show_in_tiles,omitempty"` SKURatingBreakdown []GetSKURatingBreakdownOutput `json:"sku_rating_breakdown,omitempty"` Pagination GetPaginationOutput `json:"pagination"` }
GetMetaOutput struct contains all the metadata for the api response.
type GetPaginationOutput ¶
type GetPaginationOutput struct { TotalResults int `json:"total_results"` TotalPages int `json:"total_pages"` Page int `json:"page"` Per int `json:"per"` }
TotalResults request output.
type GetPriceHistoryCollectionOutput ¶
type GetPriceHistoryCollectionOutput struct {
AverageCollection GetAverageCollectionOutput `json:"history"`
}
GetPriceHistoryCollectionOutput request output.
type GetProductOutput ¶
type GetProductOutput struct { ID int64 `json:"id"` Name string `json:"name"` SkuID int64 `json:"sku_id"` ShopID int64 `json:"shop_id"` CategoryID int64 `json:"category_id"` Availability string `json:"availability"` ClickURL string `json:"click_url"` ShopUID string `json:"shop_uid"` Expenses string `json:"expenses"` WebURI string `json:"web_uri"` Price float64 `json:"price"` Sizes []string `json:"sizes"` ImmediatePickup bool `json:"immediate_pickup"` }
GetProductOutput request output.
type GetProductsCollectionOutput ¶
type GetProductsCollectionOutput struct { Products []GetProductOutput `json:"products"` Meta GetMetaOutput `json:"meta"` }
GetProductsCollectionOutput request output.
type GetReviewOutput ¶
type GetReviewOutput struct { ID int64 `json:"id"` UserID int64 `json:"user_id"` Review string `json:"review"` Rating int64 `json:"rating"` CreatedAt string `json:"created_at"` Demoted bool `json:"demoted"` VotesCount int64 `json:"votes_count"` HelpfulVotesCount int64 `json:"helpful_votes_count"` Voted bool `json:"voted"` Flagged bool `json:"flagged"` Helpful bool `json:"helpful"` }
GetReviewOutput request output.
type GetReviewsCollectionOutput ¶
type GetReviewsCollectionOutput struct { Reviews []GetReviewOutput `json:"reviews"` Meta GetMetaOutput `json:"meta"` }
GetReviewsCollectionOutput request output.
type GetSKUOutput ¶
type GetSKUOutput struct { ID int64 `json:"id"` EAN string `json:"ean"` PN string `json:"pn"` Name string `json:"name"` DisplayName string `json:"display_name"` CategoryID int64 `json:"category_id"` FirstProductShopInfo string `json:"first_product_shop_info"` ClickURL string `json:"click_url"` PriceMax float64 `json:"price_max"` PriceMin float64 `json:"price_min"` ReviewScore float64 `json:"review_score"` ShopCount int `json:"shop_count"` PlainSpecSummary string `json:"plain_spec_summary"` ManufacturerID int64 `json:"manufacturer_id"` Future bool `json:"future"` ReviewsCount int `json:"reviews_count"` Virtual bool `json:"virtual"` WebURI string `json:"web_uri"` Comparable bool `json:"comparable"` Images struct { Main string `json:"main"` Alternatives []string `json:"alternatives"` } `json:"images"` }
GetSKUOutput request output.
type GetSKURatingBreakdownOutput ¶
type GetSKURatingBreakdownOutput struct { Star int64 `json:"star"` Percentage int `json:"percentage"` Count int `json:"count"` }
GetSKURatingBreakdownOutput request output.
type GetSKUReviewFlagOutput ¶
type GetSKUReviewFlagOutput struct { ID int64 `json:"id"` FlaggableID int64 `json:"flaggable_id"` FlaggableType string `json:"flaggable_type"` UserID int64 `json:"user_id"` Reason string `json:"reason"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` }
GetSKUReviewFlagOutput request output.
type GetSKUReviewVoteOutput ¶
type GetSKUReviewVoteOutput struct { ID int64 `json:"id"` SKUReviewID int64 `json:"sku_review_id"` UserID int64 `json:"user_id"` Helpful bool `json:"helpful"` CreatedAt string `json:"created_at"` Review GetReviewOutput `json:"sku_review"` }
GetSKUReviewVoteOutput request output.
type GetSKUSCollectionOutput ¶
type GetSKUSCollectionOutput struct { SKU []GetSKUOutput `json:"skus"` Meta GetMetaOutput `json:"meta"` }
GetSKUSCollectionOutput request output.
type GetSKUSSpecificationsCollectionsOutput ¶
type GetSKUSSpecificationsCollectionsOutput struct { Specifications []GetSpecificationOutput `json:"specifications,omitempty"` Groups []GetGroupsOutput `json:"groups,omitempty"` }
GetSKUSSpecificationsCollectionsOutput request output.
type GetSearchQueryInput ¶
type GetSearchQueryInput struct { Q string `url:"q,omitempty"` ManufacturerIDS []string `url:"manufacturer_ids,brackets"` FilterIDS []string `url:"filter_ids,brackets"` IncludeMeta []string `url:"include_meta,brackets"` Include string `url:"include,omitempty"` Embed string `url:"embed,omitempty"` HaveIt bool `url:"have_it,omitempty"` }
GetSearchQueryInput request input.
type GetShopOutput ¶
type GetShopOutput struct { ID int64 `json:"id"` Name string `json:"name"` Link string `json:"link"` Phone string `json:"phone"` ImageURL string `json:"image_url"` ThumbshotURL string `json:"thumbshot_url"` ReviewsCount int64 `json:"reviews_count"` LatestReviewsCount int64 `json:"latest_reviews_count"` ReviewScore float64 `json:"review_score"` PaymentMethods map[string]interface{} `json:"payment_methods"` Shipping map[string]interface{} `json:"shipping"` WebURI string `json:"web_uri"` ExtraInfo map[string]interface{} `json:"extra_info"` TopPositiveReasons []string `json:"top_positive_reasons"` }
GetShopOutput request output.
type GetShopReviewOutput ¶
type GetShopReviewOutput struct { ID int64 `json:"id"` UserID int64 `json:"user_id"` Review string `json:"review"` Rating float64 `json:"rating"` ShopReply string `json:"shop_reply"` CreatedAt string `json:"created_at"` Negative bool `json:"negative"` Reasons []string `json:"reasons"` }
GetShopReviewOutput request output.
type GetShopReviewsCollectionOutput ¶
type GetShopReviewsCollectionOutput struct { ShopReviews []GetShopReviewOutput `json:"reviews"` Meta GetMetaOutput `json:"meta"` }
GetShopReviewsCollectionOutput requets output.
type GetShopsCollectionOutput ¶
type GetShopsCollectionOutput struct { Shops []GetShopOutput `json:"shops"` Meta GetMetaOutput `json:"meta"` }
GetShopsCollectionOutput request output.
type GetSingleCategoryOutput ¶
type GetSingleCategoryOutput struct {
Category GetCategoryOutput `json:"category"`
}
GetSingleCategoryOutput request output.
type GetSingleFavoriteListOutput ¶
type GetSingleFavoriteListOutput struct {
FavoriteList GetFavoriteListOutput `json:"favorite_list"`
}
GetSingleFavoriteListOutput request output.
type GetSingleFavoriteOutput ¶
type GetSingleFavoriteOutput struct {
Favorite GetFavoriteOutput `json:"favorite"`
}
GetSingleFavoriteOutput request output.
type GetSingleManufacturerOutput ¶
type GetSingleManufacturerOutput struct {
Manufacturer GetManufacturerOutput `json:"manufacturer"`
}
GetSingleManufacturerOutput request output.
type GetSingleProductOutput ¶
type GetSingleProductOutput struct {
Product GetProductOutput `json:"product"`
}
GetSingleProductOutput request output.
type GetSingleSKUOutput ¶
type GetSingleSKUOutput struct {
SKU GetSKUOutput `json:"sku"`
}
GetSingleSKUOutput request output.
type GetSingleShopLocationOutput ¶
type GetSingleShopLocationOutput struct {
Location GetLocationOutput `json:"location"`
}
GetSingleShopLocationOutput request output.
type GetSingleShopOutput ¶
type GetSingleShopOutput struct {
Shop GetShopOutput `json:"shop"`
}
GetSingleShopOutput request output.
type GetSpecificationCollectionOutput ¶
type GetSpecificationCollectionOutput struct {
Specifications []GetSpecificationOutput `json:"specifications"`
}
GetSpecificationCollectionOutput request output.
type GetSpecificationGroupCollectionOutput ¶
type GetSpecificationGroupCollectionOutput struct {
Groups []GetSpecificationOutput `json:"groups"`
}
GetSpecificationGroupCollectionOutput request output.
type GetSpecificationOutput ¶
type GetSpecificationOutput struct { ID float64 `json:"id"` Name string `json:"name"` Values []string `json:"values"` Order float64 `json:"order"` Unit string `json:"unit"` }
GetSpecificationOutput request output.
type GetUserFavoriteListsCollectionOutput ¶
type GetUserFavoriteListsCollectionOutput struct { FavoriteList []GetFavoriteListOutput `json:"favorite_lists"` Meta GetMetaOutput `json:"meta"` }
GetUserFavoriteListsCollectionOutput request output.
type GetUserOutput ¶
type GetUserOutput struct { User struct { ID float64 `json:"id"` Username string `json:"username"` Sex string `json:"sex"` Avatar string `json:"avatar"` Type string `json:"type"` } `json:"user"` }
GetUserOutput request output.
type GetVoteOutput ¶
type GetVoteOutput struct {
Helpful bool `url:"helpful,omitempty"`
}
GetVoteOutput request output.
type GetVoteQueryInput ¶
type GetVoteQueryInput struct { Embed string `url:"embed,omitempty"` Vote GetVoteOutput `url:"vote"` }
GetVoteQueryInput request input.
type Manufacturers ¶
type Manufacturers struct {
*Client
}
Manufacturers client.
func NewManufacturers ¶
func NewManufacturers(config *Config) *Manufacturers
NewManufacturers client.
func (*Manufacturers) GetManufacturers ¶
func (c *Manufacturers) GetManufacturers() (out *GetManufacturersCollectionOutput, err error)
GetManufacturers list manufacturers. https://developer.skroutz.gr/api/v3/manufacturer/#list-manufacturers
func (*Manufacturers) GetManufacturersCategories ¶
func (c *Manufacturers) GetManufacturersCategories(manufacturerID int) (out *GetCategoriesCollectionOutput, err error)
GetManufacturersCategories retrieve a manufacturer's categories. https://developer.skroutz.gr/api/v3/manufacturer/#retrieve-a-manufacturers-categories
func (*Manufacturers) GetManufacturersSKUS ¶
func (c *Manufacturers) GetManufacturersSKUS(manufacturerID int) (out *GetSKUSCollectionOutput, err error)
GetManufacturersSKUS retrieve a manufacturer's SKUs. https://developer.skroutz.gr/api/v3/manufacturer/#retrieve-a-manufacturers-skus
func (*Manufacturers) GetSingleManufacturer ¶
func (c *Manufacturers) GetSingleManufacturer(manufacturerID int) (out *GetSingleManufacturerOutput, err error)
GetSingleManufacturer retrieve a single manufacturer. https://developer.skroutz.gr/api/v3/manufacturer/#retrieve-a-single-manufacturer
type Products ¶
type Products struct {
*Client
}
Products client.
func (*Products) GetSingleProduct ¶
func (c *Products) GetSingleProduct(productID int) (out *GetSingleProductOutput, err error)
GetSingleProduct retrieve a single product. https://developer.skroutz.gr/api/v3/product/#retrieve-a-single-product
func (*Products) SearchProducts ¶
func (c *Products) SearchProducts(shopID int, shopUID string) (out *GetProductsCollectionOutput, err error)
SearchProducts search for products. https://developer.skroutz.gr/api/v3/product/#search-for-products
type SKUS ¶
type SKUS struct {
*Client
}
SKUS client.
func (*SKUS) FlagSKUReview ¶
func (c *SKUS) FlagSKUReview(skuID int, reviewID int, f *GetFlagQueryInput) (out *GetSKUReviewFlagOutput, err error)
FlagSKUReview flag a SKU's review. https://developer.skroutz.gr/api/v3/sku/#flag-a-skus-review
func (*SKUS) GetCategorySKUS ¶
func (c *SKUS) GetCategorySKUS(categoryID int, sq *GetSearchQueryInput) (out *GetSKUSCollectionOutput, err error)
GetCategorySKUS list SKUs of specific category. https://developer.skroutz.gr/api/v3/sku/#list-skus-of-specific-category
func (*SKUS) GetSKUSFavorite ¶
func (c *SKUS) GetSKUSFavorite(skuID int) (out *GetFavoritesCollectionOutput, err error)
GetSKUSFavorite retrieve an SKU's favorite. https://developer.skroutz.gr/api/v3/sku/#retrieve-an-skus-favorite
func (*SKUS) GetSKUSPriceHistory ¶
func (c *SKUS) GetSKUSPriceHistory(skuID int) (out *GetPriceHistoryCollectionOutput, err error)
GetSKUSPriceHistory retrieve a SKU's price history. https://developer.skroutz.gr/api/v3/sku/#retrieve-a-skus-price-history
func (*SKUS) GetSKUSProducts ¶
func (c *SKUS) GetSKUSProducts(skuID int) (out *GetProductsCollectionOutput, err error)
GetSKUSProducts retrieve an SKU's products. https://developer.skroutz.gr/api/v3/sku/#retrieve-an-skus-products
func (*SKUS) GetSKUSReviews ¶
func (c *SKUS) GetSKUSReviews(skuID int, sq *GetSearchQueryInput) (out *GetReviewsCollectionOutput, err error)
GetSKUSReviews retrieve an SKU's reviews. https://developer.skroutz.gr/api/v3/sku/#retrieve-an-skus-reviews
func (*SKUS) GetSKUSSpecifications ¶
func (c *SKUS) GetSKUSSpecifications(skuID int, sq *GetSearchQueryInput) (out *GetSKUSSpecificationsCollectionsOutput, err error)
GetSKUSSpecifications retrieve an SKU's specifications. https://developer.skroutz.gr/api/v3/sku/#retrieve-an-skus-specifications
func (*SKUS) GetSimilarSKUS ¶
func (c *SKUS) GetSimilarSKUS(skuID int) (out *GetSKUSCollectionOutput, err error)
GetSimilarSKUS retrieve similar SKUs. https://developer.skroutz.gr/api/v3/sku/#retrieve-similar-skus
func (*SKUS) GetSingleSKU ¶
func (c *SKUS) GetSingleSKU(skuID int) (out *GetSingleSKUOutput, err error)
GetSingleSKU retrieve a single SKU. https://developer.skroutz.gr/api/v3/sku/#retrieve-a-single-sku
func (*SKUS) VoteSKUReview ¶
func (c *SKUS) VoteSKUReview(skuID int, reviewID int, v *GetVoteQueryInput) (out *GetSKUReviewVoteOutput, err error)
VoteSKUReview vote a SKU's review. https://developer.skroutz.gr/api/v3/sku/#vote-a-skus-review
type Search ¶
type Search struct {
*Client
}
Search client.
func (*Search) Autocomplete ¶
func (c *Search) Autocomplete(query string) (out *GetAutocompleteCollectionOutput, err error)
Autocomplete query with less than 2 characters https://developer.skroutz.gr/api/v3/search/#autocomplete
func (*Search) Search ¶
func (c *Search) Search(query string) (out *GetCategoriesCollectionOutput, err error)
Search query with less than 2 characters https://developer.skroutz.gr/api/v3/search/#search
type Shops ¶
type Shops struct {
*Client
}
Shops client.
func (*Shops) GetShopLocations ¶
func (c *Shops) GetShopLocations(shopID int, sq *GetSearchQueryInput) (out *GetLocationsCollectionOutput, err error)
GetShopLocations list shop locations. https://developer.skroutz.gr/api/v3/shop/#list-shop-locations
func (*Shops) GetShopReviews ¶
func (c *Shops) GetShopReviews(shopID int, sq *GetSearchQueryInput) (out *GetShopReviewsCollectionOutput, err error)
GetShopReviews retrieve a shop's reviews. https://developer.skroutz.gr/api/v3/shop/#retrieve-a-shops-reviews
func (*Shops) GetSingleShop ¶
func (c *Shops) GetSingleShop(shopID int) (out *GetSingleShopOutput, err error)
GetSingleShop retrieve a single shop. https://developer.skroutz.gr/api/v3/shop/#retrieve-a-single-shop
func (*Shops) GetSingleShopLocation ¶
func (c *Shops) GetSingleShopLocation(shopID int, locationID int, sq *GetSearchQueryInput) (out *GetSingleShopLocationOutput, err error)
GetSingleShopLocation retrieve a single shop location. https://developer.skroutz.gr/api/v3/shop/#retrieve-a-single-shop-location
func (*Shops) SearchShop ¶
func (c *Shops) SearchShop(sq *GetSearchQueryInput) (out *GetShopsCollectionOutput, err error)
SearchShop search for shops https://developer.skroutz.gr/api/v3/shop/#search-for-shops
type User ¶
type User struct {
*Client
}
User client.
func (*User) CreateFavorite ¶
func (c *User) CreateFavorite(f *GetFavoriteQueryInput) (out *GetSingleFavoriteOutput, err error)
CreateFavorite ... https://developer.skroutz.gr/api/v3/favorites/#create-a-new-favorite
func (*User) CreateFavoriteList ¶
func (c *User) CreateFavoriteList(fl *GetFavoriteListQueryInput) (out *GetFavoriteListQueryInput, err error)
CreateFavoriteList ... https://developer.skroutz.gr/api/v3/favorites/#create-a-favoritelist
func (*User) DeleteFavorite ¶
func (c *User) DeleteFavorite(favoriteID int) (io.ReadCloser, error)
DeleteFavorite ... https://developer.skroutz.gr/api/v3/favorites/#destroy-a-favorite
func (*User) DeleteFavoriteList ¶
func (c *User) DeleteFavoriteList(favoriteListID int) (io.ReadCloser, error)
DeleteFavoriteList ... https://developer.skroutz.gr/api/v3/favorites/#destroy-a-favoritelist
func (*User) GetListFavoritesBelongingToList ¶
func (c *User) GetListFavoritesBelongingToList(favoriteListID int) (out *GetFavoritesCollectionOutput, err error)
GetListFavoritesBelongingToList ... https://developer.skroutz.gr/api/v3/favorites/#list-favorites-belonging-to-list
func (*User) GetUser ¶
func (c *User) GetUser() (out *GetUserOutput, err error)
GetUser retrieve the profile of the authenticated user. https://developer.skroutz.gr/api/v3/user/#retrieve-the-profile-of-the-authenticated-user
func (*User) GetUserFavoriteLists ¶
func (c *User) GetUserFavoriteLists() (out *GetUserFavoriteListsCollectionOutput, err error)
GetUserFavoriteLists list favorite lists. https://developer.skroutz.gr/api/v3/favorites/#list-favorite-lists
func (*User) GetUserFavorites ¶
func (c *User) GetUserFavorites() (out *GetFavoritesCollectionOutput, err error)
GetUserFavorites ... https://developer.skroutz.gr/api/v3/favorites/#list-favorites
func (*User) GetUserSingleFavorite ¶
func (c *User) GetUserSingleFavorite(favoriteListID int) (out *GetSingleFavoriteOutput, err error)
GetUserSingleFavorite ... https://developer.skroutz.gr/api/v3/favorites/#retrieve-a-single-favorite
func (*User) UpdateFavorite ¶
func (c *User) UpdateFavorite(favoriteID int, sq *GetSearchQueryInput) (out *GetSingleFavoriteOutput, err error)
UpdateFavorite ... https://developer.skroutz.gr/api/v3/favorites/#update-a-favorite