tbuser

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package tbuser 包含淘宝用户API,相关结构体

https://open.taobao.com/API.htm?docType=2&docId=26303

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuyerOrder

type BuyerOrder struct {
	// 买家nick
	BuyerNick string `json:"buyer_nick,omitempty" xml:"buyer_nick,omitempty"`
	// 订单id
	Tid int64 `json:"tid,omitempty" xml:"tid,omitempty"`
}

BuyerOrder 结构体

type OpenUidInfo

type OpenUidInfo struct {
	// 买家openuid
	BuyerOpenUid string `json:"buyer_open_uid,omitempty" xml:"buyer_open_uid,omitempty"`
	// 买家nick
	BuyerNick string `json:"buyer_nick,omitempty" xml:"buyer_nick,omitempty"`
	// 订单id
	Tid int64 `json:"tid,omitempty" xml:"tid,omitempty"`
}

OpenUidInfo 结构体

type TaobaouseravatargetAPIRequest added in v1.3.1

type TaobaouseravatargetAPIRequest struct {
	model.Params
	// contains filtered or unexported fields
}

TaobaouseravatargetAPIRequest 淘宝用户头像查询 API请求 taobao.user.avatar.get

根据混淆nick查询用户头像

func NewTaobaouseravatargetRequest added in v1.3.1

func NewTaobaouseravatargetRequest() *TaobaouseravatargetAPIRequest

NewTaobaouseravatargetRequest 初始化TaobaouseravatargetAPIRequest对象

func (TaobaouseravatargetAPIRequest) GetApiMethodName added in v1.3.1

func (r TaobaouseravatargetAPIRequest) GetApiMethodName() string

GetApiMethodName IRequest interface 方法, 获取Api method

func (TaobaouseravatargetAPIRequest) GetApiParams added in v1.3.1

func (r TaobaouseravatargetAPIRequest) GetApiParams(params url.Values)

GetApiParams IRequest interface 方法, 获取API参数

func (TaobaouseravatargetAPIRequest) GetNick added in v1.3.1

GetNick Nick Getter

func (TaobaouseravatargetAPIRequest) GetRawParams added in v1.3.1

func (r TaobaouseravatargetAPIRequest) GetRawParams() model.Params

GetRawParams IRequest interface 方法, 获取API原始参数

func (*TaobaouseravatargetAPIRequest) SetNick added in v1.3.1

func (r *TaobaouseravatargetAPIRequest) SetNick(_nick string) error

SetNick is Nick Setter 混淆nick

type TaobaouseravatargetAPIResponse added in v1.3.1

type TaobaouseravatargetAPIResponse struct {
	model.CommonResponse
	TaobaouseravatargetAPIResponseModel
}

TaobaouseravatargetAPIResponse 淘宝用户头像查询 API返回值 taobao.user.avatar.get

根据混淆nick查询用户头像

type TaobaouseravatargetAPIResponseModel added in v1.3.1

type TaobaouseravatargetAPIResponseModel struct {
	XMLName xml.Name `xml:"user_avatar_get_response"`
	// 平台颁发的每次请求访问的唯一标识
	RequestId string `json:"request_id,omitempty" xml:"request_id,omitempty"`
	// 用户头像地址
	Avatar string `json:"avatar,omitempty" xml:"avatar,omitempty"`
}

TaobaouseravatargetAPIResponseModel is 淘宝用户头像查询 成功返回结果

type TaobaouserbuyergetAPIRequest added in v1.3.1

type TaobaouserbuyergetAPIRequest struct {
	model.Params
	// contains filtered or unexported fields
}

TaobaouserbuyergetAPIRequest 查询买家信息API API请求 taobao.user.buyer.get

查询买家信息API,只能买家类应用调用。

func NewTaobaouserbuyergetRequest added in v1.3.1

func NewTaobaouserbuyergetRequest() *TaobaouserbuyergetAPIRequest

NewTaobaouserbuyergetRequest 初始化TaobaouserbuyergetAPIRequest对象

func (TaobaouserbuyergetAPIRequest) GetApiMethodName added in v1.3.1

func (r TaobaouserbuyergetAPIRequest) GetApiMethodName() string

GetApiMethodName IRequest interface 方法, 获取Api method

func (TaobaouserbuyergetAPIRequest) GetApiParams added in v1.3.1

func (r TaobaouserbuyergetAPIRequest) GetApiParams(params url.Values)

GetApiParams IRequest interface 方法, 获取API参数

func (TaobaouserbuyergetAPIRequest) GetFields added in v1.3.1

func (r TaobaouserbuyergetAPIRequest) GetFields() string

GetFields Fields Getter

func (TaobaouserbuyergetAPIRequest) GetRawParams added in v1.3.1

func (r TaobaouserbuyergetAPIRequest) GetRawParams() model.Params

GetRawParams IRequest interface 方法, 获取API原始参数

func (*TaobaouserbuyergetAPIRequest) SetFields added in v1.3.1

func (r *TaobaouserbuyergetAPIRequest) SetFields(_fields string) error

SetFields is Fields Setter 只返回nick, avatar参数

type TaobaouserbuyergetAPIResponse added in v1.3.1

type TaobaouserbuyergetAPIResponse struct {
	model.CommonResponse
	TaobaouserbuyergetAPIResponseModel
}

TaobaouserbuyergetAPIResponse 查询买家信息API API返回值 taobao.user.buyer.get

查询买家信息API,只能买家类应用调用。

type TaobaouserbuyergetAPIResponseModel added in v1.3.1

type TaobaouserbuyergetAPIResponseModel struct {
	XMLName xml.Name `xml:"user_buyer_get_response"`
	// 平台颁发的每次请求访问的唯一标识
	RequestId string `json:"request_id,omitempty" xml:"request_id,omitempty"`
	// 用户
	User *User `json:"user,omitempty" xml:"user,omitempty"`
}

TaobaouserbuyergetAPIResponseModel is 查询买家信息API 成功返回结果

type TaobaouseropenuidgetbynickAPIRequest added in v1.3.1

type TaobaouseropenuidgetbynickAPIRequest struct {
	model.Params
	// contains filtered or unexported fields
}

TaobaouseropenuidgetbynickAPIRequest 根据买家nick获取买家openuid API请求 taobao.user.openuid.getbynick

根据买家nick获取买家openuid,最大查询30个

func NewTaobaouseropenuidgetbynickRequest added in v1.3.1

func NewTaobaouseropenuidgetbynickRequest() *TaobaouseropenuidgetbynickAPIRequest

NewTaobaouseropenuidgetbynickRequest 初始化TaobaouseropenuidgetbynickAPIRequest对象

func (TaobaouseropenuidgetbynickAPIRequest) GetApiMethodName added in v1.3.1

func (r TaobaouseropenuidgetbynickAPIRequest) GetApiMethodName() string

GetApiMethodName IRequest interface 方法, 获取Api method

func (TaobaouseropenuidgetbynickAPIRequest) GetApiParams added in v1.3.1

func (r TaobaouseropenuidgetbynickAPIRequest) GetApiParams(params url.Values)

GetApiParams IRequest interface 方法, 获取API参数

func (TaobaouseropenuidgetbynickAPIRequest) GetBuyerNicks added in v1.3.1

func (r TaobaouseropenuidgetbynickAPIRequest) GetBuyerNicks() string

GetBuyerNicks BuyerNicks Getter

func (TaobaouseropenuidgetbynickAPIRequest) GetRawParams added in v1.3.1

GetRawParams IRequest interface 方法, 获取API原始参数

func (*TaobaouseropenuidgetbynickAPIRequest) SetBuyerNicks added in v1.3.1

func (r *TaobaouseropenuidgetbynickAPIRequest) SetBuyerNicks(_buyerNicks string) error

SetBuyerNicks is BuyerNicks Setter 买家nick列表

type TaobaouseropenuidgetbynickAPIResponse added in v1.3.1

type TaobaouseropenuidgetbynickAPIResponse struct {
	model.CommonResponse
	TaobaouseropenuidgetbynickAPIResponseModel
}

