Hunter.Instance (hunter v0.6.0)

Copy Markdown View Source

Instance entity

This module defines a Hunter.Instance struct and the main functions for working with Instances.

Fields

  • domain - The instance's domain name
  • title - The instance's title
  • version - The Mastodon version used by instance
  • source_url - The URL for the source code of the software running this instance
  • description - A short, plain-text description of the instance
  • usage - Statistics about how much use the instance has seen
  • thumbnail - Assets associated with server branding
  • languages - Primary languages of the instance and its staff
  • configuration - Configured values and limits for this instance
  • registrations - Information about registering for this instance
  • contact - Hints related to contacting a representative of the instance
  • rules - An itemized list of rules for this instance

Summary

Functions

Retrieve instance information

Types

t()

@type t() :: %Hunter.Instance{
  configuration: map(),
  contact: map(),
  description: String.t(),
  domain: String.t(),
  languages: [String.t()],
  registrations: map(),
  rules: [map()],
  source_url: String.t(),
  thumbnail: map(),
  title: String.t(),
  usage: map(),
  version: String.t()
}

Functions

instance_info(conn)

@spec instance_info(Hunter.Client.t()) :: t()

Retrieve instance information

Parameters

  • conn - connection credentials

Examples

iex> conn = Hunter.new([base_url: "https://social.lou.lt", access_token: "123456"])
%Hunter.Client{base_url: "https://social.lou.lt", access_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.",
          domain: "social.lou.lt", title: "Loultstodon", version: "4.3.8"}