tmc

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package tmc 包含消息服务API相关结构体

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlibabaLsyMiniappMsgPushAPIRequest added in v1.2.0

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

AlibabaLsyMiniappMsgPushAPIRequest 零售云小程序消息推送 API请求 alibaba.lsy.miniapp.msg.push

零售云小程序消息推送,推送消息至零售云(喵零等)

func NewAlibabaLsyMiniappMsgPushRequest

func NewAlibabaLsyMiniappMsgPushRequest() *AlibabaLsyMiniappMsgPushAPIRequest

NewAlibabaLsyMiniappMsgPushRequest 初始化AlibabaLsyMiniappMsgPushAPIRequest对象

func (AlibabaLsyMiniappMsgPushAPIRequest) GetApiMethodName added in v1.2.0

func (r AlibabaLsyMiniappMsgPushAPIRequest) GetApiMethodName() string

GetApiMethodName IRequest interface 方法, 获取Api method

func (AlibabaLsyMiniappMsgPushAPIRequest) GetApiParams added in v1.2.0

GetApiParams IRequest interface 方法, 获取API参数

func (AlibabaLsyMiniappMsgPushAPIRequest) GetAppId added in v1.2.0

GetAppId AppId Getter

func (AlibabaLsyMiniappMsgPushAPIRequest) GetMsgId added in v1.2.0

GetMsgId MsgId Getter

func (AlibabaLsyMiniappMsgPushAPIRequest) GetParams added in v1.2.0

GetParams Params Getter

func (AlibabaLsyMiniappMsgPushAPIRequest) GetStoreId added in v1.2.0

GetStoreId StoreId Getter

func (AlibabaLsyMiniappMsgPushAPIRequest) GetTemplateId added in v1.2.0

func (r AlibabaLsyMiniappMsgPushAPIRequest) GetTemplateId() string

GetTemplateId TemplateId Getter

func (*AlibabaLsyMiniappMsgPushAPIRequest) SetAppId added in v1.2.0

func (r *AlibabaLsyMiniappMsgPushAPIRequest) SetAppId(_appId string) error

SetAppId is AppId Setter 小程序ID

func (*AlibabaLsyMiniappMsgPushAPIRequest) SetMsgId added in v1.2.0

func (r *AlibabaLsyMiniappMsgPushAPIRequest) SetMsgId(_msgId int64) error

SetMsgId is MsgId Setter 消息ID

func (*AlibabaLsyMiniappMsgPushAPIRequest) SetParams added in v1.2.0

func (r *AlibabaLsyMiniappMsgPushAPIRequest) SetParams(_params string) error

SetParams is Params Setter 消息参数

func (*AlibabaLsyMiniappMsgPushAPIRequest) SetStoreId added in v1.2.0

func (r *AlibabaLsyMiniappMsgPushAPIRequest) SetStoreId(_storeId int64) error

SetStoreId is StoreId Setter 摊位ID

func (*AlibabaLsyMiniappMsgPushAPIRequest) SetTemplateId added in v1.2.0

func (r *AlibabaLsyMiniappMsgPushAPIRequest) SetTemplateId(_templateId string) error

SetTemplateId is TemplateId Setter 消息模板,miaoling_msg_isv_clue - 线索通知消息

type AlibabaLsyMiniappMsgPushAPIResponse

type AlibabaLsyMiniappMsgPushAPIResponse struct {
	model.CommonResponse
	AlibabaLsyMiniappMsgPushAPIResponseModel
}

AlibabaLsyMiniappMsgPushAPIResponse 零售云小程序消息推送 API返回值 alibaba.lsy.miniapp.msg.push

零售云小程序消息推送,推送消息至零售云(喵零等)

type AlibabaLsyMiniappMsgPushAPIResponseModel added in v1.2.0

type AlibabaLsyMiniappMsgPushAPIResponseModel struct {
	XMLName xml.Name `xml:"alibaba_lsy_miniapp_msg_push_response"`
	// 平台颁发的每次请求访问的唯一标识
	RequestId string `json:"request_id,omitempty" xml:"request_id,omitempty"`
	// 错误提示
	FailMsg string `json:"fail_msg,omitempty" xml:"fail_msg,omitempty"`
	// 错误码
	FailCode string `json:"fail_code,omitempty" xml:"fail_code,omitempty"`
	// 是否成功
	Succ bool `json:"succ,omitempty" xml:"succ,omitempty"`
}

AlibabaLsyMiniappMsgPushAPIResponseModel is 零售云小程序消息推送 成功返回结果

type AlipayXiaodaiUserPermitAPIRequest added in v1.2.0

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

AlipayXiaodaiUserPermitAPIRequest 阿里金融用户授权 API请求 alipay.xiaodai.user.permit

阿里金融为用户开通消息通道接口

func NewAlipayXiaodaiUserPermitRequest

func NewAlipayXiaodaiUserPermitRequest() *AlipayXiaodaiUserPermitAPIRequest

NewAlipayXiaodaiUserPermitRequest 初始化AlipayXiaodaiUserPermitAPIRequest对象

func (AlipayXiaodaiUserPermitAPIRequest) GetApiMethodName added in v1.2.0

func (r AlipayXiaodaiUserPermitAPIRequest) GetApiMethodName() string

GetApiMethodName IRequest interface 方法, 获取Api method

func (AlipayXiaodaiUserPermitAPIRequest) GetApiParams added in v1.2.0

func (r AlipayXiaodaiUserPermitAPIRequest) GetApiParams() url.Values

GetApiParams IRequest interface 方法, 获取API参数

func (AlipayXiaodaiUserPermitAPIRequest) GetUserId added in v1.2.0

GetUserId UserId Getter

func (*AlipayXiaodaiUserPermitAPIRequest) SetUserId added in v1.2.0

func (r *AlipayXiaodaiUserPermitAPIRequest) SetUserId(_userId int64) error

SetUserId is UserId Setter 用户数字ID

type AlipayXiaodaiUserPermitAPIResponse

type AlipayXiaodaiUserPermitAPIResponse struct {
	model.CommonResponse
	AlipayXiaodaiUserPermitAPIResponseModel
}

AlipayXiaodaiUserPermitAPIResponse 阿里金融用户授权 API返回值 alipay.xiaodai.user.permit

阿里金融为用户开通消息通道接口

type AlipayXiaodaiUserPermitAPIResponseModel added in v1.2.0

type AlipayXiaodaiUserPermitAPIResponseModel struct {
	XMLName xml.Name `xml:"alipay_xiaodai_user_permit_response"`
	// 平台颁发的每次请求访问的唯一标识
	RequestId string `json:"request_id,omitempty" xml:"request_id,omitempty"`
	// 是否成功
	IsSuccess bool `json:"is_success,omitempty" xml:"is_success,omitempty"`
}

AlipayXiaodaiUserPermitAPIResponseModel is 阿里金融用户授权 成功返回结果

type GiftMessageBizCondition

type GiftMessageBizCondition struct {
	// 有效时间
	ValidateDate string `json:"validate_date,omitempty" xml:"validate_date,omitempty"`
	// 系统自动生成
	ReceiverId string `json:"receiver_id,omitempty" xml:"receiver_id,omitempty"`
	// 分页参数
	Paginator *Paginator `json:"paginator,omitempty" xml:"paginator,omitempty"`
	// 消息状态
	MessageStatus int64 `json:"message_status,omitempty" xml:"message_status,omitempty"`
	// 消息id
	Id int64 `json:"id,omitempty" xml:"id,omitempty"`
	// 按时间排序1:asc 2:desc
	Sort int64 `json:"sort,omitempty" xml:"sort,omitempty"`
}

GiftMessageBizCondition 结构体

type Paginator

type Paginator struct {
	// 页大小
	PageSize int64 `json:"page_size,omitempty" xml:"page_size,omitempty"`
	// 当前第几页
	CurrentPageNum int64 `json:"current_page_num,omitempty" xml:"current_page_num,omitempty"`
}

Paginator 结构体

type TaobaoIstoreGiftingMessageGetAPIRequest added in v1.2.0

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

TaobaoIstoreGiftingMessageGetAPIRequest gifting消息获取 API请求 taobao.istore.gifting.message.get

该api通过参数查询对应的gifting消息

func NewTaobaoIstoreGiftingMessageGetRequest

func NewTaobaoIstoreGiftingMessageGetRequest() *TaobaoIstoreGiftingMessageGetAPIRequest

NewTaobaoIstoreGiftingMessageGetRequest 初始化TaobaoIstoreGiftingMessageGetAPIRequest对象

