ex_webexteams v0.1.5 ExWebexteams.Api.Shortcuts View Source
Shortcuts is a set of “shortcuts” to common api call. They are designed to be useable in a pipeline (described below)
Pipelines
Example sending messages
Send a text message to a room
@room = 12345
send_message("my message") |> by_room_id(@room) |> post_message
Send a file to a user
@user = "person@here.com"
@file = "https://files.com/funny.gif"
send_file(@file) |> to_person_email(@user) |> post_message
Example getting messages
Get the last message for me from a room
@room = 12345
find_my_messages([:max, 1]) |> by_room_id(@room) |> get_messages
Link to this section Summary
Functions
Get or Send a prepared message to a room by id
Find messages from a room
Get a messages from webex
Post a prepared message to webex
Send a file (by url) with an optional description
Send a text message with optional markdown
Send a prepared message to a person by email
Send a prepared message to a person by id
Link to this section Functions
by_room_id(message(), String.t()) :: message()
Get or Send a prepared message to a room by id
find_my_messages(options()) :: options()
Find messages from a room
Options example
Before message “1234”
find_my_messages(%{"beforeMessage" => 1234})
Max of 10 messages before a time (ISO8601 yyyy-MM-dd'T'HH:mm:ss.SSSZ
)
find_my_messages(%{"max" => 10, "before" => "2018-09-01T01:23:00.000Z"})
Get a messages from webex
Post a prepared message to webex
Send a file (by url) with an optional description
Send a text message with optional markdown
to_person_email(message(), String.t()) :: message()
Send a prepared message to a person by email
to_person_id(message(), String.t()) :: message()
Send a prepared message to a person by id