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 instance
  • title - The instance's title
  • description - A description for the instance
  • email - An email address which can be used to contact the instance administrator
  • version - 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 type

t() View Source
t() :: %Hunter.Instance{
  description: String.t(),
  email: String.t(),
  title: String.t(),
  uri: String.t(),
  urls: String.t(),
  version: String.t()
}

Link to this section Functions

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"}