Documentation
¶
Index ¶
Constants ¶
View Source
const APIVersion = "2020-09-02"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
func NewClient ¶
func NewClient(credential *common.Credential, region string, clientProfile *profile.ClientProfile) (client *Client, err error)
func NewClientWithSecretId ¶
Deprecated
func (*Client) SendCodeVoice ¶
func (c *Client) SendCodeVoice(request *SendCodeVoiceRequest) (response *SendCodeVoiceResponse, err error)
给用户发语音验证码(仅支持数字)。
func (*Client) SendTtsVoice ¶
func (c *Client) SendTtsVoice(request *SendTtsVoiceRequest) (response *SendTtsVoiceResponse, err error)
给用户发送指定模板的语音通知。
type SendCodeVoiceRequest ¶
type SendCodeVoiceRequest struct { *tchttp.BaseRequest // 验证码,仅支持填写数字,实际播报语音时,会自动在数字前补充语音文本"您的验证码是"。 CodeMessage *string `json:"CodeMessage,omitempty" name:"CodeMessage"` // 被叫手机号码,采用 e.164 标准,格式为+[国家或地区码][用户号码]。 // 例如:+8613711112222, 其中前面有一个+号 ,86为国家码,13711112222为手机号。 CalledNumber *string `json:"CalledNumber,omitempty" name:"CalledNumber"` // 在[语音控制台](https://console.cloud.tencent.com/vms)添加应用后生成的实际SdkAppid,示例如1400006666。 VoiceSdkAppid *string `json:"VoiceSdkAppid,omitempty" name:"VoiceSdkAppid"` // 播放次数,可选,最多3次,默认2次。 PlayTimes *uint64 `json:"PlayTimes,omitempty" name:"PlayTimes"` // 用户的 session 内容,腾讯 server 回包中会原样返回。 SessionContext *string `json:"SessionContext,omitempty" name:"SessionContext"` }
func NewSendCodeVoiceRequest ¶
func NewSendCodeVoiceRequest() (request *SendCodeVoiceRequest)
func (*SendCodeVoiceRequest) FromJsonString ¶
func (r *SendCodeVoiceRequest) FromJsonString(s string) error
It is highly **NOT** recommended to use this function because it has no param check, nor strict type check
func (*SendCodeVoiceRequest) ToJsonString ¶
func (r *SendCodeVoiceRequest) ToJsonString() string
type SendCodeVoiceResponse ¶
type SendCodeVoiceResponse struct { *tchttp.BaseResponse Response *struct { // 语音验证码发送状态。 SendStatus *SendStatus `json:"SendStatus,omitempty" name:"SendStatus"` // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` } `json:"Response"` }
func NewSendCodeVoiceResponse ¶
func NewSendCodeVoiceResponse() (response *SendCodeVoiceResponse)
func (*SendCodeVoiceResponse) FromJsonString ¶
func (r *SendCodeVoiceResponse) FromJsonString(s string) error
It is highly **NOT** recommended to use this function because it has no param check, nor strict type check
func (*SendCodeVoiceResponse) ToJsonString ¶
func (r *SendCodeVoiceResponse) ToJsonString() string
type SendStatus ¶
type SendTtsVoiceRequest ¶
type SendTtsVoiceRequest struct { *tchttp.BaseRequest // 模板 ID,在控制台审核通过的模板 ID。 TemplateId *string `json:"TemplateId,omitempty" name:"TemplateId"` // 被叫手机号码,采用 e.164 标准,格式为+[国家或地区码][用户号码]。 // 例如:+8613711112222, 其中前面有一个+号 ,86为国家码,13711112222为手机号。 CalledNumber *string `json:"CalledNumber,omitempty" name:"CalledNumber"` // 在[语音控制台](https://console.cloud.tencent.com/vms)添加应用后生成的实际SdkAppid,示例如1400006666。 VoiceSdkAppid *string `json:"VoiceSdkAppid,omitempty" name:"VoiceSdkAppid"` // 模板参数,若模板没有参数,请提供为空数组。 // 注:语音消息的内容长度不超过350字。 TemplateParamSet []*string `json:"TemplateParamSet,omitempty" name:"TemplateParamSet" list` // 播放次数,可选,最多3次,默认2次。 PlayTimes *uint64 `json:"PlayTimes,omitempty" name:"PlayTimes"` // 用户的 session 内容,腾讯 server 回包中会原样返回。 SessionContext *string `json:"SessionContext,omitempty" name:"SessionContext"` }
func NewSendTtsVoiceRequest ¶
func NewSendTtsVoiceRequest() (request *SendTtsVoiceRequest)
func (*SendTtsVoiceRequest) FromJsonString ¶
func (r *SendTtsVoiceRequest) FromJsonString(s string) error
It is highly **NOT** recommended to use this function because it has no param check, nor strict type check
func (*SendTtsVoiceRequest) ToJsonString ¶
func (r *SendTtsVoiceRequest) ToJsonString() string
type SendTtsVoiceResponse ¶
type SendTtsVoiceResponse struct { *tchttp.BaseResponse Response *struct { // 语音通知发送状态。 SendStatus *SendStatus `json:"SendStatus,omitempty" name:"SendStatus"` // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` } `json:"Response"` }
func NewSendTtsVoiceResponse ¶
func NewSendTtsVoiceResponse() (response *SendTtsVoiceResponse)
func (*SendTtsVoiceResponse) FromJsonString ¶
func (r *SendTtsVoiceResponse) FromJsonString(s string) error
It is highly **NOT** recommended to use this function because it has no param check, nor strict type check
func (*SendTtsVoiceResponse) ToJsonString ¶
func (r *SendTtsVoiceResponse) ToJsonString() string
Click to show internal directories.
Click to hide internal directories.