func (TaobaoIstoreGiftingMessageGetAPIRequest) GetApiMethodName added in v1.2.0

func (r TaobaoIstoreGiftingMessageGetAPIRequest) GetApiMethodName() string

GetApiMethodName IRequest interface 方法, 获取Api method

func (TaobaoIstoreGiftingMessageGetAPIRequest) GetApiParams added in v1.2.0

GetApiParams IRequest interface 方法, 获取API参数

func (TaobaoIstoreGiftingMessageGetAPIRequest) GetGiftMessageBizCondition added in v1.2.0

func (r TaobaoIstoreGiftingMessageGetAPIRequest) GetGiftMessageBizCondition() *GiftMessageBizCondition

GetGiftMessageBizCondition GiftMessageBizCondition Getter

func (*TaobaoIstoreGiftingMessageGetAPIRequest) SetGiftMessageBizCondition added in v1.2.0

func (r *TaobaoIstoreGiftingMessageGetAPIRequest) SetGiftMessageBizCondition(_giftMessageBizCondition *GiftMessageBizCondition) error

SetGiftMessageBizCondition is GiftMessageBizCondition Setter 消息查询条件

type TaobaoIstoreGiftingMessageGetAPIResponse

type TaobaoIstoreGiftingMessageGetAPIResponse struct {
	model.CommonResponse
	TaobaoIstoreGiftingMessageGetAPIResponseModel
}

TaobaoIstoreGiftingMessageGetAPIResponse gifting消息获取 API返回值 taobao.istore.gifting.message.get

该api通过参数查询对应的gifting消息

type TaobaoIstoreGiftingMessageGetAPIResponseModel added in v1.2.0

type TaobaoIstoreGiftingMessageGetAPIResponseModel struct {
	XMLName xml.Name `xml:"istore_gifting_message_get_response"`
	// 平台颁发的每次请求访问的唯一标识
	RequestId string `json:"request_id,omitempty" xml:"request_id,omitempty"`
	// result
	Result *TaobaoIstoreGiftingMessageGetResultDto `json:"result,omitempty" xml:"result,omitempty"`
}

TaobaoIstoreGiftingMessageGetAPIResponseModel is gifting消息获取 成功返回结果

type TaobaoIstoreGiftingMessageGetResultDto

type TaobaoIstoreGiftingMessageGetResultDto struct {
	// id:消息id,receiverId:消息接收者,messageType:消息类型,messageDesc:消息描述,giftBoxId:礼盒id,attachInfo:消息附加参数,messageStatus:消息状态,sellerId:商家id,senderId:发送者
	ResultList []string `json:"result_list,omitempty" xml:"result_list>string,omitempty"`
	// 附加信息
	BizExtMap string `json:"biz_ext_map,omitempty" xml:"biz_ext_map,omitempty"`
	// errorCode
	ErrorCode string `json:"error_code,omitempty" xml:"error_code,omitempty"`
	// errorMsg
	ErrorMsg string `json:"error_msg,omitempty" xml:"error_msg,omitempty"`
	// 是否成功
	Success bool `json:"success,omitempty" xml:"success,omitempty"`
}

TaobaoIstoreGiftingMessageGetResultDto 结构体

type TaobaoTmcGroupAddAPIRequest added in v1.2.0

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

TaobaoTmcGroupAddAPIRequest 为已开通用户添加用户分组 API请求 taobao.tmc.group.add

为已开通用户添加用户分组,授权消息使用

func NewTaobaoTmcGroupAddRequest

func NewTaobaoTmcGroupAddRequest() *TaobaoTmcGroupAddAPIRequest

NewTaobaoTmcGroupAddRequest 初始化TaobaoTmcGroupAddAPIRequest对象

func (TaobaoTmcGroupAddAPIRequest) GetApiMethodName added in v1.2.0

func (r TaobaoTmcGroupAddAPIRequest) GetApiMethodName() string

GetApiMethodName IRequest interface 方法, 获取Api method

func (TaobaoTmcGroupAddAPIRequest) GetApiParams added in v1.2.0

func (r TaobaoTmcGroupAddAPIRequest) GetApiParams() url.Values

GetApiParams IRequest interface 方法, 获取API参数

func (TaobaoTmcGroupAddAPIRequest) GetGroupName added in v1.2.0

func (r TaobaoTmcGroupAddAPIRequest) GetGroupName() string

GetGroupName GroupName Getter

func (TaobaoTmcGroupAddAPIRequest) GetNicks added in v1.2.0

func (r TaobaoTmcGroupAddAPIRequest) GetNicks() []string

GetNicks Nicks Getter

func (TaobaoTmcGroupAddAPIRequest) GetUserPlatform added in v1.2.0

func (r TaobaoTmcGroupAddAPIRequest) GetUserPlatform() string

GetUserPlatform UserPlatform Getter

func (*TaobaoTmcGroupAddAPIRequest) SetGroupName added in v1.2.0

func (r *TaobaoTmcGroupAddAPIRequest) SetGroupName(_groupName string) error

SetGroupName is GroupName Setter 分组名称,同一个应用下需要保证唯一性,最长32个字符。添加分组后,消息通道会为用户的消息分配独立分组,但之前的消息还是存储于默认分组中。不能以default开头,default开头为系统默认组。

func (*TaobaoTmcGroupAddAPIRequest) SetNicks added in v1.2.0

func (r *TaobaoTmcGroupAddAPIRequest) SetNicks(_nicks []string) error

SetNicks is Nicks Setter 用户昵称列表,以半角逗号分隔,支持子账号,支持增量添加用户

func (*TaobaoTmcGroupAddAPIRequest) SetUserPlatform added in v1.2.0

func (r *TaobaoTmcGroupAddAPIRequest) SetUserPlatform(_userPlatform string) error

SetUserPlatform is UserPlatform Setter 用户所属于的平台类型,tbUIC:淘宝用户; icbu: icbu用户;ae:ae用户

type TaobaoTmcGroupAddAPIResponse

type TaobaoTmcGroupAddAPIResponse struct {
	model.CommonResponse
	TaobaoTmcGroupAddAPIResponseModel
}

TaobaoTmcGroupAddAPIResponse 为已开通用户添加用户分组 API返回值 taobao.tmc.group.add

为已开通用户添加用户分组,授权消息使用

type TaobaoTmcGroupAddAPIResponseModel added in v1.2.0

type TaobaoTmcGroupAddAPIResponseModel struct {
	XMLName xml.Name `xml:"tmc_group_add_response"`
	// 平台颁发的每次请求访问的唯一标识
	RequestId string `json:"request_id,omitempty" xml:"request_id,omitempty"`
	// 创建时间
	Created string `json:"created,omitempty" xml:"created,omitempty"`
	// 分组名称
	GroupName string `json:"group_name,omitempty" xml:"group_name,omitempty"`
}

TaobaoTmcGroupAddAPIResponseModel is 为已开通用户添加用户分组 成功返回结果

type TaobaoTmcGroupDeleteAPIRequest added in v1.2.0

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

TaobaoTmcGroupDeleteAPIRequest 删除指定的分组或分组下的用户 API请求 taobao.tmc.group.delete

删除指定的分组或分组下的用户,授权消息使用

func NewTaobaoTmcGroupDeleteRequest

func NewTaobaoTmcGroupDeleteRequest() *TaobaoTmcGroupDeleteAPIRequest

NewTaobaoTmcGroupDeleteRequest 初始化TaobaoTmcGroupDeleteAPIRequest对象

func (TaobaoTmcGroupDeleteAPIRequest) GetApiMethodName added in v1.2.0

func (r TaobaoTmcGroupDeleteAPIRequest) GetApiMethodName() string

GetApiMethodName IRequest interface 方法, 获取Api method

func (TaobaoTmcGroupDeleteAPIRequest) GetApiParams added in v1.2.0

func (r TaobaoTmcGroupDeleteAPIRequest) GetApiParams() url.Values

GetApiParams IRequest interface 方法, 获取API参数

func (TaobaoTmcGroupDeleteAPIRequest) GetGroupName added in v1.2.0

func (r TaobaoTmcGroupDeleteAPIRequest) GetGroupName() string

GetGroupName GroupName Getter

func (TaobaoTmcGroupDeleteAPIRequest) GetNicks added in v1.2.0

func (r TaobaoTmcGroupDeleteAPIRequest) GetNicks() []string

GetNicks Nicks Getter

func (TaobaoTmcGroupDeleteAPIRequest) GetUserPlatform added in v1.2.0

