hunter v0.5.1 Hunter.Instance View Source
Instance entity
This module defines a Hunter.Instance
struct and the main functions
for working with Instances.
Fields
uri
- URI of the current instancetitle
- The instance's titledescription
- A description for the instanceemail
- An email address which can be used to contact the instance administratorversion
- The Mastodon version used by instance.urls
-streaming_api
Link to this section Summary
Functions
Retrieve instance information
Link to this section Types
Link to this section Functions
Link to this function
instance_info(conn)
View Source
instance_info(conn)
View Source
instance_info(Hunter.Client.t()) :: Hunter.Instance.t()
instance_info(Hunter.Client.t()) :: Hunter.Instance.t()
Retrieve instance information
Parameters
conn
- connection credentials
Examples
iex> conn = Hunter.new([base_url: "https://social.lou.lt", bearer_token: "123456"])
%Hunter.Client{base_url: "https://social.lou.lt", bearer_token: "123456"}
iex> Hunter.Instance.instance_info(conn)
%Hunter.Instance{description: "Mostly French instance - <a href=\"/about/more#rules\">Read full description</a> for rules.",
email: "maxime+mastodon@melinon.fr", title: "Loultstodon",
uri: "social.lou.lt"}