TaobaouseropenuidgetbynickAPIResponse 根据买家nick获取买家openuid API返回值 taobao.user.openuid.getbynick

根据买家nick获取买家openuid,最大查询30个

type TaobaouseropenuidgetbynickAPIResponseModel added in v1.3.1

type TaobaouseropenuidgetbynickAPIResponseModel struct {
	XMLName xml.Name `xml:"user_openuid_getbynick_response"`
	// 平台颁发的每次请求访问的唯一标识
	RequestId string `json:"request_id,omitempty" xml:"request_id,omitempty"`
	// 买家uid对象
	OpenUids []OpenUidInfo `json:"open_uids,omitempty" xml:"open_uids>open_uid_info,omitempty"`
}

TaobaouseropenuidgetbynickAPIResponseModel is 根据买家nick获取买家openuid 成功返回结果

type TaobaouseropenuidgetbyorderAPIRequest added in v1.3.1

type TaobaouseropenuidgetbyorderAPIRequest struct {
	model.Params
	// contains filtered or unexported fields
}

TaobaouseropenuidgetbyorderAPIRequest 根据订单获取买家openuid API请求 taobao.user.openuid.getbyorder

根据订单获取买家openuid,最大查询30个

func NewTaobaouseropenuidgetbyorderRequest added in v1.3.1

func NewTaobaouseropenuidgetbyorderRequest() *TaobaouseropenuidgetbyorderAPIRequest

NewTaobaouseropenuidgetbyorderRequest 初始化TaobaouseropenuidgetbyorderAPIRequest对象

func (TaobaouseropenuidgetbyorderAPIRequest) GetApiMethodName added in v1.3.1

func (r TaobaouseropenuidgetbyorderAPIRequest) GetApiMethodName() string

GetApiMethodName IRequest interface 方法, 获取Api method

func (TaobaouseropenuidgetbyorderAPIRequest) GetApiParams added in v1.3.1

func (r TaobaouseropenuidgetbyorderAPIRequest) GetApiParams(params url.Values)

GetApiParams IRequest interface 方法, 获取API参数

func (TaobaouseropenuidgetbyorderAPIRequest) GetRawParams added in v1.3.1

GetRawParams IRequest interface 方法, 获取API原始参数

func (TaobaouseropenuidgetbyorderAPIRequest) GetTidInfos added in v1.3.1

GetTidInfos TidInfos Getter

func (*TaobaouseropenuidgetbyorderAPIRequest) SetTidInfos added in v1.3.1

func (r *TaobaouseropenuidgetbyorderAPIRequest) SetTidInfos(_tidInfos *BuyerOrder) error

SetTidInfos is TidInfos Setter 买家订单列表

type TaobaouseropenuidgetbyorderAPIResponse added in v1.3.1

type TaobaouseropenuidgetbyorderAPIResponse struct {
	model.CommonResponse
	TaobaouseropenuidgetbyorderAPIResponseModel
}

TaobaouseropenuidgetbyorderAPIResponse 根据订单获取买家openuid API返回值 taobao.user.openuid.getbyorder

根据订单获取买家openuid,最大查询30个

type TaobaouseropenuidgetbyorderAPIResponseModel added in v1.3.1

type TaobaouseropenuidgetbyorderAPIResponseModel struct {
	XMLName xml.Name `xml:"user_openuid_getbyorder_response"`
	// 平台颁发的每次请求访问的唯一标识
	RequestId string `json:"request_id,omitempty" xml:"request_id,omitempty"`
	// 买家uid对象
	OpenUids []OpenUidInfo `json:"open_uids,omitempty" xml:"open_uids>open_uid_info,omitempty"`
}

TaobaouseropenuidgetbyorderAPIResponseModel is 根据订单获取买家openuid 成功返回结果

type TaobaousersellergetAPIRequest added in v1.3.1

type TaobaousersellergetAPIRequest struct {
	model.Params
	// contains filtered or unexported fields
}

TaobaousersellergetAPIRequest 查询卖家用户信息 API请求 taobao.user.seller.get

查询卖家用户信息(只能查询有店铺的用户) 只能卖家类应用调用。

