slack_web_api v1.2.1 SlackWebAPI.Api.Search
API calls for all endpoints tagged Search
.
Link to this section Summary
Functions
Searches for messages matching a query.
Link to this section Functions
Link to this function
search_messages(connection, opts \\ [])
search_messages(Tesla.Env.client(), keyword()) :: {:ok, SlackWebAPI.Model.DefaultSuccessTemplate.t()} | {:error, Tesla.Env.t()}
Searches for messages matching a query.
Parameters
- connection (SlackWebAPI.Connection): Connection to server
opts (KeywordList): [optional] Optional parameters
- :sort_dir (String.t): Change sort direction to ascending (
asc
) or descending (desc
). - :query (String.t): Search query.
- :sort (String.t): Return matches sorted by either
score
ortimestamp
. - :count (String.t): Pass the number of results you want per "page". Maximum of
100
. - :token (String.t): Authentication token. Requires scope:
search:read
- :highlight (boolean()): Pass a value of
true
to enable query highlight markers (see below). - :page (String.t):
- :sort_dir (String.t): Change sort direction to ascending (
Returns
{:ok, %SlackWebAPI.Model.DefaultSuccessTemplate{}} on success {:error, info} on failure