View Source Slack.API (Slack Elixir v1.0.1)

Slack Web API.

Summary

Functions

Req client for Slack API.

GET from Slack API.

Functions

@spec client(String.t()) :: Req.Request.t()

Req client for Slack API.

Link to this function

get(endpoint, token, args \\ %{})

View Source
@spec get(String.t(), String.t(), map() | keyword()) ::
  {:ok, map()} | {:error, term()}

GET from Slack API.

Link to this function

post(endpoint, token, args \\ %{})

View Source
@spec post(String.t(), String.t(), map() | keyword()) ::
  {:ok, map()} | {:error, term()}

POST to Slack API.

Link to this function

stream(endpoint, token, resource, args \\ %{})

View Source
@spec stream(String.t(), String.t(), String.t(), map() | keyword()) :: Enumerable.t()

GET pages from Slack API as a Stream.

You can start at a cursor if you pass in :next_cursor as one of the args. Note that it is assumed to be an atom key. If you use a string key you'll end up with next_cursor parameter twice.