hunter v0.5.1 Hunter.Status View Source

Status entity

Fields

  • id - status id
  • 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 - time the status was created
  • reblogs_count - number of reblogs for the status
  • favourites_count - number of favourites for the status
  • reblogged - whether the authenticated user has reblogged the status
  • favourited - whether the authenticated user has favourited the status
  • muted - whether the authenticated user has muted the conversation this status from
  • 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 - list of Hunter.Mention
  • tags - list of Hunter.Tag
  • application - Hunter.Application from which the status was posted
  • language - detected language for the status, default: en

NOTE: When spoiler_text is present, sensitive is true

Link to this section Summary

Functions

Destroy status

Favorite a status

Fetch a user's favourites

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

Link to this section Types

Link to this type

t() View Source
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(),
  language: String.t(),
  media_attachments: [Hunter.Attachment.t()],
  mentions: [Hunter.Mention.t()],
  muted: boolean(),
  reblog: Hunter.Status.t() | nil,
  reblogged: boolean(),
  reblogs_count: non_neg_integer(),
  sensitive: boolean(),
  spoiler_text: String.t(),
  tags: [Hunter.Tag.t()],
  uri: String.t(),
  url: String.t(),
  visibility: term()
}

Link to this section Functions

Link to this function

create_status(conn, status, options \\ []) View Source
create_status(Hunter.Client.t(), String.t(), Keyword.t()) ::
  Hunter.Status.t() | no_return()

Create new status

Parameters

  • conn - connection credentials
  • status - text of the status
  • options - option list

Options

  • in_reply_to_id - local ID of the status you want to reply to
  • media_ids - list of media IDs to attach to the status (maximum: 4)
  • sensitive - whether the media of the status is NSFW
  • spoiler_text - text to be shown as a warning before the actual content
  • visibility - either direct, private, unlisted or public
Link to this function

destroy_status(conn, id) View Source
destroy_status(Hunter.Client.t(), status_id()) :: boolean()

Destroy status

Parameters

  • conn - connection credentials
  • id - status identifier

Favorite a status

Parameters

  • conn - connection credentials
  • id - status identifier
Link to this function

favourites(conn, options \\ []) View Source
favourites(Hunter.Client.t(), Keyword.t()) :: [Hunter.Status.t()]

Fetch a user's favourites

Parameters

  • conn - connection credentials
  • options - option list

Options

  • max_id - get a list of favourites with id less than or equal this value
  • since_id - get a list of favourites with id greater than this value
  • limit - maximum of favourites to get, default: 20, max: 40
Link to this function

hashtag_timeline(conn, hashtag, options \\ []) View Source
hashtag_timeline(Hunter.Client.t(), [String.t()], Keyword.t()) :: [
  Hunter.Status.t()
]

Retrieve statuses from a hashtag

Parameters

  • conn - connection credentials
  • hashtag - string list
  • options - option list

Options

  • local - only return statuses originating from this instance
  • max_id - get a list of timelines with id less than or equal this value
  • since_id - get a list of timelines with id greater than this value
  • limit - maximum number of statuses on the requested timeline to get, default: 20, max: 40
Link to this function

home_timeline(conn, options \\ []) View Source
home_timeline(Hunter.Client.t(), Keyword.t()) :: [Hunter.Status.t()]

Retrieve statuses from the home timeline

Parameters

  • conn - connection credentials
  • options - option list

Options

  • max_id - get a list of timelines with id less than or equal this value
  • since_id - get a list of timelines with id greater than this value
  • limit - maximum number of statuses on the requested timeline to get, default: 20, max: 40
Link to this function

public_timeline(conn, options \\ []) View Source
public_timeline(Hunter.Client.t(), Keyword.t()) :: [Hunter.Status.t()]

Retrieve statuses from the public timeline

Parameters

  • conn - connection credentials
  • options - option list

Options

  • local - only return statuses originating from this instance
  • max_id - get a list of timelines with id less than or equal this value
  • since_id - get a list of timelines with id greater than this value
  • limit - maximum number of statuses on the requested timeline to get, default: 20, max: 40

Reblog a status

Parameters

  • conn - connection credentials
  • id - status identifier

Retrieve status

Parameters

  • conn - connection credentials
  • id - status identifier
Link to this function

statuses(conn, account_id, options \\ []) View Source

Get a list of statuses by a user

Parameters

  • conn - connection credentials
  • account_id - account identifier
  • options - option list

Options

  • only_media - only return Hunter.Status.t that have media attachments
  • exclude_replies - skip statuses that reply to other statuses
  • max_id - get a list of statuses with id less than or equal this value
  • since_id - get a list of statuses with id greater than this value
  • limit - maximum number of statuses to get, default: 20, max: 40

Undo a favorite of a status

Parameters

  • conn - connection credentials
  • id - status identifier

Undo a reblog of a status

Parameters

  • conn - connection credentials
  • id - status identifier