hunter v0.1.0 Hunter.Status

Status entity

Fields

  • id - The ID of the status
  • uri - A Fediverse-unique resource ID
  • url - URL to the status page (can be remote)
  • account - The Hunter.Account which posted the status
  • in_reply_to_id - nil or the ID of the status it replies to
  • in_reply_to_account_id - nil or the ID of the account it replies to
  • reblog - nil or the reblogged Hunter.Status
  • content - Body of the status; this will contain HTML (remote HTML already sanitized)
  • created_at - The time the status was created
  • reblogs_count - The number of reblogs for the status
  • favourites_count - The number of favourites for the status
  • reblogged - Whether the authenticated user has reblogged the status
  • favourited - Whether the authenticated user has favourited the status
  • sensitive - Whether media attachments should be hidden by default
  • spoiler_text - If not empty, warning text that should be displayed before the actual content
  • visibility - One of: public, unlisted, private, direct
  • media_attachments - A list of Hunter.Attachment
  • mentions - A list of Hunter.Mention
  • tags - A list of Hunter.Tag
  • application - Hunter.Application from which the status was posted

Summary

Functions

Destroy status

Favorite a status

Retrieve statuses from a hashtag

Retrieve statuses from the home timeline

Retrieve statuses from the public timeline

Reblog a status

Retrieve status

Get a list of statuses by a user

Undo a favorite of a status

Undo a reblog of a status

Types

t()
t() :: %Hunter.Status{account: Hunter.Account.t, application: Hunter.Application.t, content: String.t, created_at: String.t, favourited: boolean, favourites_count: non_neg_integer, id: non_neg_integer, in_reply_to_account_id: term, in_reply_to_id: non_neg_integer, media_attachments: [Hunter.Attachment.t], mentions: [Hunter.Mention.t], reblog: Hunter.Status.t | nil, reblogged: boolean, reblogs_count: non_neg_integer, sensitive: boolean, spoiler_text: String.t, tags: [Hunter.Tag.t], uri: URI.t, url: URI.t, visibility: term}

Functions

create_status(conn, text, in_reply_to_id \\ nil, media_ids \\ [])
create_status(Hunter.Client.t, String.t, non_neg_integer, [non_neg_integer]) :: Hunter.Status.t

Create new status

Parameters

  • conn - connection credentials
  • text - [String]
  • in_reply_to_id - [Integer]
  • media_ids - [Array]
destroy_status(conn, id)
destroy_status(Hunter.Client.t, non_neg_integer) :: boolean

Destroy status

Parameters

  • conn - Connection credentials
  • id [Integer]
favourite(conn, id)
favourite(Hunter.Client.t, non_neg_integer) :: Hunter.Status.t

Favorite a status

Parameters

  • conn - Connection credentials
  • id - [Integer]
hashtag_timeline(conn, hashtag, options \\ [])

Retrieve statuses from a hashtag

Parameters

  • conn - connection credentials
  • hashtag - string list

Options

  • max_id - [Integer]
  • since_id - [Integer]
  • limit - [Integer]
home_timeline(conn, options \\ [])

Retrieve statuses from the home timeline

Parameters

  • conn - Connection credentials
  • options - option list

Options

  • conn - Connection credentials
  • max_id - [Integer]
  • since_id - [Integer]
  • limit - [Integer]
public_timeline(conn, options \\ [])
public_timeline(Hunter.Client.t, Keyword.t) :: [Hunter.Status.t]

Retrieve statuses from the public timeline

Parametes

  • conn - Connection credentials
  • options - option list

Options

  • max_id - [Integer]
  • since_id - [Integer]
  • limit - [Integer]
reblog(conn, id)
reblog(Hunter.Client.t, non_neg_integer) :: Hunter.Status.t

Reblog a status

Parameters

  • conn - Connection credentials
  • id - [Integer]
status(conn, id)
status(Hunter.Client.t, non_neg_integer) :: Hunter.Status.t

Retrieve status

Parameters

  • conn - Connection credentials
  • id [Integer]
statuses(conn, account_id, options \\ [])
statuses(Hunter.Client.t, non_neg_integer, Keyword.t) :: [Hunter.Status.t]

Get a list of statuses by a user

Parameters

  • conn - Connection credentials
  • account_id [Integer]
  • options - options

Options

  • max_id - [Integer]
  • since_id - [Integer]
  • limit - [Integer]
unfavourite(conn, id)
unfavourite(Hunter.Client.t, non_neg_integer) :: Hunter.Status.t

Undo a favorite of a status

Parameters

  • conn - Connection credentials
  • id - [Integer]
unreblog(conn, id)
unreblog(Hunter.Client.t, non_neg_integer) :: Hunter.Status.t

Undo a reblog of a status

Parameters

  • conn - Connection credentials
  • id - [Integer]