Websms (websms v1.0.0-alpha.1) View Source

Websms - dev

Inofficial OpenAPI Schema for websms.ch

License: Copyrighted

Link to this section Summary

Types

Functions

Perform a DELETE request.

Perform a DELETE request.

Perform a GET request.

Perform a GET request.

Perform a HEAD request.

Perform a HEAD request.

Perform a OPTIONS request.

Perform a OPTIONS request.

Perform a PATCH request.

Perform a PATCH request.

Perform a POST request.

Perform a POST request.

Perform a PUT request.

Perform a PUT request.

Perform request and raise in case of error.

Perform a TRACE request.

Perform a TRACE request.

Link to this section Types

Link to this type

get_smsmessaging_simple_config()

View Source

Specs

get_smsmessaging_simple_config() :: %{
  :query => get_smsmessaging_simple_config_query(),
  optional(:headers) => get_smsmessaging_simple_config_header(),
  optional(:opts) => Tesla.Env.opts()
}
Link to this type

get_smsmessaging_simple_config_header()

View Source

Specs

get_smsmessaging_simple_config_header() :: %{optional(String.t()) => any()}
Link to this type

get_smsmessaging_simple_config_query()

View Source

Specs

get_smsmessaging_simple_config_query() :: %{
  optional(:clientMessageId) => String.t(),
  optional(:contentCategory) => Websms.Schema.Write.content_category(),
  optional(:maxSmsPerMessage) => integer(),
  :messageContent => String.t(),
  optional(:messageType) => Websms.Schema.Write.message_type(),
  optional(:notificationCallbackUrl) => String.t(),
  optional(:priority) => integer(),
  :recipientAddressList => [Websms.Schema.Write.e164()],
  optional(:sendAsFlashSms) => boolean(),
  optional(:senderAddress) => Websms.Schema.Write.e164(),
  optional(:senderAddressType) => Websms.Schema.Write.address_type(),
  optional(:test) => boolean(),
  optional(:validityPeriode) => integer(),
  optional(String.t()) => any()
}
Link to this type

get_smsmessaging_simple_receive_post_config()

View Source

Specs

get_smsmessaging_simple_receive_post_config() :: %{
  :body => get_smsmessaging_simple_receive_post_config_request_body(),
  optional(:query) => get_smsmessaging_simple_receive_post_config_query(),
  optional(:headers) => get_smsmessaging_simple_receive_post_config_header(),
  optional(:opts) => Tesla.Env.opts()
}
Link to this type

get_smsmessaging_simple_receive_post_config_header()

View Source

Specs

get_smsmessaging_simple_receive_post_config_header() :: %{
  optional(String.t()) => any()
}
Link to this type

get_smsmessaging_simple_receive_post_config_query()

View Source

Specs

get_smsmessaging_simple_receive_post_config_query() :: %{
  optional(String.t()) => any()
}
Link to this type

get_smsmessaging_simple_receive_post_config_request_body()

View Source

Specs

get_smsmessaging_simple_receive_post_config_request_body() ::
  Websms.Schema.Write.receive_sms_request()
Link to this type

get_smsmessaging_simple_receive_post_response()

View Source

Specs

get_smsmessaging_simple_receive_post_response() ::
  response(get_smsmessaging_simple_receive_post_response_options())
Link to this type

get_smsmessaging_simple_receive_post_response_options()

View Source

Specs

get_smsmessaging_simple_receive_post_response_options() ::
  {200, Websms.Schema.Read.receive_sms_response(), Tesla.Env.t()}
Link to this type

get_smsmessaging_simple_response()

View Source

Specs

get_smsmessaging_simple_response() ::
  response(get_smsmessaging_simple_response_options())
Link to this type

get_smsmessaging_simple_response_options()

View Source

Specs

get_smsmessaging_simple_response_options() ::
  {401, any(), Tesla.Env.t()}
  | {200, Websms.Schema.Read.sms_send_response(), Tesla.Env.t()}

Specs