func (r TaobaoTmcGroupDeleteAPIRequest) GetUserPlatform() string

GetUserPlatform UserPlatform Getter

func (*TaobaoTmcGroupDeleteAPIRequest) SetGroupName added in v1.2.0

func (r *TaobaoTmcGroupDeleteAPIRequest) SetGroupName(_groupName string) error

SetGroupName is GroupName Setter 分组名称,分组删除后,用户的消息将会存储于默认分组中。警告:由于分组已经删除,用户之前未消费的消息将无法再获取。不能以default开头,default开头为系统默认组。

func (*TaobaoTmcGroupDeleteAPIRequest) SetNicks added in v1.2.0

func (r *TaobaoTmcGroupDeleteAPIRequest) SetNicks(_nicks []string) error

SetNicks is Nicks Setter 用户列表,不传表示删除整个分组,如果用户全部删除后,也会自动删除整个分组

func (*TaobaoTmcGroupDeleteAPIRequest) SetUserPlatform added in v1.2.0

func (r *TaobaoTmcGroupDeleteAPIRequest) SetUserPlatform(_userPlatform string) error

SetUserPlatform is UserPlatform Setter 用户所属于的平台类型,tbUIC:淘宝用户; icbu: icbu用户;ae:ae用户

type TaobaoTmcGroupDeleteAPIResponse

type TaobaoTmcGroupDeleteAPIResponse struct {
	model.CommonResponse
	TaobaoTmcGroupDeleteAPIResponseModel
}

TaobaoTmcGroupDeleteAPIResponse 删除指定的分组或分组下的用户 API返回值 taobao.tmc.group.delete

删除指定的分组或分组下的用户,授权消息使用

type TaobaoTmcGroupDeleteAPIResponseModel added in v1.2.0

type TaobaoTmcGroupDeleteAPIResponseModel struct {
	XMLName xml.Name `xml:"tmc_group_delete_response"`
	// 平台颁发的每次请求访问的唯一标识
	RequestId string `json:"request_id,omitempty" xml:"request_id,omitempty"`
	// 是否成功
	IsSuccess bool `json:"is_success,omitempty" xml:"is_success,omitempty"`
}

TaobaoTmcGroupDeleteAPIResponseModel is 删除指定的分组或分组下的用户 成功返回结果

type TaobaoTmcGroupsGetAPIRequest added in v1.2.0

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

TaobaoTmcGroupsGetAPIRequest 获取自定义用户分组列表 API请求 taobao.tmc.groups.get

获取自定义用户分组列表

func NewTaobaoTmcGroupsGetRequest

func NewTaobaoTmcGroupsGetRequest() *TaobaoTmcGroupsGetAPIRequest

NewTaobaoTmcGroupsGetRequest 初始化TaobaoTmcGroupsGetAPIRequest对象

func (TaobaoTmcGroupsGetAPIRequest) GetApiMethodName added in v1.2.0

func (r TaobaoTmcGroupsGetAPIRequest) GetApiMethodName() string

GetApiMethodName IRequest interface 方法, 获取Api method

func (TaobaoTmcGroupsGetAPIRequest) GetApiParams added in v1.2.0

func (r TaobaoTmcGroupsGetAPIRequest) GetApiParams() url.Values

GetApiParams IRequest interface 方法, 获取API参数

func (TaobaoTmcGroupsGetAPIRequest) GetGroupNames added in v1.2.0

func (r TaobaoTmcGroupsGetAPIRequest) GetGroupNames() []string

GetGroupNames GroupNames Getter

func (TaobaoTmcGroupsGetAPIRequest) GetPageNo added in v1.2.0

func (r TaobaoTmcGroupsGetAPIRequest) GetPageNo() int64

GetPageNo PageNo Getter

func (TaobaoTmcGroupsGetAPIRequest) GetPageSize added in v1.2.0

func (r TaobaoTmcGroupsGetAPIRequest) GetPageSize() int64

GetPageSize PageSize Getter

func (*TaobaoTmcGroupsGetAPIRequest) SetGroupNames added in v1.2.0

func (r *TaobaoTmcGroupsGetAPIRequest) SetGroupNames(_groupNames []string) error

SetGroupNames is GroupNames Setter 要查询分组的名称,多个分组用半角逗号分隔,不传代表查询所有分组信息,但不会返回组下面的用户信息。如果应用没有设置分组则返回空。组名不能以default开头,default开头是系统默认的组。

func (*TaobaoTmcGroupsGetAPIRequest) SetPageNo added in v1.2.0

func (r *TaobaoTmcGroupsGetAPIRequest) SetPageNo(_pageNo int64) error

SetPageNo is PageNo Setter 页码

func (*TaobaoTmcGroupsGetAPIRequest) SetPageSize added in v1.2.0

func (r *TaobaoTmcGroupsGetAPIRequest) SetPageSize(_pageSize int64) error

SetPageSize is PageSize Setter 每页返回多少个分组

type TaobaoTmcGroupsGetAPIResponse

type TaobaoTmcGroupsGetAPIResponse struct {
	model.CommonResponse
	TaobaoTmcGroupsGetAPIResponseModel
}

TaobaoTmcGroupsGetAPIResponse 获取自定义用户分组列表 API返回值 taobao.tmc.groups.get

获取自定义用户分组列表

type TaobaoTmcGroupsGetAPIResponseModel added in v1.2.0

type TaobaoTmcGroupsGetAPIResponseModel struct {
	XMLName xml.Name `xml:"tmc_groups_get_response"`
	// 平台颁发的每次请求访问的唯一标识
	RequestId string `json:"request_id,omitempty" xml:"request_id,omitempty"`
	// dasdasd
	Groups []TmcGroup `json:"groups,omitempty" xml:"groups>tmc_group,omitempty"`
	// 分组总数
	TotalResults int64 `json:"total_results,omitempty" xml:"total_results,omitempty"`
}

TaobaoTmcGroupsGetAPIResponseModel is 获取自定义用户分组列表 成功返回结果

type TaobaoTmcMessageProduceAPIRequest added in v1.2.0

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

TaobaoTmcMessageProduceAPIRequest 发布单条消息 API请求 taobao.tmc.message.produce

发布单条消息

func NewTaobaoTmcMessageProduceRequest

func NewTaobaoTmcMessageProduceRequest() *TaobaoTmcMessageProduceAPIRequest

NewTaobaoTmcMessageProduceRequest 初始化TaobaoTmcMessageProduceAPIRequest对象

func (TaobaoTmcMessageProduceAPIRequest) GetApiMethodName added in v1.2.0

func (r TaobaoTmcMessageProduceAPIRequest) GetApiMethodName() string

GetApiMethodName IRequest interface 方法, 获取Api method

func (TaobaoTmcMessageProduceAPIRequest) GetApiParams added in v1.2.0

func (r TaobaoTmcMessageProduceAPIRequest) GetApiParams() url.Values

GetApiParams IRequest interface 方法, 获取API参数

func (TaobaoTmcMessageProduceAPIRequest) GetContent added in v1.2.0

GetContent Content Getter

func (TaobaoTmcMessageProduceAPIRequest) GetMediaContent added in v1.2.0

func (r TaobaoTmcMessageProduceAPIRequest) GetMediaContent() *model.File

GetMediaContent MediaContent Getter

func (TaobaoTmcMessageProduceAPIRequest) GetMediaContent2 added in v1.2.0

func (r TaobaoTmcMessageProduceAPIRequest) GetMediaContent2() *model.File

GetMediaContent2 MediaContent2 Getter

func (TaobaoTmcMessageProduceAPIRequest) GetMediaContent3 added in v1.2.0

func (r TaobaoTmcMessageProduceAPIRequest) GetMediaContent3() *model.File

GetMediaContent3 MediaContent3 Getter

func (TaobaoTmcMessageProduceAPIRequest) GetMediaContent4 added in v1.2.0

func (r TaobaoTmcMessageProduceAPIRequest) GetMediaContent4() *model.File

GetMediaContent4 MediaContent4 Getter

func (TaobaoTmcMessageProduceAPIRequest) GetMediaContent5 added in v1.2.0

func (r TaobaoTmcMessageProduceAPIRequest) GetMediaContent5() *model.File

GetMediaContent5 MediaContent5 Getter

func (TaobaoTmcMessageProduceAPIRequest) GetTargetGroup added in v1.2.0

func (r TaobaoTmcMessageProduceAPIRequest) GetTargetGroup() string

GetTargetGroup TargetGroup Getter

func (TaobaoTmcMessageProduceAPIRequest) GetTopic added in v1.2.0

