Current section
Files
Jump to
Current section
Files
lib/teac/api/charity/donations.ex
defmodule Teac.Api.Charity.Donations do
alias Teac.Api
@doc """
Gets the list of donations that users have made to the broadcaster's active charity campaign.
## Authorization
Requires a user access token with the `channel:read:charity` scope.
"""
@spec get(Teac.Client.t(), keyword()) :: {:ok, list(map())} | {:error, Teac.Error.t()}
def get(%Teac.Client{} = client, _opts \\ []) do
[
base_url: Api.uri("charity/donations"),
params: [],
headers: Api.headers(client)
]
|> Keyword.merge(Application.get_env(:teac, :api_req_options, []))
|> Req.get()
|> Api.handle_response()
end
end