option() ::
  {:method, Tesla.Env.method()}
  | {:url, Tesla.Env.url()}
  | {:query, Tesla.Env.query()}
  | {:headers, Tesla.Env.headers()}
  | {:body, Tesla.Env.body()}
  | {:opts, Tesla.Env.opts()}
Link to this type

post_smsmessaging_binary_config()

View Source

Specs

post_smsmessaging_binary_config() :: %{
  :body => post_smsmessaging_binary_config_request_body(),
  optional(:query) => post_smsmessaging_binary_config_query(),
  optional(:headers) => post_smsmessaging_binary_config_header(),
  optional(:opts) => Tesla.Env.opts()
}
Link to this type

post_smsmessaging_binary_config_header()

View Source

Specs

post_smsmessaging_binary_config_header() :: %{optional(String.t()) => any()}
Link to this type

post_smsmessaging_binary_config_query()

View Source

Specs

post_smsmessaging_binary_config_query() :: %{optional(String.t()) => any()}
Link to this type

post_smsmessaging_binary_config_request_body()

View Source

Specs

post_smsmessaging_binary_config_request_body() ::
  Websms.Schema.Write.binary_sms_send_request()
Link to this type

post_smsmessaging_binary_receive_post_config()

View Source

Specs

post_smsmessaging_binary_receive_post_config() :: %{
  :body => post_smsmessaging_binary_receive_post_config_request_body(),
  optional(:query) => post_smsmessaging_binary_receive_post_config_query(),
  optional(:headers) => post_smsmessaging_binary_receive_post_config_header(),
  optional(:opts) => Tesla.Env.opts()
}
Link to this type

post_smsmessaging_binary_receive_post_config_header()

View Source

Specs

post_smsmessaging_binary_receive_post_config_header() :: %{
  optional(String.t()) => any()
}
Link to this type

post_smsmessaging_binary_receive_post_config_query()

View Source

Specs

post_smsmessaging_binary_receive_post_config_query() :: %{
  optional(String.t()) => any()
}
Link to this type

post_smsmessaging_binary_receive_post_config_request_body()

View Source

Specs

post_smsmessaging_binary_receive_post_config_request_body() ::
  Websms.Schema.Write.receive_sms_request()
Link to this type

post_smsmessaging_binary_receive_post_response()

View Source

Specs

post_smsmessaging_binary_receive_post_response() ::
  response(post_smsmessaging_binary_receive_post_response_options())
Link to this type

post_smsmessaging_binary_receive_post_response_options()

View Source

Specs

post_smsmessaging_binary_receive_post_response_options() ::
  {200, Websms.Schema.Read.receive_sms_response(), Tesla.Env.t()}
Link to this type

post_smsmessaging_binary_response()

View Source

Specs

post_smsmessaging_binary_response() ::
  response(post_smsmessaging_binary_response_options())
Link to this type

post_smsmessaging_binary_response_options()

View Source

Specs

post_smsmessaging_binary_response_options() ::
  {401, any(), Tesla.Env.t()}
  | {200, Websms.Schema.Read.sms_send_response(), Tesla.Env.t()}
Link to this type

post_smsmessaging_simple_config()

View Source

Specs

post_smsmessaging_simple_config() :: %{
  :body => post_smsmessaging_simple_config_request_body(),
  optional(:query) => post_smsmessaging_simple_config_query(),
  optional(:headers) => post_smsmessaging_simple_config_header(),
  optional(:opts) => Tesla.Env.opts()
}
Link to this type

post_smsmessaging_simple_config_header()

View Source

Specs

post_smsmessaging_simple_config_header() :: %{optional(String.t()) => any()}
Link to this type

post_smsmessaging_simple_config_query()

View Source

Specs

post_smsmessaging_simple_config_query() :: %{optional(String.t()) => any()}
Link to this type

post_smsmessaging_simple_config_request_body()

View Source

Specs

post_smsmessaging_simple_config_request_body() ::
  Websms.Schema.Write.simple_sms_send_request()
Link to this type