GetTopic Topic Getter

func (*TaobaoTmcMessageProduceAPIRequest) SetContent added in v1.2.0

func (r *TaobaoTmcMessageProduceAPIRequest) SetContent(_content string) error

SetContent is Content Setter 消息内容的JSON表述,必须按照topic的定义来填充

func (*TaobaoTmcMessageProduceAPIRequest) SetMediaContent added in v1.2.0

func (r *TaobaoTmcMessageProduceAPIRequest) SetMediaContent(_mediaContent *model.File) error

SetMediaContent is MediaContent Setter 回传的文件内容,目前仅支持jpg,png,bmp,gif,pdf类型的文件,文件最大1M。只有消息中有byte[]类型的数据时,才需要传此字段; 否则不需要传此字段。

func (*TaobaoTmcMessageProduceAPIRequest) SetMediaContent2 added in v1.2.0

func (r *TaobaoTmcMessageProduceAPIRequest) SetMediaContent2(_mediaContent2 *model.File) error

SetMediaContent2 is MediaContent2 Setter 回传的文件内容,目前仅支持jpg,png,bmp,gif,pdf类型的文件,文件最大1M。只有消息中有byte[]类型的数据时,才需要传此字段; 否则不需要传此字段。具体对应到沙体中的什么值,请参考消息字段说明。

func (*TaobaoTmcMessageProduceAPIRequest) SetMediaContent3 added in v1.2.0

func (r *TaobaoTmcMessageProduceAPIRequest) SetMediaContent3(_mediaContent3 *model.File) error

SetMediaContent3 is MediaContent3 Setter 回传的文件内容,目前仅支持jpg,png,bmp,gif,pdf类型的文件,文件最大1M。只有消息中有byte[]类型的数据时,才需要传此字段; 否则不需要传此字段。具体对应到沙体中的什么值,请参考消息字段说明。

func (*TaobaoTmcMessageProduceAPIRequest) SetMediaContent4 added in v1.2.0

func (r *TaobaoTmcMessageProduceAPIRequest) SetMediaContent4(_mediaContent4 *model.File) error

SetMediaContent4 is MediaContent4 Setter 回传的文件内容,目前仅支持jpg,png,bmp,gif,pdf类型的文件,文件最大1M。只有消息中有byte[]类型的数据时,才需要传此字段; 否则不需要传此字段。具体对应到沙体中的什么值,请参考消息字段说明。

func (*TaobaoTmcMessageProduceAPIRequest) SetMediaContent5 added in v1.2.0

func (r *TaobaoTmcMessageProduceAPIRequest) SetMediaContent5(_mediaContent5 *model.File) error

SetMediaContent5 is MediaContent5 Setter 回传的文件内容,目前仅支持jpg,png,bmp,gif,pdf类型的文件,文件最大1M。只有消息中有byte[]类型的数据时,才需要传此字段; 否则不需要传此字段。具体对应到沙体中的什么值,请参考消息字段说明。

func (*TaobaoTmcMessageProduceAPIRequest) SetTargetGroup added in v1.2.0

func (r *TaobaoTmcMessageProduceAPIRequest) SetTargetGroup(_targetGroup string) error

SetTargetGroup is TargetGroup Setter 目标分组,一般为default

func (*TaobaoTmcMessageProduceAPIRequest) SetTopic added in v1.2.0

func (r *TaobaoTmcMessageProduceAPIRequest) SetTopic(_topic string) error

SetTopic is Topic Setter 消息类型

type TaobaoTmcMessageProduceAPIResponse

type TaobaoTmcMessageProduceAPIResponse struct {
	model.CommonResponse
	TaobaoTmcMessageProduceAPIResponseModel
}

TaobaoTmcMessageProduceAPIResponse 发布单条消息 API返回值 taobao.tmc.message.produce

发布单条消息

type TaobaoTmcMessageProduceAPIResponseModel added in v1.2.0

type TaobaoTmcMessageProduceAPIResponseModel struct {
	XMLName xml.Name `xml:"tmc_message_produce_response"`
	// 平台颁发的每次请求访问的唯一标识
	RequestId string `json:"request_id,omitempty" xml:"request_id,omitempty"`
	// 消息ID
	MsgIds []string `json:"msg_ids,omitempty" xml:"msg_ids>string,omitempty"`
	// 投递目标数
	Total int64 `json:"total,omitempty" xml:"total,omitempty"`
	// 是否成功
	IsSuccess bool `json:"is_success,omitempty" xml:"is_success,omitempty"`
}

TaobaoTmcMessageProduceAPIResponseModel is 发布单条消息 成功返回结果

type TaobaoTmcMessagesConfirmAPIRequest added in v1.2.0

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

TaobaoTmcMessagesConfirmAPIRequest 确认消费消息的状态 API请求 taobao.tmc.messages.confirm

确认消费消息的状态

func NewTaobaoTmcMessagesConfirmRequest

func NewTaobaoTmcMessagesConfirmRequest() *TaobaoTmcMessagesConfirmAPIRequest

NewTaobaoTmcMessagesConfirmRequest 初始化TaobaoTmcMessagesConfirmAPIRequest对象

func (TaobaoTmcMessagesConfirmAPIRequest) GetApiMethodName added in v1.2.0

func (r TaobaoTmcMessagesConfirmAPIRequest) GetApiMethodName() string

GetApiMethodName IRequest interface 方法, 获取Api method

func (TaobaoTmcMessagesConfirmAPIRequest) GetApiParams added in v1.2.0

GetApiParams IRequest interface 方法, 获取API参数

func (TaobaoTmcMessagesConfirmAPIRequest) GetFMessageIds added in v1.2.0

func (r TaobaoTmcMessagesConfirmAPIRequest) GetFMessageIds() []int64

GetFMessageIds FMessageIds Getter

func (TaobaoTmcMessagesConfirmAPIRequest) GetGroupName added in v1.2.0

func (r TaobaoTmcMessagesConfirmAPIRequest) GetGroupName() string

GetGroupName GroupName Getter

func (TaobaoTmcMessagesConfirmAPIRequest) GetSMessageIds added in v1.2.0

func (r TaobaoTmcMessagesConfirmAPIRequest) GetSMessageIds() []int64

GetSMessageIds SMessageIds Getter

func (*TaobaoTmcMessagesConfirmAPIRequest) SetFMessageIds added in v1.2.0

func (r *TaobaoTmcMessagesConfirmAPIRequest) SetFMessageIds(_fMessageIds []int64) error

SetFMessageIds is FMessageIds Setter 处理失败的消息ID列表--已废弃,无需传此字段

func (*TaobaoTmcMessagesConfirmAPIRequest) SetGroupName added in v1.2.0

func (r *TaobaoTmcMessagesConfirmAPIRequest) SetGroupName(_groupName string) error

SetGroupName is GroupName Setter 分组名称,不传代表默认分组

func (*TaobaoTmcMessagesConfirmAPIRequest) SetSMessageIds added in v1.2.0

func (r *TaobaoTmcMessagesConfirmAPIRequest) SetSMessageIds(_sMessageIds []int64) error

SetSMessageIds is SMessageIds Setter 处理成功的消息ID列表 最大 200个ID

type TaobaoTmcMessagesConfirmAPIResponse

type TaobaoTmcMessagesConfirmAPIResponse struct {
	model.CommonResponse
	TaobaoTmcMessagesConfirmAPIResponseModel
}

TaobaoTmcMessagesConfirmAPIResponse 确认消费消息的状态 API返回值 taobao.tmc.messages.confirm

确认消费消息的状态

type TaobaoTmcMessagesConfirmAPIResponseModel added in v1.2.0

type TaobaoTmcMessagesConfirmAPIResponseModel struct {
	XMLName xml.Name `xml:"tmc_messages_confirm_response"`
	// 平台颁发的每次请求访问的唯一标识
	RequestId string `json:"request_id,omitempty" xml:"request_id,omitempty"`
	// 是否成功
	IsSuccess bool `json:"is_success,omitempty" xml:"is_success,omitempty"`
}

TaobaoTmcMessagesConfirmAPIResponseModel is 确认消费消息的状态 成功返回结果

type TaobaoTmcMessagesConsumeAPIRequest added in v1.2.0

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

TaobaoTmcMessagesConsumeAPIRequest 消费多条消息 API请求 taobao.tmc.messages.consume

消费多条消息。消费时如果没有返回消息,建议做控制,不要一直调api,浪费应用的流量。如对程序做好优化,若没有消息则,sleep 100ms 等。

func NewTaobaoTmcMessagesConsumeRequest

