hunter v0.3.0 Hunter.Account

Account entity

This module defines a Hunter.Account struct and the main functions for working with Accounts.

Fields

  • id - the account id
  • username - the username of the account
  • acct - equals username for local users, includes @domain for remote ones
  • display_name - the account’s display name
  • note - biography of user
  • url - URL of the user’s profile page (can be remote)
  • avatar - URL to the avatar image
  • header - URL to the header image
  • locked - boolean for when the account cannot be followed without waiting for approval first
  • created_at - the time the account was created
  • followers_count - the number of followers for the account
  • following_count - the number of accounts the given account is following
  • statuses_count - the number of statuses the account has made

Summary

Functions

Retrieve account

Retrieve user’s blocks

Follow a remote user

Retrieve a list of follow requests

Get a list of followers

Get a list of followed accounts

Retrieve user’s mutes

Search for accounts

Retrieve account of authenticated user

Types

t()
t() :: %Hunter.Account{acct: String.t, avatar: URI.t, created_at: String.t, display_name: String.t, followers_count: non_neg_integer, following_count: non_neg_integer, header: URI.t, id: non_neg_integer, locked: String.t, note: String.t, statuses_count: non_neg_integer, url: URI.t, username: String.t}

Functions

account(conn, id)
account(Hunter.Client.t, non_neg_integer) :: Hunter.Account.t

Retrieve account

Parameters

  • conn - connection credentials
  • id - account id
blocks(conn)

Retrieve user’s blocks

Parameters

  • conn - connection credentials
follow_by_uri(conn, uri)

Follow a remote user

Parameters

  • conn - connection credentials
  • uri - URI of the remote user, in the format of username@domain
follow_requests(conn)
follow_requests(Hunter.Client.t) :: [Hunter.Account.t]

Retrieve a list of follow requests

Parameters

  • conn - connection credentials
followers(conn, id)
followers(Hunter.Client.t, non_neg_integer) :: [Hunter.Account.t]

Get a list of followers

Parameters

  • conn - connection credentials
  • id - account id
following(conn, id)
following(Hunter.Client.t, non_neg_integer) :: [Hunter.Account.t]

Get a list of followed accounts

Parameters

  • conn - connection credentials
  • id - account id
mutes(conn)

Retrieve user’s mutes

Parameters

  • conn - connection credentials
search_account(conn, options)

Search for accounts

Parameters

  • conn - connection credentials
  • options - option list

Options

  • q: what to search for
  • limit: maximum number of matching accounts to return, default: 40
verify_credentials(conn)
verify_credentials(Hunter.Client.t) :: Hunter.Account.t

Retrieve account of authenticated user

Parameters

  • conn - connection credentials