post_smsmessaging_simple_receive_post_config()

View Source

Specs

post_smsmessaging_simple_receive_post_config() :: %{
  :body => post_smsmessaging_simple_receive_post_config_request_body(),
  optional(:query) => post_smsmessaging_simple_receive_post_config_query(),
  optional(:headers) => post_smsmessaging_simple_receive_post_config_header(),
  optional(:opts) => Tesla.Env.opts()
}
Link to this type

post_smsmessaging_simple_receive_post_config_header()

View Source

Specs

post_smsmessaging_simple_receive_post_config_header() :: %{
  optional(String.t()) => any()
}
Link to this type

post_smsmessaging_simple_receive_post_config_query()

View Source

Specs

post_smsmessaging_simple_receive_post_config_query() :: %{
  optional(String.t()) => any()
}
Link to this type

post_smsmessaging_simple_receive_post_config_request_body()

View Source

Specs

post_smsmessaging_simple_receive_post_config_request_body() ::
  Websms.Schema.Write.receive_sms_request()
Link to this type

post_smsmessaging_simple_receive_post_response()

View Source

Specs

post_smsmessaging_simple_receive_post_response() ::
  response(post_smsmessaging_simple_receive_post_response_options())
Link to this type

post_smsmessaging_simple_receive_post_response_options()

View Source

Specs

post_smsmessaging_simple_receive_post_response_options() ::
  {200, Websms.Schema.Read.receive_sms_response(), Tesla.Env.t()}
Link to this type

post_smsmessaging_simple_response()

View Source

Specs

post_smsmessaging_simple_response() ::
  response(post_smsmessaging_simple_response_options())
Link to this type

post_smsmessaging_simple_response_options()

View Source

Specs

post_smsmessaging_simple_response_options() ::
  {401, any(), Tesla.Env.t()}
  | {200, Websms.Schema.Read.sms_send_response(), Tesla.Env.t()}
Link to this type

post_smsmessaging_text_config()

View Source

Specs

post_smsmessaging_text_config() :: %{
  :body => post_smsmessaging_text_config_request_body(),
  optional(:query) => post_smsmessaging_text_config_query(),
  optional(:headers) => post_smsmessaging_text_config_header(),
  optional(:opts) => Tesla.Env.opts()
}
Link to this type

post_smsmessaging_text_config_header()

View Source

Specs

post_smsmessaging_text_config_header() :: %{optional(String.t()) => any()}
Link to this type

post_smsmessaging_text_config_query()

View Source

Specs

post_smsmessaging_text_config_query() :: %{optional(String.t()) => any()}
Link to this type

post_smsmessaging_text_config_request_body()

View Source

Specs

post_smsmessaging_text_config_request_body() ::
  Websms.Schema.Write.text_sms_send_request()
Link to this type

post_smsmessaging_text_receive_post_config()

View Source

Specs

post_smsmessaging_text_receive_post_config() :: %{
  :body => post_smsmessaging_text_receive_post_config_request_body(),
  optional(:query) => post_smsmessaging_text_receive_post_config_query(),
  optional(:headers) => post_smsmessaging_text_receive_post_config_header(),
  optional(:opts) => Tesla.Env.opts()
}
Link to this type

post_smsmessaging_text_receive_post_config_header()

View Source

Specs

post_smsmessaging_text_receive_post_config_header() :: %{
  optional(String.t()) => any()
}
Link to this type

post_smsmessaging_text_receive_post_config_query()

View Source

Specs

post_smsmessaging_text_receive_post_config_query() :: %{
  optional(String.t()) => any()
}
Link to this type

post_smsmessaging_text_receive_post_config_request_body()

View Source

Specs

post_smsmessaging_text_receive_post_config_request_body() ::
  Websms.Schema.Write.receive_sms_request()
Link to this type

post_smsmessaging_text_receive_post_response()

View Source

Specs

post_smsmessaging_text_receive_post_response() ::
  response(post_smsmessaging_text_receive_post_response_options())
Link to this type