func NewTaobaoTmcMessagesConsumeRequest() *TaobaoTmcMessagesConsumeAPIRequest

NewTaobaoTmcMessagesConsumeRequest 初始化TaobaoTmcMessagesConsumeAPIRequest对象

func (TaobaoTmcMessagesConsumeAPIRequest) GetApiMethodName added in v1.2.0

func (r TaobaoTmcMessagesConsumeAPIRequest) GetApiMethodName() string

GetApiMethodName IRequest interface 方法, 获取Api method

func (TaobaoTmcMessagesConsumeAPIRequest) GetApiParams added in v1.2.0

GetApiParams IRequest interface 方法, 获取API参数

func (TaobaoTmcMessagesConsumeAPIRequest) GetGroupName added in v1.2.0

func (r TaobaoTmcMessagesConsumeAPIRequest) GetGroupName() string

GetGroupName GroupName Getter

func (TaobaoTmcMessagesConsumeAPIRequest) GetQuantity added in v1.2.0

func (r TaobaoTmcMessagesConsumeAPIRequest) GetQuantity() int64

GetQuantity Quantity Getter

func (*TaobaoTmcMessagesConsumeAPIRequest) SetGroupName added in v1.2.0

func (r *TaobaoTmcMessagesConsumeAPIRequest) SetGroupName(_groupName string) error

SetGroupName is GroupName Setter 用户分组名称,不传表示消费默认分组,如果应用没有设置用户分组,传入分组名称将会返回错误

func (*TaobaoTmcMessagesConsumeAPIRequest) SetQuantity added in v1.2.0

func (r *TaobaoTmcMessagesConsumeAPIRequest) SetQuantity(_quantity int64) error

SetQuantity is Quantity Setter 每次批量消费消息的条数,最小值:10;最大值:200

type TaobaoTmcMessagesConsumeAPIResponse

type TaobaoTmcMessagesConsumeAPIResponse struct {
	model.CommonResponse
	TaobaoTmcMessagesConsumeAPIResponseModel
}

TaobaoTmcMessagesConsumeAPIResponse 消费多条消息 API返回值 taobao.tmc.messages.consume

消费多条消息。消费时如果没有返回消息,建议做控制,不要一直调api,浪费应用的流量。如对程序做好优化,若没有消息则,sleep 100ms 等。

type TaobaoTmcMessagesConsumeAPIResponseModel added in v1.2.0

type TaobaoTmcMessagesConsumeAPIResponseModel struct {
	XMLName xml.Name `xml:"tmc_messages_consume_response"`
	// 平台颁发的每次请求访问的唯一标识
	RequestId string `json:"request_id,omitempty" xml:"request_id,omitempty"`
	// 消息列表
	Messages []TmcMessage `json:"messages,omitempty" xml:"messages>tmc_message,omitempty"`
}

TaobaoTmcMessagesConsumeAPIResponseModel is 消费多条消息 成功返回结果

type TaobaoTmcMessagesProduceAPIRequest added in v1.2.0

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

TaobaoTmcMessagesProduceAPIRequest 批量发送消息 API请求 taobao.tmc.messages.produce

批量发送消息

func NewTaobaoTmcMessagesProduceRequest

func NewTaobaoTmcMessagesProduceRequest() *TaobaoTmcMessagesProduceAPIRequest

NewTaobaoTmcMessagesProduceRequest 初始化TaobaoTmcMessagesProduceAPIRequest对象

func (TaobaoTmcMessagesProduceAPIRequest) GetApiMethodName added in v1.2.0

func (r TaobaoTmcMessagesProduceAPIRequest) GetApiMethodName() string

GetApiMethodName IRequest interface 方法, 获取Api method

func (TaobaoTmcMessagesProduceAPIRequest) GetApiParams added in v1.2.0

GetApiParams IRequest interface 方法, 获取API参数

func (TaobaoTmcMessagesProduceAPIRequest) GetMessages added in v1.2.0

GetMessages Messages Getter

func (*TaobaoTmcMessagesProduceAPIRequest) SetMessages added in v1.2.0

func (r *TaobaoTmcMessagesProduceAPIRequest) SetMessages(_messages []TmcPublishMessage) error

SetMessages is Messages Setter tmc消息列表, 最多50条,元素结构与taobao.tmc.message.produce一致,用json表示的消息列表。例如:[{"content": "{\"tid\":1234554321,\"status\":\"X_LOGISTICS_PRINTED\",\"action_time\":\"2014-08-08 18:24:00\",\"seller_nick\": \"向阳aa\",\"operator\":\"小张\"}","topic": "taobao_jds_TradeTrace"},{"content": "{\"tid\":1234554321,\"status\":\"X_LOGISTICS_PRINTED\",\"action_time\":\"2014-08-08 18:24:00\",\"seller_nick\": \"向阳aa\",\"operator\":\"小张\"}","topic": "taobao_jds_TradeTrace"}]

type TaobaoTmcMessagesProduceAPIResponse

type TaobaoTmcMessagesProduceAPIResponse struct {
	model.CommonResponse
	TaobaoTmcMessagesProduceAPIResponseModel
}

TaobaoTmcMessagesProduceAPIResponse 批量发送消息 API返回值 taobao.tmc.messages.produce

批量发送消息

type TaobaoTmcMessagesProduceAPIResponseModel added in v1.2.0

type TaobaoTmcMessagesProduceAPIResponseModel struct {
	XMLName xml.Name `xml:"tmc_messages_produce_response"`
	// 平台颁发的每次请求访问的唯一标识
	RequestId string `json:"request_id,omitempty" xml:"request_id,omitempty"`
	// 发送结果,与发送时的参数顺序一致。如果is_all_success为true时,不用校验result是否成功
	Results []TmcProduceResult `json:"results,omitempty" xml:"results>tmc_produce_result,omitempty"`
	// 是否全部成功
	IsAllSuccess bool `json:"is_all_success,omitempty" xml:"is_all_success,omitempty"`
}

TaobaoTmcMessagesProduceAPIResponseModel is 批量发送消息 成功返回结果

type TaobaoTmcMsgSendrecordAPIRequest added in v1.2.0

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

TaobaoTmcMsgSendrecordAPIRequest 消息发送记录查询 API请求 taobao.tmc.msg.sendrecord

查询单条消息发送记录,只返回返回条数和时间。

func NewTaobaoTmcMsgSendrecordRequest

func NewTaobaoTmcMsgSendrecordRequest() *TaobaoTmcMsgSendrecordAPIRequest

NewTaobaoTmcMsgSendrecordRequest 初始化TaobaoTmcMsgSendrecordAPIRequest对象

func (TaobaoTmcMsgSendrecordAPIRequest) GetApiMethodName added in v1.2.0

func (r TaobaoTmcMsgSendrecordAPIRequest) GetApiMethodName() string

GetApiMethodName IRequest interface 方法, 获取Api method

func (TaobaoTmcMsgSendrecordAPIRequest) GetApiParams added in v1.2.0

func (r TaobaoTmcMsgSendrecordAPIRequest) GetApiParams() url.Values

GetApiParams IRequest interface 方法, 获取API参数

func (TaobaoTmcMsgSendrecordAPIRequest) GetDataId added in v1.2.0

GetDataId DataId Getter

func (TaobaoTmcMsgSendrecordAPIRequest) GetGroupName added in v1.2.0

func (r TaobaoTmcMsgSendrecordAPIRequest) GetGroupName() string

GetGroupName GroupName Getter

func (TaobaoTmcMsgSendrecordAPIRequest) GetTopicName added in v1.2.0

func (r TaobaoTmcMsgSendrecordAPIRequest) GetTopicName() string

GetTopicName TopicName Getter

func (*TaobaoTmcMsgSendrecordAPIRequest) SetDataId added in v1.2.0

func (r *TaobaoTmcMsgSendrecordAPIRequest) SetDataId(_dataId string) error

SetDataId is DataId Setter 消息主键ID

func (*TaobaoTmcMsgSendrecordAPIRequest) SetGroupName added in v1.2.0

func (r *TaobaoTmcMsgSendrecordAPIRequest) SetGroupName(_groupName string) error

SetGroupName is GroupName Setter 消息分组名

func (*TaobaoTmcMsgSendrecordAPIRequest) SetTopicName added in v1.2.0

func (r *TaobaoTmcMsgSendrecordAPIRequest) SetTopicName(_topicName string) error

SetTopicName is TopicName Setter TOPIC名称

type TaobaoTmcMsgSendrecordAPIResponse

