Websms (websms v1.0.0-alpha.1) View Source
Websms - dev
Inofficial OpenAPI Schema for websms.ch
License: Copyrighted
Link to this section Summary
Functions
Perform a DELETE request.
Perform a DELETE request.
Perform a GET request.
Perform a GET request.
GET /smsmessaging/simple
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.
POST /smsmessaging/binary
POST /smsmessaging/simple
POST /smsmessaging/text
Perform a PUT request.
Perform a PUT request.
Perform a request.
Perform request and raise in case of error.
Perform a TRACE request.
Perform a TRACE request.
Link to this section Types
Specs
get_smsmessaging_simple_config() :: %{
:query => get_smsmessaging_simple_config_query(),
optional(:headers) => get_smsmessaging_simple_config_header(),
optional(:opts) => Tesla.Env.opts()
}
Specs
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()
}
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()
}
Specs
Specs
Specs
get_smsmessaging_simple_receive_post_config_request_body() :: Websms.Schema.Write.receive_sms_request()
Specs
get_smsmessaging_simple_receive_post_response() :: response(get_smsmessaging_simple_receive_post_response_options())
Specs
get_smsmessaging_simple_receive_post_response_options() ::
{200, Websms.Schema.Read.receive_sms_response(), Tesla.Env.t()}
Specs
get_smsmessaging_simple_response() :: response(get_smsmessaging_simple_response_options())
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()}
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()
}
Specs
Specs
Specs
post_smsmessaging_binary_config_request_body() :: Websms.Schema.Write.binary_sms_send_request()
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()
}
Specs
Specs
Specs
post_smsmessaging_binary_receive_post_config_request_body() :: Websms.Schema.Write.receive_sms_request()
Specs
post_smsmessaging_binary_receive_post_response() :: response(post_smsmessaging_binary_receive_post_response_options())
Specs
post_smsmessaging_binary_receive_post_response_options() ::
{200, Websms.Schema.Read.receive_sms_response(), Tesla.Env.t()}
Specs
post_smsmessaging_binary_response() :: response(post_smsmessaging_binary_response_options())
Specs
post_smsmessaging_binary_response_options() ::
{401, any(), Tesla.Env.t()}
| {200, Websms.Schema.Read.sms_send_response(), Tesla.Env.t()}
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()
}
Specs
Specs
Specs
post_smsmessaging_simple_config_request_body() :: Websms.Schema.Write.simple_sms_send_request()
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()
}
Specs
Specs
Specs
post_smsmessaging_simple_receive_post_config_request_body() :: Websms.Schema.Write.receive_sms_request()
Specs
post_smsmessaging_simple_receive_post_response() :: response(post_smsmessaging_simple_receive_post_response_options())
Specs
post_smsmessaging_simple_receive_post_response_options() ::
{200, Websms.Schema.Read.receive_sms_response(), Tesla.Env.t()}
Specs
post_smsmessaging_simple_response() :: response(post_smsmessaging_simple_response_options())
Specs
post_smsmessaging_simple_response_options() ::
{401, any(), Tesla.Env.t()}
| {200, Websms.Schema.Read.sms_send_response(), Tesla.Env.t()}
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()
}
Specs
Specs
Specs
post_smsmessaging_text_config_request_body() :: Websms.Schema.Write.text_sms_send_request()
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()
}
Specs
Specs
Specs
post_smsmessaging_text_receive_post_config_request_body() :: Websms.Schema.Write.receive_sms_request()
Specs
post_smsmessaging_text_receive_post_response() :: response(post_smsmessaging_text_receive_post_response_options())
Specs
post_smsmessaging_text_receive_post_response_options() ::
{200, Websms.Schema.Read.receive_sms_response(), Tesla.Env.t()}
Specs
post_smsmessaging_text_response() :: response(post_smsmessaging_text_response_options())
Specs
post_smsmessaging_text_response_options() ::
{401, any(), Tesla.Env.t()}
| {200, Websms.Schema.Read.sms_send_response(), Tesla.Env.t()}
Specs
response(possible_responses) ::
{:ok, possible_responses}
| {:error, {:unexpected_response, Tesla.Env.t()} | any()}
Link to this section Functions
Specs
delete(Tesla.Env.client(), Tesla.Env.url(), [option()]) :: Tesla.Env.result()
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
delete!(Tesla.Env.client(), Tesla.Env.url(), [option()]) :: Tesla.Env.t() | no_return()
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
get(Tesla.Env.client(), Tesla.Env.url(), [option()]) :: Tesla.Env.result()
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
get!(Tesla.Env.client(), Tesla.Env.url(), [option()]) :: Tesla.Env.t() | no_return()
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
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
head(Tesla.Env.client(), Tesla.Env.url(), [option()]) :: Tesla.Env.result()
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"])
Specs
head!(Tesla.Env.client(), Tesla.Env.url(), [option()]) :: Tesla.Env.t() | no_return()
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"])
Specs
options(Tesla.Env.client(), Tesla.Env.url(), [option()]) :: Tesla.Env.result()
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"])
Specs
options!(Tesla.Env.client(), Tesla.Env.url(), [option()]) :: Tesla.Env.t() | no_return()
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"])
Specs
patch(Tesla.Env.client(), Tesla.Env.url(), Tesla.Env.body(), [option()]) :: Tesla.Env.result()
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"])
Specs
patch!(Tesla.Env.client(), Tesla.Env.url(), Tesla.Env.body(), [option()]) :: Tesla.Env.t() | no_return()
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"])
Specs
post(Tesla.Env.client(), Tesla.Env.url(), Tesla.Env.body(), [option()]) :: Tesla.Env.result()
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"])
Specs
post!(Tesla.Env.client(), Tesla.Env.url(), Tesla.Env.body(), [option()]) :: Tesla.Env.t() | no_return()
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"])
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
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
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
Specs
put(Tesla.Env.client(), Tesla.Env.url(), Tesla.Env.body(), [option()]) :: Tesla.Env.result()
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"])
Specs
put!(Tesla.Env.client(), Tesla.Env.url(), Tesla.Env.body(), [option()]) :: Tesla.Env.t() | no_return()
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"])
Specs
request(Tesla.Env.client(), [option()]) :: Tesla.Env.result()
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 usingTesla.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"})
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.
Specs
trace(Tesla.Env.client(), Tesla.Env.url(), [option()]) :: Tesla.Env.result()
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"])
Specs
trace!(Tesla.Env.client(), Tesla.Env.url(), [option()]) :: Tesla.Env.t() | no_return()
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"])