类 SmsClient


  • public class SmsClient
    extends SmsClientSupport
    The entrance class for all client access to the API of SMS(Baidu message Service).

    All of the API method of SMS is included in this class.

    • 构造器详细资料

      • SmsClient

        public SmsClient()
        Constructs a new SmsClient instance with default settings.
      • SmsClient

        public SmsClient​(SmsClientConfiguration config)
        Constructs a new SmsClient instance with the specified configuration.
        参数:
        config - the specified configuration, default inherit super class com.baidubce.BceClientConfiguration
        另请参阅:
        SmsClientConfiguration
    • 方法详细资料

      • sendMessage

        @Deprecated
        public SendMessageResponse sendMessage​(SendMessageRequest request)
        已过时。
        This method is deprecated and will be removed from sdk in the future when SMS3.0 is officially released, we suggest you to use sendMessage(SendMessageV3Request) instead.
        Send message

        To send message, you have to specify a template which is built by system, or created by yourself which is audited by BCE administrator.

        One or more receiver can be specified while sending message.

        参数:
        request - The request object which includes the content to send and one or more receiver
        返回:
        The response object which includes the id of message and the statistics of sending result
        另请参阅:
        SendMessageRequest, SendMessageResponse
      • sendMessage

        @Deprecated
        public SendMessageV2Response sendMessage​(SendMessageV2Request request)
        已过时。
        This method is deprecated and will be removed from sdk in the future when SMS3.0 is officially released, we suggest you to use sendMessage(SendMessageV3Request) instead.
        Send message with parameter SendMessageV2Request
      • sendMessage

        public SendMessageV3Response sendMessage​(SendMessageV3Request request)
        Send message

        The interface of sending message by SMS3.0. To send message, you have to specify a template and a signature which are created by yourself.

        参数:
        request - refer to com.baidubce.services.sms.model.SendMessageV3Request
        返回:
        refer to com.baidubce.services.sms.model.SendMessageV3Response
      • createTemplate

        public CreateTemplateResponse createTemplate​(CreateTemplateRequest request)
        Create message template

        The template which is created will have a unique id. after audited by BCE administrator, it can be used normally.

        参数:
        request - The request object which includes the name and content of template which is ready to be created
        返回:
        The response object which includes the id of template which is created
        另请参阅:
        CreateTemplateRequest, CreateTemplateResponse
      • createTemplate

        public CreateTemplateResponse createTemplate​(CreateTemplateRequest request)
        Create the template
        参数:
        request - refer to com.baidubce.services.sms.model.v3.CreateTemplateRequest
        返回:
        The response object which indicates the detail of newly created template, refer to com.baidubce.services.sms.model.v3.CreateTemplateResponse
      • deleteTemplate

        public void deleteTemplate​(DeleteTemplateRequest request)
        Delete message template
        参数:
        request - The request object which includes the id of template which is ready to be deleted
        另请参阅:
        DeleteTemplateRequest
      • deleteTemplate

        public void deleteTemplate​(DeleteTemplateRequest request)
        Delete the template
        参数:
        request - refer to com.baidubce.services.sms.model.v3.DeleteTemplateRequest
      • getTemplateDetail

        @Deprecated
        public GetTemplateDetailResponse getTemplateDetail​(GetTemplateDetailRequest request)
        已过时。
        This method is deprecated and will be removed from sdk in the future when SMS3.0 is officially released, we suggest you to use this.getTemplate(com.baidubce.services.sms.model.v3.GetTemplateRequest) instead.
        Get the detail of message template
        参数:
        request - The request object which includes the id of template which is ready to be get
        返回:
        The response object which includes all of the detail of message template, refer to com.baidubce.services.sms.model.GetTemplateDetailResponse
        另请参阅:
        GetTemplateDetailRequest, GetTemplateDetailResponse
      • listTemplate

        public ListTemplateResponse listTemplate​(SmsRequest request)
        已过时。
        This method is deprecated and will be removed from sdk in the future when SMS3.0 is officially released, we suggest you to use this.listTemplate(ListTemplateRequest request) instead.
        Get the list of message template
        参数:
        request - The request object which is empty
        返回:
        The response object which includes all of the detail of message template,refer to com.baidubce.services.sms.model.ListTemplateResponse
        另请参阅:
        ListTemplateResponse
      • listTemplate

        public ListTemplateResponse listTemplate​(ListTemplateRequest request)
        Get the list of the templates
        参数:
        request - refer to com.baidubce.services.sms.model.v3.ListTemplateRequest
        返回:
        The response object indicates the list of the template, refer to com.baidubce.services.sms.model.v3.ListTemplateResponse
      • queryQuota

        public QueryQuotaResponse queryQuota​(SmsRequest request)
        已过时。
        This method is deprecated and will be removed from sdk in the future when SMS3.0 is officially released, we suggest you to use this.queryQuotaRate() instead.
        Query the sending quota
        参数:
        request - The request object which is empty
        返回:
        The response object which includes the detail of sending quota, refer to com.baidubce.services.sms.model.QueryQuotaResponse
        另请参阅:
        QueryQuotaResponse
      • createSignature

        public CreateSignatureResponse createSignature​(CreateSignatureRequest request)
        Create the signature
        参数:
        request - refer to com.baidubce.services.sms.model.v3.CreateSignatureRequest
        返回:
        The response object which indicates the detail of newly created signature, refer to com.baidubce.services.sms.model.v3.CreateSignatureResponse
      • deleteSignature

        public void deleteSignature​(DeleteSignatureRequest request)
        Delete the signature
        参数:
        request - refer to com.baidubce.services.sms.model.v3.DeleteSignatureRequest
      • modifySignature

        public void modifySignature​(ModifySignatureRequest request)
        Modify the signature when audit failure
        参数:
        request - refer to com.baidubce.services.sms.model.v3.ModifySignatureRequest
      • getSignature

        public GetSignatureResponse getSignature​(GetSignatureRequest request)
        Get signature detail info
        参数:
        request - refer to com.baidubce.services.sms.model.v3.GetSignatureRequest
        返回:
        The response object which includes the signature detail info, refer to com.baidubce.services.sms.model.v3.GetSignatureResponse
      • modifyTemplate

        public void modifyTemplate​(ModifyTemplateRequest request)
        Modify the template when audit failure
        参数:
        request - refer to com.baidubce.services.sms.model.v3.ModifyTemplateRequest
      • getTemplate

        public GetTemplateResponse getTemplate​(GetTemplateRequest request)
        Get template detail info
        参数:
        request - refer to com.baidubce.services.sms.model.v3.GetTemplateRequest
        返回:
        The response object which includes the template detail info, refer to com.baidubce.services.sms.model.v3.GetTemplateResponse
      • updateQuotaRate

        public void updateQuotaRate​(UpdateQuotaRateRequest request)
        Update quota and rate-limit
        参数:
        request - refer to com.baidubce.services.sms.model.v3.UpdateQuotaRateRequest
      • queryQuotaRate

        public QueryQuotaRateResponse queryQuotaRate()
        Query quota and rate-limit detail
        返回:
        The response object which includes the detail quota and rate-limit info, refer to com.baidubce.services.sms.model.v3.QueryQuotaRateResponse
      • listSignature

        public ListSignatureResponse listSignature​(ListSignatureRequest request)
        Get the list of the signatures
        参数:
        request - refer to com.baidubce.services.sms.model.v3.ListSignatureRequest
        返回:
        The response object indicates the list of the template, refer to com.baidubce.services.sms.model.v3.ListSignatureResponse
      • createMobileBlack

        public void createMobileBlack​(CreateBlackRequest request)
        create mobile black
      • deleteMobileBlack

        public void deleteMobileBlack​(String phones)
        delete mobile black