SlackWebAPI v1.2.0 SlackWebAPI.Api.Search View Source

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 \\ [])

View Source
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 or timestamp.
    • :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):

Returns

{:ok, %SlackWebAPI.Model.DefaultSuccessTemplate{}} on success {:error, info} on failure