type TaobaoTmcMsgSendrecordAPIResponse struct {
	model.CommonResponse
	TaobaoTmcMsgSendrecordAPIResponseModel
}

TaobaoTmcMsgSendrecordAPIResponse 消息发送记录查询 API返回值 taobao.tmc.msg.sendrecord

查询单条消息发送记录,只返回返回条数和时间。

type TaobaoTmcMsgSendrecordAPIResponseModel added in v1.2.0

type TaobaoTmcMsgSendrecordAPIResponseModel struct {
	XMLName xml.Name `xml:"tmc_msg_sendrecord_response"`
	// 平台颁发的每次请求访问的唯一标识
	RequestId string `json:"request_id,omitempty" xml:"request_id,omitempty"`
	// 淘宝发送时间
	TbSendList string `json:"tb_send_list,omitempty" xml:"tb_send_list,omitempty"`
	// TMC发送时间
	TmcSendList string `json:"tmc_send_list,omitempty" xml:"tmc_send_list,omitempty"`
	// tmc发送次数
	TmcSendTimes int64 `json:"tmc_send_times,omitempty" xml:"tmc_send_times,omitempty"`
	// 淘宝发送测试
	TbSendTimes int64 `json:"tb_send_times,omitempty" xml:"tb_send_times,omitempty"`
}

TaobaoTmcMsgSendrecordAPIResponseModel is 消息发送记录查询 成功返回结果

type TaobaoTmcQueueGetAPIRequest added in v1.2.0

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

TaobaoTmcQueueGetAPIRequest 获取消息队列积压情况 API请求 taobao.tmc.queue.get

根据appkey和groupName获取消息队列积压情况

func NewTaobaoTmcQueueGetRequest

func NewTaobaoTmcQueueGetRequest() *TaobaoTmcQueueGetAPIRequest

NewTaobaoTmcQueueGetRequest 初始化TaobaoTmcQueueGetAPIRequest对象

func (TaobaoTmcQueueGetAPIRequest) GetApiMethodName added in v1.2.0

func (r TaobaoTmcQueueGetAPIRequest) GetApiMethodName() string

GetApiMethodName IRequest interface 方法, 获取Api method

func (TaobaoTmcQueueGetAPIRequest) GetApiParams added in v1.2.0

func (r TaobaoTmcQueueGetAPIRequest) GetApiParams() url.Values

GetApiParams IRequest interface 方法, 获取API参数

func (TaobaoTmcQueueGetAPIRequest) GetGroupName added in v1.2.0

func (r TaobaoTmcQueueGetAPIRequest) GetGroupName() string

GetGroupName GroupName Getter

func (*TaobaoTmcQueueGetAPIRequest) SetGroupName added in v1.2.0

func (r *TaobaoTmcQueueGetAPIRequest) SetGroupName(_groupName string) error

SetGroupName is GroupName Setter TMC组名

type TaobaoTmcQueueGetAPIResponse

type TaobaoTmcQueueGetAPIResponse struct {
	model.CommonResponse
	TaobaoTmcQueueGetAPIResponseModel
}

TaobaoTmcQueueGetAPIResponse 获取消息队列积压情况 API返回值 taobao.tmc.queue.get

根据appkey和groupName获取消息队列积压情况

type TaobaoTmcQueueGetAPIResponseModel added in v1.2.0

type TaobaoTmcQueueGetAPIResponseModel struct {
	XMLName xml.Name `xml:"tmc_queue_get_response"`
	// 平台颁发的每次请求访问的唯一标识
	RequestId string `json:"request_id,omitempty" xml:"request_id,omitempty"`
	// 队列详细信息
	Datas []TmcQueueInfo `json:"datas,omitempty" xml:"datas>tmc_queue_info,omitempty"`
}

TaobaoTmcQueueGetAPIResponseModel is 获取消息队列积压情况 成功返回结果

type TaobaoTmcTopicGroupAddAPIRequest added in v1.2.0

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

TaobaoTmcTopicGroupAddAPIRequest topic分组路由 API请求 taobao.tmc.topic.group.add

根据topic名称路由消息到不同的分组。(前提:发送方未指定分组名) 如果是需要授权的消息,分组路由先判断用户分组路由(使用taobao.tmc.group.add添加的路由),用户分组路由不存在时,才会判断topic分组路由

func NewTaobaoTmcTopicGroupAddRequest

func NewTaobaoTmcTopicGroupAddRequest() *TaobaoTmcTopicGroupAddAPIRequest

NewTaobaoTmcTopicGroupAddRequest 初始化TaobaoTmcTopicGroupAddAPIRequest对象

func (TaobaoTmcTopicGroupAddAPIRequest) GetApiMethodName added in v1.2.0

func (r TaobaoTmcTopicGroupAddAPIRequest) GetApiMethodName() string

GetApiMethodName IRequest interface 方法, 获取Api method

func (TaobaoTmcTopicGroupAddAPIRequest) GetApiParams added in v1.2.0

func (r TaobaoTmcTopicGroupAddAPIRequest) GetApiParams() url.Values

GetApiParams IRequest interface 方法, 获取API参数

func (TaobaoTmcTopicGroupAddAPIRequest) GetGroupName added in v1.2.0

func (r TaobaoTmcTopicGroupAddAPIRequest) GetGroupName() string

GetGroupName GroupName Getter

func (TaobaoTmcTopicGroupAddAPIRequest) GetTopics added in v1.2.0

func (r TaobaoTmcTopicGroupAddAPIRequest) GetTopics() []string

GetTopics Topics Getter

func (*TaobaoTmcTopicGroupAddAPIRequest) SetGroupName added in v1.2.0

func (r *TaobaoTmcTopicGroupAddAPIRequest) SetGroupName(_groupName string) error

SetGroupName is GroupName Setter 消息分组名,如果不存在,会自动创建

func (*TaobaoTmcTopicGroupAddAPIRequest) SetTopics added in v1.2.0

func (r *TaobaoTmcTopicGroupAddAPIRequest) SetTopics(_topics []string) error

SetTopics is Topics Setter 消息topic名称,多个以逗号(,)分割

type TaobaoTmcTopicGroupAddAPIResponse

type TaobaoTmcTopicGroupAddAPIResponse struct {
	model.CommonResponse
	TaobaoTmcTopicGroupAddAPIResponseModel
}

TaobaoTmcTopicGroupAddAPIResponse topic分组路由 API返回值 taobao.tmc.topic.group.add

根据topic名称路由消息到不同的分组。(前提:发送方未指定分组名) 如果是需要授权的消息,分组路由先判断用户分组路由(使用taobao.tmc.group.add添加的路由),用户分组路由不存在时,才会判断topic分组路由

type TaobaoTmcTopicGroupAddAPIResponseModel added in v1.2.0

type TaobaoTmcTopicGroupAddAPIResponseModel struct {
	XMLName xml.Name `xml:"tmc_topic_group_add_response"`
	// 平台颁发的每次请求访问的唯一标识
	RequestId string `json:"request_id,omitempty" xml:"request_id,omitempty"`
	// true
	Result bool `json:"result,omitempty" xml:"result,omitempty"`
}

TaobaoTmcTopicGroupAddAPIResponseModel is topic分组路由 成功返回结果

type TaobaoTmcTopicGroupDeleteAPIRequest added in v1.2.0

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

TaobaoTmcTopicGroupDeleteAPIRequest 删除消息topic分组路由 API请求 taobao.tmc.topic.group.delete

删除根据topic名称路由消息到不同的分组关系

func NewTaobaoTmcTopicGroupDeleteRequest

func NewTaobaoTmcTopicGroupDeleteRequest() *TaobaoTmcTopicGroupDeleteAPIRequest

NewTaobaoTmcTopicGroupDeleteRequest 初始化TaobaoTmcTopicGroupDeleteAPIRequest对象

func (TaobaoTmcTopicGroupDeleteAPIRequest) GetApiMethodName added in v1.2.0

func (r TaobaoTmcTopicGroupDeleteAPIRequest) GetApiMethodName() string

GetApiMethodName IRequest interface 方法, 获取Api method

func (TaobaoTmcTopicGroupDeleteAPIRequest) GetApiParams added in v1.2.0

GetApiParams IRequest interface 方法, 获取API参数

func (TaobaoTmcTopicGroupDeleteAPIRequest) GetGroupId added in v1.2.0

GetGroupId GroupId Getter

func (TaobaoTmcTopicGroupDeleteAPIRequest) GetGroupName added in v1.2.0

GetGroupName GroupName Getter