post_smsmessaging_text_receive_post_response_options()

View Source

Specs

post_smsmessaging_text_receive_post_response_options() ::
  {200, Websms.Schema.Read.receive_sms_response(), Tesla.Env.t()}
Link to this type

post_smsmessaging_text_response()

View Source

Specs

post_smsmessaging_text_response() ::
  response(post_smsmessaging_text_response_options())
Link to this type

post_smsmessaging_text_response_options()

View Source

Specs

post_smsmessaging_text_response_options() ::
  {401, any(), Tesla.Env.t()}
  | {200, Websms.Schema.Read.sms_send_response(), Tesla.Env.t()}
Link to this type

response(possible_responses)

View Source

Specs

response(possible_responses) ::
  {:ok, possible_responses}
  | {:error, {:unexpected_response, Tesla.Env.t()} | any()}

Link to this section Functions

Link to this function

delete(client, url, opts)

View Source

Specs

Perform a DELETE request.

See request/1 or request/2 for options definition.

delete("/users")
delete("/users", query: [scope: "admin"])
delete(client, "/users")
delete(client, "/users", query: [scope: "admin"])
Link to this function

delete!(client, url, opts)

View Source

Specs

Perform a DELETE request.

See request!/1 or request!/2 for options definition.

delete!("/users")
delete!("/users", query: [scope: "admin"])
delete!(client, "/users")
delete!(client, "/users", query: [scope: "admin"])

Specs

Perform a GET request.

See request/1 or request/2 for options definition.

get("/users")
get("/users", query: [scope: "admin"])
get(client, "/users")
get(client, "/users", query: [scope: "admin"])

Specs

Perform a GET request.

See request!/1 or request!/2 for options definition.

get!("/users")
get!("/users", query: [scope: "admin"])
get!(client, "/users")
get!(client, "/users", query: [scope: "admin"])
Link to this function

get_smsmessaging_simple(client \\ %Tesla.Client{}, config)

View Source

Specs

get_smsmessaging_simple(
  client :: Tesla.Client.t(),
  config :: get_smsmessaging_simple_config()
) :: get_smsmessaging_simple_response()

GET /smsmessaging/simple

Sends a text message to a list of recipients with a simple GET request

Specs

Perform a HEAD request.

See request/1 or request/2 for options definition.

head("/users")
head("/users", query: [scope: "admin"])
head(client, "/users")
head(client, "/users", query: [scope: "admin"])
Link to this function

head!(client, url, opts)

View Source

Specs

Perform a HEAD request.

See request!/1 or request!/2 for options definition.

head!("/users")
head!("/users", query: [scope: "admin"])
head!(client, "/users")
head!(client, "/users", query: [scope: "admin"])
Link to this function

options(client, url, opts)

View Source

Specs

Perform a OPTIONS request.

See request/1 or request/2 for options definition.

options("/users")
options("/users", query: [scope: "admin"])
options(client, "/users")
options(client, "/users", query: [scope: "admin"])
Link to this function

options!(client, url, opts)

View Source

Specs

Perform a OPTIONS request.

See request!/1 or request!/2 for options definition.

options!("/users")
options!("/users", query: [scope: "admin"])
options!(client, "/users")
options!(client, "/users", query: [scope: "admin"])
Link to this function

patch(client, url, body, opts)

View Source

Specs

Perform a PATCH request.

See request/1 or request/2 for options definition.

