public class JSMSClient extends Object
| 构造器和说明 |
|---|
JSMSClient(String masterSecret,
String appkey) |
JSMSClient(String masterSecret,
String appkey,
cn.jiguang.common.connection.HttpProxy proxy,
JSMSConfig conf) |
| 限定符和类型 | 方法和说明 |
|---|---|
cn.jiguang.common.resp.ResponseWrapper |
deleteScheduleSMS(String scheduleId)
Delete schedule SMS by scheduleId
|
AppBalanceResult |
getAppSMSBalance()
Get app's SMS balance of an account
|
ScheduleSMSResult |
getScheduleSMS(String scheduleId)
Get schedule SMS by scheduleId
|
AccountBalanceResult |
getSMSBalance()
Get account's SMS balance
|
SMSClient |
getSMSClient() |
ScheduleListResult |
sendBatchScheduleSMS(ScheduleSMSPayload payload)
Submit a mission that sending a batch of SMS with schedule
|
ScheduleResult |
sendScheduleSMS(ScheduleSMSPayload payload)
Submit a mission that sending a template SMS with pointed schedule
|
SendSMSResult |
sendSMSCode(SMSPayload payload)
Send SMS verification code to mobile
|
SendSMSResult |
sendTemplateSMS(SMSPayload payload)
Send template SMS to mobile
|
ValidSMSResult |
sendValidSMSCode(String msgId,
String code)
Send SMS verification code to server, to verify if the code valid
|
SendSMSResult |
sendVoiceSMSCode(SMSPayload payload)
Send voice SMS verification code to mobile
|
ScheduleListResult |
updateBatchScheduleSMS(ScheduleSMSPayload payload,
String scheduleId)
Update batch of SMS with schedule
|
ScheduleResult |
updateScheduleSMS(ScheduleSMSPayload payload,
String scheduleId)
Modify SMS with schedule
|
public JSMSClient(String masterSecret, String appkey, cn.jiguang.common.connection.HttpProxy proxy, JSMSConfig conf)
public SMSClient getSMSClient()
public SendSMSResult sendSMSCode(SMSPayload payload) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
payload - include two parameters: mobile number and templete id. The second parameter is optional.cn.jiguang.common.resp.APIConnectionException - connection exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic ValidSMSResult sendValidSMSCode(String msgId, String code) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
msgId - The message id of the verification codecode - Verification codecn.jiguang.common.resp.APIConnectionException - connection exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic SendSMSResult sendVoiceSMSCode(SMSPayload payload) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
payload - payload includes two parameters: mobile number and ttl(time to live),
the second one is optional(if miss ttl, will use default value 60 seconds).cn.jiguang.common.resp.APIConnectionException - connection exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic SendSMSResult sendTemplateSMS(SMSPayload payload) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
payload - payload includes mobile, temp_id and temp_para, the temp_para is a map,
which's key is what you had set in jiguang portalcn.jiguang.common.resp.APIConnectionException - connection exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic ScheduleResult sendScheduleSMS(ScheduleSMSPayload payload) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
payload - ScheduleSMSPayloadcn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic ScheduleResult updateScheduleSMS(ScheduleSMSPayload payload, String scheduleId) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
payload - ScheduleSMSPayloadscheduleId - idcn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic ScheduleListResult sendBatchScheduleSMS(ScheduleSMSPayload payload) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
payload - Payload should include sendTime and recipientscn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic ScheduleListResult updateBatchScheduleSMS(ScheduleSMSPayload payload, String scheduleId) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
payload - ScheduleSMSPayloadscheduleId - idcn.jiguang.common.resp.APIConnectionException - connection exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic ScheduleSMSResult getScheduleSMS(String scheduleId) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
scheduleId - idcn.jiguang.common.resp.APIConnectionException - connection exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic cn.jiguang.common.resp.ResponseWrapper deleteScheduleSMS(String scheduleId) throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
scheduleId - idcn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic AccountBalanceResult getSMSBalance() throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
cn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionpublic AppBalanceResult getAppSMSBalance() throws cn.jiguang.common.resp.APIConnectionException, cn.jiguang.common.resp.APIRequestException
cn.jiguang.common.resp.APIConnectionException - connect exceptioncn.jiguang.common.resp.APIRequestException - request exceptionCopyright © 2017. All Rights Reserved.