Documentation ¶
Overview ¶
Package awin In the awin package you will find all required functions and structs to communicate with the Awin.com services.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AwinClient ¶
type AwinClient struct {
// contains filtered or unexported fields
}
AwinClient / client that takes over the communication with the Awin endpoints as well as parsing the response csv data into structs. / apiKey You can get the download API key from a standard feed download as given by Create-a-Feed. You can also get the full download link including the relevant API key to access this file from the Create-a-Feed section in the interface (Awin interface --> Toolbox --> Create-a-Feed).
func NewAwinClient ¶
func NewAwinClient(apiKey string, client *http.Client) *AwinClient
func NewAwinClientWithHttp ¶ added in v0.1.0
func NewAwinClientWithHttp(apiKey string, client *http.Client) *AwinClient
NewAwinClientWithHzzp / Returns a new NewAwinClientWithHzzp. Needs a http.Client passed from outside. / client Required to be passed from the caller / returns a new instance of AwinClient
func (AwinClient) FetchDataFeed ¶
func (c AwinClient) FetchDataFeed(options *DataFeedOptions) (*[]DataFeedEntry, error)
func (AwinClient) FetchDataFeedFromUrl ¶ added in v0.1.0
func (c AwinClient) FetchDataFeedFromUrl(url string) (*[]DataFeedEntry, error)
func (AwinClient) FetchDataFeedList ¶
func (c AwinClient) FetchDataFeedList() (*[]DataFeedListRow, error)
type DataFeedEntry ¶
type DataFeedEntry struct { AwDeepLink string `json:"aw_deep_link,omitempty" csv:"aw_deep_link"` ProductName string `json:"product_name,omitempty" csv:"product_name"` AwProductId string `json:"aw_product_id,omitempty" csv:"aw_product_id"` MerchantProductId string `json:"merchant_product_id,omitempty" csv:"merchant_product_id"` MerchantImageUrl string `json:"merchant_image_url,omitempty" csv:"merchant_image_url"` Description string `json:"description,omitempty" csv:"description"` MerchantCategory string `json:"merchant_category,omitempty" csv:"merchant_category"` SearchPrice string `json:"search_price,omitempty" csv:"search_price"` MerchantName string `json:"merchant_name,omitempty" csv:"merchant_name"` MerchantId string `json:"merchant_id,omitempty" csv:"merchant_id"` CategoryName string `json:"category_name,omitempty" csv:"category_name"` CategoryId string `json:"category_id,omitempty" csv:"category_id"` AwImageUrl string `json:"aw_image_url,omitempty" csv:"aw_image_url"` Currency string `json:"currency,omitempty" csv:"currency"` StorePrice string `json:"store_price,omitempty" csv:"store_price"` DeliveryCost string `json:"delivery_cost,omitempty" csv:"delivery_cost"` MerchantDeepLink string `json:"merchant_deep_link,omitempty" csv:"merchant_deep_link"` Language string `json:"language,omitempty" csv:"language"` LastUpdated string `json:"last_updated,omitempty" csv:"last_updated"` DisplayPrice string `json:"display_price,omitempty" csv:"display_price"` DataFeedId string `json:"data_feed_id,omitempty" csv:"data_feed_id"` BrandName string `json:"brand_name,omitempty" csv:"brand_name"` BrandId string `json:"brand_id,omitempty" csv:"brand_id"` Colour string `json:"colour,omitempty" csv:"colour"` ProductShortDescription string `json:"product_short_description,omitempty" csv:"product_short_description"` Specifications string `json:"specifications,omitempty" csv:"specifications"` Condition string `json:"condition,omitempty" csv:"condition"` ProductModel string `json:"product_model,omitempty" csv:"product_model"` ModelNumber string `json:"model_number,omitempty" csv:"model_number"` Dimensions string `json:"dimensions,omitempty" csv:"dimensions"` Keywords string `json:"keywords,omitempty" csv:"keywords"` PromotionalText string `json:"promotional_text,omitempty" csv:"promotional_text"` ProductType string `json:"product_type,omitempty" csv:"product_type"` CommissionGroup string `json:"commission_group,omitempty" csv:"commission_group"` MerchantProductCategoryPath string `json:"merchant_product_category_path,omitempty" csv:"merchant_product_category_path"` MerchantProductSecondCategory string `json:"merchant_product_second_category,omitempty" csv:"merchant_product_second_category"` MerchantProductThirdCategory string `json:"merchant_product_third_category,omitempty" csv:"merchant_product_third_category"` RrpPrice string `json:"rrp_price,omitempty" csv:"rrp_price"` Saving string `json:"saving,omitempty" csv:"saving"` SavingsPercent string `json:"savings_percent,omitempty" csv:"savings_percent"` BasePrice string `json:"base_price,omitempty" csv:"base_price"` BasePriceAmount string `json:"base_price_amount,omitempty" csv:"base_price_amount"` BasePriceText string `json:"base_price_text,omitempty" csv:"base_price_text"` ProductPriceOld string `json:"product_price_old,omitempty" csv:"product_price_old"` DeliveryRestrictions string `json:"delivery_restrictions,omitempty" csv:"delivery_restrictions"` DeliveryWeight string `json:"delivery_weight,omitempty" csv:"delivery_weight"` Warranty string `json:"warranty,omitempty" csv:"warranty"` TermsOfContract string `json:"terms_of_contract,omitempty" csv:"terms_of_contract"` DeliveryTime string `json:"delivery_time,omitempty" csv:"delivery_time"` InStock string `json:"in_stock,omitempty" csv:"in_stock"` StockQuantity string `json:"stock_quantity,omitempty" csv:"stock_quantity"` ValidFrom string `json:"valid_from,omitempty" csv:"valid_from"` ValidTo string `json:"valid_to,omitempty" csv:"valid_to"` IsForSale string `json:"is_for_sale,omitempty" csv:"is_for_sale"` WebOffer string `json:"web_offer,omitempty" csv:"web_offer"` PreOrder string `json:"pre_order,omitempty" csv:"pre_order"` StockStatus string `json:"stock_status,omitempty" csv:"stock_status"` SizeStockStatus string `json:"size_stock_status,omitempty" csv:"size_stock_status"` SizeStockAmount string `json:"size_stock_amount,omitempty" csv:"size_stock_amount"` MerchantThumbUrl string `json:"merchant_thumb_url,omitempty" csv:"merchant_thumb_url"` LargeImage string `json:"large_image,omitempty" csv:"large_image"` AlternateImage string `json:"alternate_image,omitempty" csv:"alternate_image"` AwThumbUrl string `json:"aw_thumb_url,omitempty" csv:"aw_thumb_url"` AlternateImageTwo string `json:"alternate_image_two,omitempty" csv:"alternate_image_two"` AlternateImageThree string `json:"alternate_image_three,omitempty" csv:"alternate_image_three"` AlternateImageFour string `json:"alternate_image_four,omitempty" csv:"alternate_image_four"` Reviews string `json:"reviews,omitempty" csv:"reviews"` AverageRating string `json:"average_rating,omitempty" csv:"average_rating"` Rating string `json:"rating,omitempty" csv:"rating"` NumberAvailable string `json:"number_available,omitempty" csv:"number_available"` Custom1 string `json:"custom_1,omitempty" csv:"custom_1"` Custom2 string `json:"custom_2,omitempty" csv:"custom_2"` Custom3 string `json:"custom_3,omitempty" csv:"custom_3"` Custom4 string `json:"custom_4,omitempty" csv:"custom_4"` Custom5 string `json:"custom_5,omitempty" csv:"custom_5"` Custom6 string `json:"custom_6,omitempty" csv:"custom_6"` Custom7 string `json:"custom_7,omitempty" csv:"custom_7"` Custom8 string `json:"custom_8,omitempty" csv:"custom_8"` Custom9 string `json:"custom_9,omitempty" csv:"custom_9"` Ean string `json:"ean,omitempty" csv:"ean"` Isbn string `json:"isbn,omitempty" csv:"isbn"` Upc string `json:"upc,omitempty" csv:"upc"` Mpn string `json:"mpn,omitempty" csv:"mpn"` ParentProductId string `json:"parent_product_id,omitempty" csv:"parent_product_id"` ProductGtin string `json:"product_gtin,omitempty" csv:"product_GTIN"` BasketLink string `json:"basket_link,omitempty" csv:"basket_link"` }
type DataFeedListRow ¶
type DataFeedListRow struct { AdvertiserID string `json:"advertiser_id,omitempty" csv:"Advertiser ID"` AdvertiserName string `json:"advertiser_name,omitempty" csv:"Advertiser Name"` PrimaryRegion string `json:"primary_region,omitempty" csv:"Primary Region"` MembershipStatus string `json:"membership_status,omitempty" csv:"Membership Status"` FeedID string `json:"feed_id,omitempty" csv:"Feed ID"` FeedName string `json:"feed_name,omitempty" csv:"Feed Name"` Language string `json:"language,omitempty" csv:"Language"` Vertical string `json:"vertical,omitempty" csv:"Vertical"` LastImported string `json:"last_imported,omitempty" csv:"Last Imported"` LastChecked string `json:"last_checked,omitempty" csv:"Last Checked"` NoOfProducts string `json:"no_of_products,omitempty" csv:"No of products"` URL string `json:"url,omitempty" csv:"URL"` }
type DataFeedOptions ¶
DataFeedOptions / FeedIds The string slice of all publisher feed ids / Language ISO 3166-1 alpha-2 – two-letter country codes e.g. de, en / ShowAdultContent true to include adult content