patch("/users", %{name: "Jon"})
patch("/users", %{name: "Jon"}, query: [scope: "admin"])
patch(client, "/users", %{name: "Jon"})
patch(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
Link to this function

patch!(client, url, body, opts)

View Source

Specs

Perform a PATCH request.

See request!/1 or request!/2 for options definition.

patch!("/users", %{name: "Jon"})
patch!("/users", %{name: "Jon"}, query: [scope: "admin"])
patch!(client, "/users", %{name: "Jon"})
patch!(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
Link to this function

post(client, url, body, opts)

View Source

Specs

Perform a POST request.

See request/1 or request/2 for options definition.

post("/users", %{name: "Jon"})
post("/users", %{name: "Jon"}, query: [scope: "admin"])
post(client, "/users", %{name: "Jon"})
post(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
Link to this function

post!(client, url, body, opts)

View Source

Specs

Perform a POST request.

See request!/1 or request!/2 for options definition.

post!("/users", %{name: "Jon"})
post!("/users", %{name: "Jon"}, query: [scope: "admin"])
post!(client, "/users", %{name: "Jon"})
post!(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
Link to this function

post_smsmessaging_binary(client \\ %Tesla.Client{}, config)

View Source

Specs

post_smsmessaging_binary(
  client :: Tesla.Client.t(),
  config :: post_smsmessaging_binary_config()
) :: post_smsmessaging_binary_response()

POST /smsmessaging/binary

Sends a binary message to a list of recipients

Link to this function

post_smsmessaging_simple(client \\ %Tesla.Client{}, config)

View Source

Specs

post_smsmessaging_simple(
  client :: Tesla.Client.t(),
  config :: post_smsmessaging_simple_config()
) :: post_smsmessaging_simple_response()

POST /smsmessaging/simple

Sends a text message to a list of recipients with a simple POST request

Link to this function

post_smsmessaging_text(client \\ %Tesla.Client{}, config)

View Source

Specs

post_smsmessaging_text(
  client :: Tesla.Client.t(),
  config :: post_smsmessaging_text_config()
) :: post_smsmessaging_text_response()

POST /smsmessaging/text

Sends a text message to a list of recipients

Link to this function

put(client, url, body, opts)

View Source

Specs

Perform a PUT request.

See request/1 or request/2 for options definition.

put("/users", %{name: "Jon"})
put("/users", %{name: "Jon"}, query: [scope: "admin"])
put(client, "/users", %{name: "Jon"})
put(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
Link to this function

put!(client, url, body, opts)

View Source

Specs

Perform a PUT request.

See request!/1 or request!/2 for options definition.

put!("/users", %{name: "Jon"})
put!("/users", %{name: "Jon"}, query: [scope: "admin"])
put!(client, "/users", %{name: "Jon"})
put!(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
Link to this function

request(client \\ %Tesla.Client{}, options)

View Source

Specs

Perform a request.

Options

  • :method - the request method, one of [:head, :get, :delete, :trace, :options, :post, :put, :patch]
  • :url - either full url e.g. "http://example.com/some/path" or just "/some/path" if using Tesla.Middleware.BaseUrl
  • :query - a keyword list of query params, e.g. [page: 1, per_page: 100]
  • :headers - a keyworld list of headers, e.g. [{"content-type", "text/plain"}]
  • :body - depends on used middleware:
    • by default it can be a binary
    • if using e.g. JSON encoding middleware it can be a nested map
    • if adapter supports it it can be a Stream with any of the above
  • :opts - custom, per-request middleware or adapter options

Examples

ExampleApi.request(method: :get, url: "/users/path")

# use shortcut methods
ExampleApi.get("/users/1")
ExampleApi.post(client, "/users", %{name: "Jon"})
Link to this function

request!(client \\ %Tesla.Client{}, options)

View Source

Specs

request!(Tesla.Env.client(), [option()]) :: Tesla.Env.t() | no_return()

Perform request and raise in case of error.

This is similar to request/2 behaviour from Tesla 0.x

See request/2 for list of available options.

Link to this function

trace(client, url, opts)

View Source

Specs

Perform a TRACE request.

See request/1 or request/2 for options definition.

trace("/users")
trace("/users", query: [scope: "admin"])
trace(client, "/users")
trace(client, "/users", query: [scope: "admin"])
Link to this function

trace!(client, url, opts)

View Source

Specs

Perform a TRACE request.

See request!/1 or request!/2 for options definition.

trace!("/users")
trace!("/users", query: [scope: "admin"])
trace!(client, "/users")
trace!(client, "/users", query: [scope: "admin"])