SMSFactor.SendSMS (SMSFactor v0.2.0) View Source

Wrappers around Send SMS section of SMSFactor API.

Link to this section Summary

Types

Params for sending SMS campaign.

Params for sending SMS.

Link to this section Types

Link to this type

send_campaign_params()

View Source

Specs

send_campaign_params() :: %{sms: %{required(atom()) => any()}}

Params for sending SMS campaign.

  • text (required) : Your message
  • value (required) : The recipients' numbers
  • pushtype : The push type (alert or marketing)
  • delay : Sending date Y-m-d H:i:s
  • sender : Allows you to customize the sender
  • gsmsmsid : An id of your choice to link it to its delivery report

Example

{
  "sms": {
    "message": {
      "text": "Message via API",
      "pushtype": "alert",
      "sender": "Illidan",
      "delay": "2021-06-06 10:28:32"
    },
    "recipients": {
      "gsm": [
        {
          "gsmsmsid": "100",
          "value": "33612345678"
        },
        {
          "gsmsmsid": "101",
          "value": "33612345677"
        }
      ]
    }
  }
}

Specs

send_sms_params() :: %{required(atom()) => any()}

Params for sending SMS.

  • token (required if not in headers) : Your token
  • text (required) : Your message
  • to (required) : Your destination
  • pushtype : The push type (alert or marketing)
  • delay : Sending date Y-m-d H:i:s
  • sender : Allows you to customize the sender
  • gsmsmsid : An id of your choice to link it to its delivery report

Example

{
  "text": "Message via API",
  "to": ""33612345678"
  "pushtype": "alert",
  "sender": "Illidan",
  "delay": "2021-06-06 10:28:32",
  "gsmsmsid": "100"
}

Link to this section Functions

Link to this function

campaign(client, params)

View Source

Specs

Link to this function

campaign_with_list(client, params)

View Source

Specs

campaign_with_list(Tesla.Client.t(), send_campaign_params()) ::
  Tesla.Env.result()
Link to this function

cancel_campaign(client, campaign_id)

View Source

Specs

cancel_campaign(Tesla.Client.t(), String.t()) :: Tesla.Env.result()
Link to this function

simulate_campaign(client, params)

View Source

Specs

Link to this function

simulate_single_message(client, params)

View Source

Specs

simulate_single_message(Tesla.Client.t(), send_sms_params()) ::
  Tesla.Env.result()
Link to this function

single_message(client, params)

View Source

Specs

single_message(Tesla.Client.t(), send_sms_params()) :: Tesla.Env.result()