glitch/api/api_response

Types

pub type TwitchApiResponse(data) {
  TwitchApiResponse(data: List(data))
}

Constructors

  • TwitchApiResponse(data: List(data))

Functions

pub fn from_json(
  json_string: String,
  data_decoder: fn(Dynamic) -> Result(a, List(DecodeError)),
) -> Result(TwitchApiResponse(a), gleam/json.DecodeError)
pub fn get_data(api_response: TwitchApiResponse(a)) -> List(a)
pub fn get_data_from_response(
  response: Response(TwitchApiResponse(a)),
) -> Result(Response(List(a)), b)
Search Document