Skip to content

Latest commit

 

History

History
32 lines (25 loc) · 681 Bytes

README.md

File metadata and controls

32 lines (25 loc) · 681 Bytes

Swagger

Package Version Hex Docs

gleam add swagger
import swagger
import swagger/users
import gleam/httpc
import gleam/io

pub fn main() {
  let s = swagger.new()
    |> swagger.with_hostname("codeberg.org")
  
  let u = s |> users.get_user("naomi")
  use resp <- result.try(httpc.send(u))
  Ok(resp.body |> models.decode_user) |> io.debug
}

Further documentation can be found at https://hexdocs.pm/swagger.

Development

gleam run   # Run the project
gleam test  # Run the tests