func (TaobaoTmcTopicGroupDeleteAPIRequest) GetTopics added in v1.2.0

GetTopics Topics Getter

func (*TaobaoTmcTopicGroupDeleteAPIRequest) SetGroupId added in v1.2.0

func (r *TaobaoTmcTopicGroupDeleteAPIRequest) SetGroupId(_groupId int64) error

SetGroupId is GroupId Setter 消息分组Id,一般不用填写,如果分组已经被删除,则根据问题排查工具返回的ID删除路由关系

func (*TaobaoTmcTopicGroupDeleteAPIRequest) SetGroupName added in v1.2.0

func (r *TaobaoTmcTopicGroupDeleteAPIRequest) SetGroupName(_groupName string) error

SetGroupName is GroupName Setter 消息分组名

func (*TaobaoTmcTopicGroupDeleteAPIRequest) SetTopics added in v1.2.0

func (r *TaobaoTmcTopicGroupDeleteAPIRequest) SetTopics(_topics []string) error

SetTopics is Topics Setter 消息topic名称,多个以逗号(,)分割

type TaobaoTmcTopicGroupDeleteAPIResponse

type TaobaoTmcTopicGroupDeleteAPIResponse struct {
	model.CommonResponse
	TaobaoTmcTopicGroupDeleteAPIResponseModel
}

TaobaoTmcTopicGroupDeleteAPIResponse 删除消息topic分组路由 API返回值 taobao.tmc.topic.group.delete

删除根据topic名称路由消息到不同的分组关系

type TaobaoTmcTopicGroupDeleteAPIResponseModel added in v1.2.0

type TaobaoTmcTopicGroupDeleteAPIResponseModel struct {
	XMLName xml.Name `xml:"tmc_topic_group_delete_response"`
	// 平台颁发的每次请求访问的唯一标识
	RequestId string `json:"request_id,omitempty" xml:"request_id,omitempty"`
	// true
	Result bool `json:"result,omitempty" xml:"result,omitempty"`
}

TaobaoTmcTopicGroupDeleteAPIResponseModel is 删除消息topic分组路由 成功返回结果

type TaobaoTmcUserCancelAPIRequest added in v1.2.0

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

TaobaoTmcUserCancelAPIRequest 取消用户的消息服务 API请求 taobao.tmc.user.cancel

取消用户的消息服务

func NewTaobaoTmcUserCancelRequest

func NewTaobaoTmcUserCancelRequest() *TaobaoTmcUserCancelAPIRequest

NewTaobaoTmcUserCancelRequest 初始化TaobaoTmcUserCancelAPIRequest对象

func (TaobaoTmcUserCancelAPIRequest) GetApiMethodName added in v1.2.0

func (r TaobaoTmcUserCancelAPIRequest) GetApiMethodName() string

GetApiMethodName IRequest interface 方法, 获取Api method

func (TaobaoTmcUserCancelAPIRequest) GetApiParams added in v1.2.0

func (r TaobaoTmcUserCancelAPIRequest) GetApiParams() url.Values

GetApiParams IRequest interface 方法, 获取API参数

func (TaobaoTmcUserCancelAPIRequest) GetNick added in v1.2.0

GetNick Nick Getter

func (TaobaoTmcUserCancelAPIRequest) GetUserPlatform added in v1.2.0

func (r TaobaoTmcUserCancelAPIRequest) GetUserPlatform() string

GetUserPlatform UserPlatform Getter

func (*TaobaoTmcUserCancelAPIRequest) SetNick added in v1.2.0

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

SetNick is Nick Setter 用户昵称

func (*TaobaoTmcUserCancelAPIRequest) SetUserPlatform added in v1.2.0

func (r *TaobaoTmcUserCancelAPIRequest) SetUserPlatform(_userPlatform string) error

SetUserPlatform is UserPlatform Setter 用户所属的平台类型,tbUIC:淘宝用户; icbu: icbu用户;ae:ae用户

type TaobaoTmcUserCancelAPIResponse

type TaobaoTmcUserCancelAPIResponse struct {
	model.CommonResponse
	TaobaoTmcUserCancelAPIResponseModel
}

TaobaoTmcUserCancelAPIResponse 取消用户的消息服务 API返回值 taobao.tmc.user.cancel

取消用户的消息服务

type TaobaoTmcUserCancelAPIResponseModel added in v1.2.0

type TaobaoTmcUserCancelAPIResponseModel struct {
	XMLName xml.Name `xml:"tmc_user_cancel_response"`
	// 平台颁发的每次请求访问的唯一标识
	RequestId string `json:"request_id,omitempty" xml:"request_id,omitempty"`
	// 是否成功,如果为false并且没有错误码,表示删除的用户不存在。
	IsSuccess bool `json:"is_success,omitempty" xml:"is_success,omitempty"`
}

TaobaoTmcUserCancelAPIResponseModel is 取消用户的消息服务 成功返回结果

type TaobaoTmcUserGetAPIRequest added in v1.2.0

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

TaobaoTmcUserGetAPIRequest 获取用户已开通消息 API请求 taobao.tmc.user.get

查询指定用户开通的消息通道和组

func NewTaobaoTmcUserGetRequest

func NewTaobaoTmcUserGetRequest() *TaobaoTmcUserGetAPIRequest

NewTaobaoTmcUserGetRequest 初始化TaobaoTmcUserGetAPIRequest对象

func (TaobaoTmcUserGetAPIRequest) GetApiMethodName added in v1.2.0

func (r TaobaoTmcUserGetAPIRequest) GetApiMethodName() string

GetApiMethodName IRequest interface 方法, 获取Api method

func (TaobaoTmcUserGetAPIRequest) GetApiParams added in v1.2.0

func (r TaobaoTmcUserGetAPIRequest) GetApiParams() url.Values

GetApiParams IRequest interface 方法, 获取API参数

func (TaobaoTmcUserGetAPIRequest) GetFields added in v1.2.0

func (r TaobaoTmcUserGetAPIRequest) GetFields() string

GetFields Fields Getter

func (TaobaoTmcUserGetAPIRequest) GetNick added in v1.2.0

func (r TaobaoTmcUserGetAPIRequest) GetNick() string

GetNick Nick Getter

func (TaobaoTmcUserGetAPIRequest) GetUserPlatform added in v1.2.0

func (r TaobaoTmcUserGetAPIRequest) GetUserPlatform() string

GetUserPlatform UserPlatform Getter

func (*TaobaoTmcUserGetAPIRequest) SetFields added in v1.2.0

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

SetFields is Fields Setter 需返回的字段列表,多个字段以半角逗号分隔。可选值:TmcUser结构体中的所有字段,一定要返回topic。

func (*TaobaoTmcUserGetAPIRequest) SetNick added in v1.2.0

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

SetNick is Nick Setter 用户昵称

func (*TaobaoTmcUserGetAPIRequest) SetUserPlatform added in v1.2.0

func (r *TaobaoTmcUserGetAPIRequest) SetUserPlatform(_userPlatform string) error

SetUserPlatform is UserPlatform Setter 用户所属的平台类型,tbUIC:淘宝用户; icbu: icbu用户;ae:ae用户

type TaobaoTmcUserGetAPIResponse

type TaobaoTmcUserGetAPIResponse struct {
	model.CommonResponse
	TaobaoTmcUserGetAPIResponseModel
}

TaobaoTmcUserGetAPIResponse 获取用户已开通消息 API返回值 taobao.tmc.user.get

查询指定用户开通的消息通道和组

type TaobaoTmcUserGetAPIResponseModel added in v1.2.0

type TaobaoTmcUserGetAPIResponseModel struct {
	XMLName xml.Name `xml:"tmc_user_get_response"`
	// 平台颁发的每次请求访问的唯一标识
	RequestId string `json:"request_id,omitempty" xml:"request_id,omitempty"`
	// 开通的用户数据
	TmcUser *TmcUser `json:"tmc_user,omitempty" xml:"tmc_user,omitempty"`
}

TaobaoTmcUserGetAPIResponseModel is 获取用户已开通消息 成功返回结果

type TaobaoTmcUserPermitAPIRequest added in v1.2.0

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

TaobaoTmcUserPermitAPIRequest 为已授权的用户开通消息服务 API请求 taobao.tmc.user.permit

为已授权的用户开通消息服务,授权消息使用。<br/><span style="color:red">注意:topic覆盖更新,务必传入全量topic,或者不传topics,使用appkey订阅的所有topic</span>

func NewTaobaoTmcUserPermitRequest

func NewTaobaoTmcUserPermitRequest() *TaobaoTmcUserPermitAPIRequest