func NewTaobaousersellergetRequest added in v1.3.1

func NewTaobaousersellergetRequest() *TaobaousersellergetAPIRequest

NewTaobaousersellergetRequest 初始化TaobaousersellergetAPIRequest对象

func (TaobaousersellergetAPIRequest) GetApiMethodName added in v1.3.1

func (r TaobaousersellergetAPIRequest) GetApiMethodName() string

GetApiMethodName IRequest interface 方法, 获取Api method

func (TaobaousersellergetAPIRequest) GetApiParams added in v1.3.1

func (r TaobaousersellergetAPIRequest) GetApiParams(params url.Values)

GetApiParams IRequest interface 方法, 获取API参数

func (TaobaousersellergetAPIRequest) GetFields added in v1.3.1

func (r TaobaousersellergetAPIRequest) GetFields() []string

GetFields Fields Getter

func (TaobaousersellergetAPIRequest) GetRawParams added in v1.3.1

func (r TaobaousersellergetAPIRequest) GetRawParams() model.Params

GetRawParams IRequest interface 方法, 获取API原始参数

func (*TaobaousersellergetAPIRequest) SetFields added in v1.3.1

func (r *TaobaousersellergetAPIRequest) SetFields(_fields []string) error

SetFields is Fields Setter 需要返回的字段列表,可选值为返回示例值中的可以看到的字段

type TaobaousersellergetAPIResponse added in v1.3.1

type TaobaousersellergetAPIResponse struct {
	model.CommonResponse
	TaobaousersellergetAPIResponseModel
}

TaobaousersellergetAPIResponse 查询卖家用户信息 API返回值 taobao.user.seller.get

查询卖家用户信息(只能查询有店铺的用户) 只能卖家类应用调用。

type TaobaousersellergetAPIResponseModel added in v1.3.1

type TaobaousersellergetAPIResponseModel struct {
	XMLName xml.Name `xml:"user_seller_get_response"`
	// 平台颁发的每次请求访问的唯一标识
	RequestId string `json:"request_id,omitempty" xml:"request_id,omitempty"`
	// 用户
	User *User `json:"user,omitempty" xml:"user,omitempty"`
}

TaobaousersellergetAPIResponseModel is 查询卖家用户信息 成功返回结果

type User

type User struct {
	// 用户昵称
	Nick string `json:"nick,omitempty" xml:"nick,omitempty"`
	// 用户头像地址
	Avatar string `json:"avatar,omitempty" xml:"avatar,omitempty"`
	// 性别。可选值:m(男),f(女)
	Sex string `json:"sex,omitempty" xml:"sex,omitempty"`
	// 对应账号的OpenUID
	OpenUid string `json:"open_uid,omitempty" xml:"open_uid,omitempty"`
	// 用户类型。可选值:B(B商家),C(C商家)
	Type string `json:"type,omitempty" xml:"type,omitempty"`
	// 是否受限制。可选值:limited(受限制),unlimited(不受限)
	AutoRepost string `json:"auto_repost,omitempty" xml:"auto_repost,omitempty"`
	// 有无实名认证。可选值:authentication(实名认证),not authentication(没有认证)
	PromotedType string `json:"promoted_type,omitempty" xml:"promoted_type,omitempty"`
	// 状态。可选值:normal(正常),inactive(未激活),delete(删除),reeze(冻结),supervise(监管)
	Status string `json:"status,omitempty" xml:"status,omitempty"`
	// 有无绑定。可选值:bind(绑定),notbind(未绑定)
	AlipayBind string `json:"alipay_bind,omitempty" xml:"alipay_bind,omitempty"`
	// 用户的全站vip信息,可取值如下:c(普通会员),asso_vip(荣誉会员),vip1,vip2,vip3,vip4,vip5,vip6(六个等级的正式vip会员),共8种取值,其中asso_vip是由vip会员衰退而成,与主站上的vip0对应。
	VipInfo string `json:"vip_info,omitempty" xml:"vip_info,omitempty"`
	// 用户参与垂直市场类型。shoes表示鞋城垂直市场用户,3C表示3C垂直市场用户。多个类型之间用","分隔。如:一个用户既是3C用户又是鞋城用户,那么这个字段返回就是"3C,shoes"。如果用户不是垂直市场用户,此字段返回为""。
	VerticalMarket string `json:"vertical_market,omitempty" xml:"vertical_market,omitempty"`
	// 用户数字ID
	UserId int64 `json:"user_id,omitempty" xml:"user_id,omitempty"`
	// 卖家信用
	SellerCredit *UserCredit `json:"seller_credit,omitempty" xml:"seller_credit,omitempty"`
	// 可上传商品图片数量
	ItemImgNum int64 `json:"item_img_num,omitempty" xml:"item_img_num,omitempty"`
	// 单张商品图片最大容量(商品主图大小)。单位:k
	ItemImgSize int64 `json:"item_img_size,omitempty" xml:"item_img_size,omitempty"`
	// 可上传属性图片数量
	PropImgNum int64 `json:"prop_img_num,omitempty" xml:"prop_img_num,omitempty"`
	// 单张销售属性图片最大容量(非主图的商品图片和商品属性图片)。单位:k
	PropImgSize int64 `json:"prop_img_size,omitempty" xml:"prop_img_size,omitempty"`
	// 是否购买多图服务。可选值:true(是),false(否)
	HasMorePic bool `json:"has_more_pic,omitempty" xml:"has_more_pic,omitempty"`
	// 是否参加消保
	ConsumerProtection bool `json:"consumer_protection,omitempty" xml:"consumer_protection,omitempty"`
	// 是否订阅了淘宝天下杂志
	MagazineSubscribe bool `json:"magazine_subscribe,omitempty" xml:"magazine_subscribe,omitempty"`
	// 用户是否为网游用户,属于隐私信息,需要登陆才能查看自己的。 目前仅供taobao.user.get使用
	OnlineGaming bool `json:"online_gaming,omitempty" xml:"online_gaming,omitempty"`
	// 是否是无名良品用户,true or false
	Liangpin bool `json:"liangpin,omitempty" xml:"liangpin,omitempty"`
	// 卖家是否签署食品卖家承诺协议
	SignFoodSellerPromise bool `json:"sign_food_seller_promise,omitempty" xml:"sign_food_seller_promise,omitempty"`
	// 用户作为卖家是否开过店
	HasShop bool `json:"has_shop,omitempty" xml:"has_shop,omitempty"`
	// 是否24小时闪电发货(实物类)
	IsLightningConsignment bool `json:"is_lightning_consignment,omitempty" xml:"is_lightning_consignment,omitempty"`
	// 表示用户是否具备修改商品减库存逻辑的权限(一共有拍下减库存和付款减库存两种逻辑) 值含义: 1)true:是 2)false:否。
	HasSubStock bool `json:"has_sub_stock,omitempty" xml:"has_sub_stock,omitempty"`
	// 用户是否是金牌卖家
	IsGoldenSeller bool `json:"is_golden_seller,omitempty" xml:"is_golden_seller,omitempty"`
	// 是否是特价版商家,需要field查询
	IsTjbSeller bool `json:"is_tjb_seller,omitempty" xml:"is_tjb_seller,omitempty"`
}

User 结构体

type UserCredit

type UserCredit struct {
	// 信用等级(是根据score生成的),信用等级:淘宝会员在淘宝网上的信用度,分为20个级别,级别如:level = 1 时,表示一心;level = 2 时,表示二心
	Level int64 `json:"level,omitempty" xml:"level,omitempty"`
	// 信用总分(“好评”加一分,“中评”不加分,“差评”扣一分。分越高,等级越高)
	Score int64 `json:"score,omitempty" xml:"score,omitempty"`
	// 收到的评价总条数。取值范围:大于零的整数
	TotalNum int64 `json:"total_num,omitempty" xml:"total_num,omitempty"`
	// 收到的好评总条数。取值范围:大于零的整数
	GoodNum int64 `json:"good_num,omitempty" xml:"good_num,omitempty"`
}

UserCredit 结构体

Jump to

Keyboard shortcuts

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