hunter v0.1.0 Hunter.Account

Account entity

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

Fields

  • id - the ID of the account
  • 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

Follow a remote user

Get a list of followers

Get a list of followed 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
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
followers(conn, id)
followers(Hunter.Client.t, non_neg_integer) :: [Hunter.Account.t]

Get a list of followers

Parameters

  • conn - Connection credentials
  • 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
verify_credentials(conn)
verify_credentials(Hunter.Client.t) :: Hunter.Account.t

Retrieve account of authenticated user

Parameters

  • conn - Connection credentials