NewTaobaoTmcUserPermitRequest 初始化TaobaoTmcUserPermitAPIRequest对象

func (TaobaoTmcUserPermitAPIRequest) GetApiMethodName added in v1.2.0

func (r TaobaoTmcUserPermitAPIRequest) GetApiMethodName() string

GetApiMethodName IRequest interface 方法, 获取Api method

func (TaobaoTmcUserPermitAPIRequest) GetApiParams added in v1.2.0

func (r TaobaoTmcUserPermitAPIRequest) GetApiParams() url.Values

GetApiParams IRequest interface 方法, 获取API参数

func (TaobaoTmcUserPermitAPIRequest) GetTopics added in v1.2.0

func (r TaobaoTmcUserPermitAPIRequest) GetTopics() []string

GetTopics Topics Getter

func (*TaobaoTmcUserPermitAPIRequest) SetTopics added in v1.2.0

func (r *TaobaoTmcUserPermitAPIRequest) SetTopics(_topics []string) error

SetTopics is Topics Setter 消息主题列表,用半角逗号分隔。当用户订阅的topic是应用订阅的子集时才需要设置,不设置表示继承应用所订阅的所有topic,一般情况建议不要设置。

type TaobaoTmcUserPermitAPIResponse

type TaobaoTmcUserPermitAPIResponse struct {
	model.CommonResponse
	TaobaoTmcUserPermitAPIResponseModel
}

TaobaoTmcUserPermitAPIResponse 为已授权的用户开通消息服务 API返回值 taobao.tmc.user.permit

为已授权的用户开通消息服务,授权消息使用。<br/><span style="color:red">注意:topic覆盖更新,务必传入全量topic,或者不传topics,使用appkey订阅的所有topic</span>

type TaobaoTmcUserPermitAPIResponseModel added in v1.2.0

type TaobaoTmcUserPermitAPIResponseModel struct {
	XMLName xml.Name `xml:"tmc_user_permit_response"`
	// 平台颁发的每次请求访问的唯一标识
	RequestId string `json:"request_id,omitempty" xml:"request_id,omitempty"`
	// 是否成功
	IsSuccess bool `json:"is_success,omitempty" xml:"is_success,omitempty"`
}

TaobaoTmcUserPermitAPIResponseModel is 为已授权的用户开通消息服务 成功返回结果

type TaobaoTmcUserTopicsGetAPIRequest added in v1.2.0

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

TaobaoTmcUserTopicsGetAPIRequest 获取用户开通的topic列表 API请求 taobao.tmc.user.topics.get

获取用户开通的topic列表,授权消息使用

func NewTaobaoTmcUserTopicsGetRequest

func NewTaobaoTmcUserTopicsGetRequest() *TaobaoTmcUserTopicsGetAPIRequest

NewTaobaoTmcUserTopicsGetRequest 初始化TaobaoTmcUserTopicsGetAPIRequest对象

func (TaobaoTmcUserTopicsGetAPIRequest) GetApiMethodName added in v1.2.0

func (r TaobaoTmcUserTopicsGetAPIRequest) GetApiMethodName() string

GetApiMethodName IRequest interface 方法, 获取Api method

func (TaobaoTmcUserTopicsGetAPIRequest) GetApiParams added in v1.2.0

func (r TaobaoTmcUserTopicsGetAPIRequest) GetApiParams() url.Values

GetApiParams IRequest interface 方法, 获取API参数

func (TaobaoTmcUserTopicsGetAPIRequest) GetNick added in v1.2.0

GetNick Nick Getter

func (*TaobaoTmcUserTopicsGetAPIRequest) SetNick added in v1.2.0

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

SetNick is Nick Setter 卖家nick

type TaobaoTmcUserTopicsGetAPIResponse

type TaobaoTmcUserTopicsGetAPIResponse struct {
	model.CommonResponse
	TaobaoTmcUserTopicsGetAPIResponseModel
}

TaobaoTmcUserTopicsGetAPIResponse 获取用户开通的topic列表 API返回值 taobao.tmc.user.topics.get

获取用户开通的topic列表,授权消息使用

type TaobaoTmcUserTopicsGetAPIResponseModel added in v1.2.0

type TaobaoTmcUserTopicsGetAPIResponseModel struct {
	XMLName xml.Name `xml:"tmc_user_topics_get_response"`
	// 平台颁发的每次请求访问的唯一标识
	RequestId string `json:"request_id,omitempty" xml:"request_id,omitempty"`
	// topic列表
	Topics []string `json:"topics,omitempty" xml:"topics>string,omitempty"`
	// 错误信息
	ResultMessage string `json:"result_message,omitempty" xml:"result_message,omitempty"`
	// 错误码
	ResultCode string `json:"result_code,omitempty" xml:"result_code,omitempty"`
}

TaobaoTmcUserTopicsGetAPIResponseModel is 获取用户开通的topic列表 成功返回结果

type TmcGroup

type TmcGroup struct {
	// 分组名称
	Name string `json:"name,omitempty" xml:"name,omitempty"`
}

TmcGroup 结构体

type TmcMessage

type TmcMessage struct {
	// 消息所属主题
	Topic string `json:"topic,omitempty" xml:"topic,omitempty"`
	// 消息发布者的AppKey
	PubAppKey string `json:"pub_app_key,omitempty" xml:"pub_app_key,omitempty"`
	// 消息发布时间
	PubTime string `json:"pub_time,omitempty" xml:"pub_time,omitempty"`
	// 用户的昵称
	UserNick string `json:"user_nick,omitempty" xml:"user_nick,omitempty"`
	// 消息详细内容,格式为JSON/XML
	Content string `json:"content,omitempty" xml:"content,omitempty"`
	// 消息ID
	Id int64 `json:"id,omitempty" xml:"id,omitempty"`
	// 消息所属的用户编号
	UserId int64 `json:"user_id,omitempty" xml:"user_id,omitempty"`
}

TmcMessage 结构体

type TmcProduceResult

type TmcProduceResult struct {
	// 错误信息
	ErrorMessage string `json:"error_message,omitempty" xml:"error_message,omitempty"`
	// 错误码
	ErrorCode string `json:"error_code,omitempty" xml:"error_code,omitempty"`
	// 是否成功
	IsSuccess bool `json:"is_success,omitempty" xml:"is_success,omitempty"`
}

TmcProduceResult 结构体

type TmcPublishMessage

type TmcPublishMessage struct {
	// 目标分组
	TargetGroup string `json:"target_group,omitempty" xml:"target_group,omitempty"`
	// 消息类型
	Topic string `json:"topic,omitempty" xml:"topic,omitempty"`
	// 消息内容的JSON表述,必须按照topic的定义来填充
	Content string `json:"content,omitempty" xml:"content,omitempty"`
}

TmcPublishMessage 结构体

type TmcQueueInfo

type TmcQueueInfo struct {
	// TMC组名
	Name string `json:"name,omitempty" xml:"name,omitempty"`
	// 消息队列Broker名称
	BrokerName string `json:"broker_name,omitempty" xml:"broker_name,omitempty"`
	// 当前队列当天读取量
	GetTotal int64 `json:"get_total,omitempty" xml:"get_total,omitempty"`
	// 当前队列当天写入量
	PutToal int64 `json:"put_toal,omitempty" xml:"put_toal,omitempty"`
}

TmcQueueInfo 结构体

type TmcUser

type TmcUser struct {
	// 用户开通的消息类型列表。如果为空表示应用开通的所有类型
	Topics []string `json:"topics,omitempty" xml:"topics>string,omitempty"`
	// 用户所属的平台类型,tbUIC:淘宝用户; icbu: icbu用户
	UserPlatform string `json:"user_platform,omitempty" xml:"user_platform,omitempty"`
	// 用户昵称
	UserNick string `json:"user_nick,omitempty" xml:"user_nick,omitempty"`
	// 用户首次开通时间
	Created string `json:"created,omitempty" xml:"created,omitempty"`
	// 用户最后开通时间
	Modified string `json:"modified,omitempty" xml:"modified,omitempty"`
	// 接收用户消息的组名
	GroupName string `json:"group_name,omitempty" xml:"group_name,omitempty"`
	// 用户ID
	UserId int64 `json:"user_id,omitempty" xml:"user_id,omitempty"`
	// 用户授权是否有效,true表示授权有效,false表示授权过期
	IsValid bool `json:"is_valid,omitempty" xml:"is_valid,omitempty"`
}

TmcUser 结构体

Source Files

Jump to

Keyboard shortcuts

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