Documentation ¶
Overview ¶
组件API列表 auto sdk from taobao ApiMetadata.xml version 20130808 auther: dz7changkong@qq.com
Index ¶
- Constants
- type PromotionInItem
- type PromotionInShop
- type WidgetAppapiruleCheckRequest
- type WidgetAppapiruleCheckResponse
- type WidgetAppapiruleCheckResponseResult
- type WidgetItem
- type WidgetItempanelGetRequest
- type WidgetItempanelGetResponse
- type WidgetItempanelGetResponseResult
- type WidgetLoginstatusGetRequest
- type WidgetLoginstatusGetResponse
- type WidgetLoginstatusGetResponseResult
- type WidgetSku
- type WidgetSkuProps
Constants ¶
const VersionNo = "20130808"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PromotionInItem ¶
type PromotionInItem struct { Desc string `json:"desc"` EndTime string `json:"end_time"` ItemPromoPrice float64 `json:"item_promo_price"` Name string `json:"name"` OtherNeed string `json:"other_need"` OtherSend string `json:"other_send"` PromotionId string `json:"promotion_id"` SkuIdList []string `json:"sku_id_list"` SkuPriceList []float64 `json:"sku_price_list"` StartTime string `json:"start_time"` }
单品级优惠信息
type PromotionInShop ¶
type PromotionInShop struct { Name string `json:"name"` PromotionDetailDesc string `json:"promotion_detail_desc"` PromotionId string `json:"promotion_id"` }
店铺级优惠信息
type WidgetAppapiruleCheckRequest ¶
type WidgetAppapiruleCheckRequest struct {
open_taobao.TaobaoMethodRequest
}
app指定api名称获取此api的http调用方法、app是否有请求权限、是否需要授权等信息。仅支持widget入口调用。调用入口为/widget。签名方法简化为Hmac-md5,hmac(secret+‘app_key' +app_key +'timestamp' + timestamp+secret,secret)。timestamp为60分钟内有效
func (*WidgetAppapiruleCheckRequest) GetResponse ¶
func (r *WidgetAppapiruleCheckRequest) GetResponse(accessToken string) (*WidgetAppapiruleCheckResponse, []byte, error)
func (*WidgetAppapiruleCheckRequest) SetApiName ¶
func (r *WidgetAppapiruleCheckRequest) SetApiName(value string)
要判断权限的api名称,如果指定的api不存在,报错invalid method
type WidgetAppapiruleCheckResponseResult ¶
type WidgetAppapiruleCheckResponseResult struct {
Response *WidgetAppapiruleCheckResponse `json:"widget_appapirule_check_response"`
}
type WidgetItem ¶
type WidgetItem struct { AddToCart bool `json:"add_to_cart"` ApproveStatus string `json:"approve_status"` ClickUrl string `json:"click_url"` IsMall bool `json:"is_mall"` ItemId int `json:"item_id"` ItemPics []string `json:"item_pics"` ItemPromotionData []*PromotionInItem `json:"item_promotion_data"` PicUrl string `json:"pic_url"` Price string `json:"price"` Quantity int `json:"quantity"` SellerNick string `json:"seller_nick"` ShopPromotionData []*PromotionInShop `json:"shop_promotion_data"` SkuProps []*WidgetSkuProps `json:"sku_props"` Skus []*WidgetSku `json:"skus"` Title string `json:"title"` }
Widget获取到的商品信息
type WidgetItempanelGetRequest ¶
type WidgetItempanelGetRequest struct {
open_taobao.TaobaoMethodRequest
}
根据商品id获取sku选择面板需要的信息。session必传且用户当前浏览器必需已经在淘宝登陆,具体判断方法可以调用taobao.widget.loginstatus.get进行判断。会根据session生成购买链接。仅支持widget入口调用。调用入口为/widget。签名方法简化为Hmac-md5,hmac(secret+‘app_key' +app_key +'timestamp' + timestamp+secret, secret)。timestamp为60分钟内有效
func (*WidgetItempanelGetRequest) GetResponse ¶
func (r *WidgetItempanelGetRequest) GetResponse(accessToken string) (*WidgetItempanelGetResponse, []byte, error)
func (*WidgetItempanelGetRequest) SetFields ¶
func (r *WidgetItempanelGetRequest) SetFields(value string)
参数fields为选填参数,表示需要返回哪些字段,默认为空:表示所有字段都返回。指定item_id返回item_id; 指定title返回title; 指定click_url返回click_url(如果此商品有淘宝客会默认返回转换过的淘宝客连接,绑定用户为appkey对应的用户); 指定price返回price(商品价格,如果有多个sku返回的是sku的价格区间); 指定quantify返回quantity(商品总数); 指定pic_url返回pic_url(商品主图地址); 指定item_pics返回item_pics(商品图片列表); 指定skus返回skus和sku_props组合; 指定shop_promotion_data返回shop_promotion_data(商品所属的店铺优惠信息); 指定item_promotion_data返回item_promotion_data(商品的优惠信息); 指定seller_nick返回seller_nick(卖家昵称); 指定is_mall返回is_mall(是否商城商品,true表示是商城商品);add_url不可选一定会返回
func (*WidgetItempanelGetRequest) SetItemId ¶
func (r *WidgetItempanelGetRequest) SetItemId(value string)
要查询的商品的数字id,等同于Item的num_iid
type WidgetItempanelGetResponse ¶
type WidgetItempanelGetResponse struct { AddUrl string `json:"add_url"` Item *WidgetItem `json:"item"` }
type WidgetItempanelGetResponseResult ¶
type WidgetItempanelGetResponseResult struct {
Response *WidgetItempanelGetResponse `json:"widget_itempanel_get_response"`
}
type WidgetLoginstatusGetRequest ¶
type WidgetLoginstatusGetRequest struct {
open_taobao.TaobaoMethodRequest
}
获取当前浏览器用户在淘宝登陆状态。如果传了session并且此用户已在淘宝登陆,返回nick和userId。仅支持widget入口调用。调用入口为/widget。签名方法简化为Hmac-md5,hmac(secret+‘app_key' +app_key +'timestamp' + timestamp+secret, secret)。timestamp为60分钟内有效
func (*WidgetLoginstatusGetRequest) GetResponse ¶
func (r *WidgetLoginstatusGetRequest) GetResponse(accessToken string) (*WidgetLoginstatusGetResponse, []byte, error)
func (*WidgetLoginstatusGetRequest) SetNick ¶
func (r *WidgetLoginstatusGetRequest) SetNick(value string)
指定判断当前浏览器登陆用户是否此昵称用户,并且返回是否登陆。如果用户不一致返回未登陆,如果用户一致且已登录返回已登陆
type WidgetLoginstatusGetResponseResult ¶
type WidgetLoginstatusGetResponseResult struct {
Response *WidgetLoginstatusGetResponse `json:"widget_loginstatus_get_response"`
}