instance.get_instance -> instance.get
This commit is contained in:
parent
ec177f2b60
commit
82b6564ae1
2 changed files with 2 additions and 4 deletions
|
@ -8,7 +8,7 @@ pub fn main() {
|
|||
|
||||
let assert Ok(instance) =
|
||||
apkallone.Client("https://tech.lgbt")
|
||||
|> instance.get_instance
|
||||
|> instance.get
|
||||
|
||||
io.debug(instance)
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue