hunter v0.5.1 Hunter.Status View Source
Status entity
Fields
id- status iduri- a Fediverse-unique resource IDurl- URL to the status page (can be remote)account- theHunter.Accountwhich posted the statusin_reply_to_id-nilor the ID of the status it replies toin_reply_to_account_id-nilor the ID of the account it replies toreblog-nilor the rebloggedHunter.Statuscontent- body of the status; this will contain HTML (remote HTML already sanitized)created_at- time the status was createdreblogs_count- number of reblogs for the statusfavourites_count- number of favourites for the statusreblogged- whether the authenticated user has reblogged the statusfavourited- whether the authenticated user has favourited the statusmuted- whether the authenticated user has muted the conversation this status fromsensitive- whether media attachments should be hidden by defaultspoiler_text- if not empty, warning text that should be displayed before the actual contentvisibility- one of:public,unlisted,private,directmedia_attachments- A list ofHunter.Attachmentmentions- list ofHunter.Mentiontags- list ofHunter.Tagapplication-Hunter.Applicationfrom which the status was postedlanguage- detected language for the status, default: en
NOTE: When spoiler_text is present, sensitive is true
Link to this section Summary
Functions
Create new status
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
status_id()
View Source
status_id()
View Source
status_id() :: non_neg_integer()
status_id() :: non_neg_integer()
Link to this type
t()
View Source
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()
}
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(conn, status, options \\ [])
View Source
create_status(Hunter.Client.t(), String.t(), Keyword.t()) ::
Hunter.Status.t() | no_return()
create_status(Hunter.Client.t(), String.t(), Keyword.t()) :: Hunter.Status.t() | no_return()
Create new status
Parameters
conn- connection credentialsstatus- text of the statusoptions- option list
Options
in_reply_to_id- local ID of the status you want to reply tomedia_ids- list of media IDs to attach to the status (maximum: 4)sensitive- whether the media of the status is NSFWspoiler_text- text to be shown as a warning before the actual contentvisibility- eitherdirect,private,unlistedorpublic
Link to this function
destroy_status(conn, id)
View Source
destroy_status(conn, id)
View Source
destroy_status(Hunter.Client.t(), status_id()) :: boolean()
destroy_status(Hunter.Client.t(), status_id()) :: boolean()
Destroy status
Parameters
conn- connection credentialsid- status identifier
Link to this function
favourite(conn, id)
View Source
favourite(conn, id)
View Source
favourite(Hunter.Client.t(), status_id()) :: Hunter.Status.t()
favourite(Hunter.Client.t(), status_id()) :: Hunter.Status.t()
Favorite a status
Parameters
conn- connection credentialsid- status identifier
Link to this function
favourites(conn, options \\ [])
View Source
favourites(conn, options \\ [])
View Source
favourites(Hunter.Client.t(), Keyword.t()) :: [Hunter.Status.t()]
favourites(Hunter.Client.t(), Keyword.t()) :: [Hunter.Status.t()]
Fetch a user's favourites
Parameters
conn- connection credentialsoptions- option list
Options
max_id- get a list of favourites with id less than or equal this valuesince_id- get a list of favourites with id greater than this valuelimit- maximum of favourites to get, default: 20, max: 40
Link to this function
hashtag_timeline(conn, hashtag, options \\ [])
View Source
hashtag_timeline(conn, hashtag, options \\ [])
View Source
hashtag_timeline(Hunter.Client.t(), [String.t()], Keyword.t()) :: [
Hunter.Status.t()
]
hashtag_timeline(Hunter.Client.t(), [String.t()], Keyword.t()) :: [ Hunter.Status.t() ]
Retrieve statuses from a hashtag
Parameters
conn- connection credentialshashtag- string listoptions- option list
Options
local- only return statuses originating from this instancemax_id- get a list of timelines with id less than or equal this valuesince_id- get a list of timelines with id greater than this valuelimit- 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(conn, options \\ [])
View Source
home_timeline(Hunter.Client.t(), Keyword.t()) :: [Hunter.Status.t()]
home_timeline(Hunter.Client.t(), Keyword.t()) :: [Hunter.Status.t()]
Retrieve statuses from the home timeline
Parameters
conn- connection credentialsoptions- option list
Options
max_id- get a list of timelines with id less than or equal this valuesince_id- get a list of timelines with id greater than this valuelimit- 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(conn, options \\ [])
View Source
public_timeline(Hunter.Client.t(), Keyword.t()) :: [Hunter.Status.t()]
public_timeline(Hunter.Client.t(), Keyword.t()) :: [Hunter.Status.t()]
Retrieve statuses from the public timeline
Parameters
conn- connection credentialsoptions- option list
Options
local- only return statuses originating from this instancemax_id- get a list of timelines with id less than or equal this valuesince_id- get a list of timelines with id greater than this valuelimit- maximum number of statuses on the requested timeline to get, default: 20, max: 40
Link to this function
reblog(conn, id)
View Source
reblog(conn, id)
View Source
reblog(Hunter.Client.t(), status_id()) :: Hunter.Status.t()
reblog(Hunter.Client.t(), status_id()) :: Hunter.Status.t()
Reblog a status
Parameters
conn- connection credentialsid- status identifier
Link to this function
status(conn, id)
View Source
status(conn, id)
View Source
status(Hunter.Client.t(), status_id()) :: Hunter.Status.t()
status(Hunter.Client.t(), status_id()) :: Hunter.Status.t()
Retrieve status
Parameters
conn- connection credentialsid- status identifier
Link to this function
statuses(conn, account_id, options \\ [])
View Source
statuses(conn, account_id, options \\ [])
View Source
statuses(Hunter.Client.t(), status_id(), Keyword.t()) :: [Hunter.Status.t()]
statuses(Hunter.Client.t(), status_id(), Keyword.t()) :: [Hunter.Status.t()]
Get a list of statuses by a user
Parameters
conn- connection credentialsaccount_id- account identifieroptions- option list
Options
only_media- only returnHunter.Status.tthat have media attachmentsexclude_replies- skip statuses that reply to other statusesmax_id- get a list of statuses with id less than or equal this valuesince_id- get a list of statuses with id greater than this valuelimit- maximum number of statuses to get, default: 20, max: 40
Link to this function
unfavourite(conn, id)
View Source
unfavourite(conn, id)
View Source
unfavourite(Hunter.Client.t(), status_id()) :: Hunter.Status.t()
unfavourite(Hunter.Client.t(), status_id()) :: Hunter.Status.t()
Undo a favorite of a status
Parameters
conn- connection credentialsid- status identifier
Link to this function
unreblog(conn, id)
View Source
unreblog(conn, id)
View Source
unreblog(Hunter.Client.t(), status_id()) :: Hunter.Status.t()
unreblog(Hunter.Client.t(), status_id()) :: Hunter.Status.t()
Undo a reblog of a status
Parameters
conn- connection credentialsid- status identifier