diff --git a/examples/info/src/info.gleam b/examples/info/src/info.gleam index 908ca02..14addfc 100644 --- a/examples/info/src/info.gleam +++ b/examples/info/src/info.gleam @@ -8,7 +8,7 @@ pub fn main() { let assert Ok(instance) = apkallone.Client("https://tech.lgbt") - |> instance.get_instance + |> instance.get io.debug(instance) } diff --git a/src/apkallone/mastodon/instance.gleam b/src/apkallone/mastodon/instance.gleam index e49acea..8bde3e8 100644 --- a/src/apkallone/mastodon/instance.gleam +++ b/src/apkallone/mastodon/instance.gleam @@ -4,9 +4,7 @@ import apkallone import apkallone/internal import apkallone/mastodon/model/instance.{type Instance} -pub fn get_instance( - client: apkallone.Client, -) -> Result(Instance, apkallone.Error) { +pub fn get(client: apkallone.Client) -> Result(Instance, apkallone.Error) { use req <- result.try(internal.prepare_request(client, "/api/v2/instance")) use res <- result.try(internal.send_request(req)) internal.decode_response(res, instance.decode)