hunter v0.1.0 Hunter.Api behaviour

Summary

Callbacks

Retrieve account

Block a user

Register a new OAuth client app on the target instance

Destroy status

Favorite a status

Follow a user

Follow a remote user

Get a list of followers

Get a list of followed accounts

Retrieve statuses from a hashtag

Retrieve statuses from the home timeline

Mute a user

Retrieve statuses from the public timeline

Reblog a status

Get the relationships of authenticated user towards given other users

Search for content

Retrieve status

Get a list of statuses by a user

Unblock a user

Undo a favorite of a status

Unfollow a user

Unmute a user

Undo a reblog of a status

Upload a media file

Retrieve account of authenticated user

Callbacks

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

Retrieve account

Parameters

  • conn - connection credentials
  • id - account identifier
block(conn, id)
block(conn :: Hunter.Client.t, id :: non_neg_integer) :: Hunter.Relationship.t

Block a user

Parameters

  • conn - connection credentials
  • id - user identifier
create_app(conn, name, redirect_uri, scopes, website)
create_app(conn :: Hunter.Client.t, name :: String.t, redirect_uri :: URI.t, scopes :: String.t, website :: String.t) :: Hunter.Application.t

Register a new OAuth client app on the target instance

Parameters

  • conn - connection credentials
  • name
  • redirect_uri
  • scopes
  • website
create_status(conn, text, in_reply_to_id, media_ids)
create_status(conn :: Hunter.Client.t, text :: String.t, in_reply_to_id :: non_neg_integer, media_ids :: [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(conn :: Hunter.Client.t, id :: non_neg_integer) :: boolean

Destroy status

Parameters

  • conn - connection credentials
  • id - status identifier
favourite(conn, id)
favourite(conn :: Hunter.Client.t, id :: non_neg_integer) :: Hunter.Status.t

Favorite a status

Parameters

  • conn - connection credentials
  • id - status identifier
follow(conn, id)
follow(conn :: Hunter.Client.t, id :: non_neg_integer) :: Hunter.Relationship.t

Follow a user

Parameters

  • conn - connection credentials
  • id - user id
follow_by_uri(conn, id)
follow_by_uri(conn :: Hunter.Client.t, id :: non_neg_integer) :: Hunter.Account.t

Follow a remote user

Parameters

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

Get a list of followers

Parameters

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

Get a list of followed accounts

Parameters

  • conn - connection credentials
  • id - account identifier
hashtag_timeline(conn, hashtag, options)
hashtag_timeline(conn :: Hunter.Client.t, hashtag :: [String.t], options :: Keyword.t) :: [Hunter.Status]

Retrieve statuses from a hashtag

Parameters

  • conn - connection credentials
  • hashtag - list of strings

Options

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

Retrieve statuses from the home timeline

Parameters

  • conn - connection credentials
  • options - option list

Options

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

Mute a user

Parameters

  • conn - connection credentials
  • id - user identifier
public_timeline(conn, options)
public_timeline(conn :: Hunter.Client.t, options :: Keyword.t) :: [Hunter.Status.t]

Retrieve statuses from the public timeline

Parameters

  • conn - connection credentials
  • options - option list

Options

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

Reblog a status

Parameters

  • conn - connection credentials
  • id - status identifier
relationships(ids)
relationships(ids :: [non_neg_integer]) :: [Hunter.Relationship.t]

Get the relationships of authenticated user towards given other users

Parameters

  • id - list of relationship IDs
search(arg0, query, options)
search(Hunter.Client.t, query :: String.t, options :: Keyword.t) :: Hunter.Result.t

Search for content

Parameters

  • conn - connection credentials
  • q - the search query
  • options - option list

Options

  • resolve - whether to resolve non-local accounts
status(conn, id)
status(conn :: Hunter.Client.t, id :: non_neg_integer) :: Hunter.Status

Retrieve status

Parameters

  • conn - connection credentials
  • id - status identifier
statuses(conn, account_id, options)
statuses(conn :: Hunter.Client.t, account_id :: non_neg_integer, options :: Keyword.t) :: [Hunter.Status.t]

Get a list of statuses by a user

Parameters

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

Options

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

Unblock a user

  • conn - connection credentials
  • id - user identifier
unfavourite(conn, id)
unfavourite(conn :: Hunter.Client.t, id :: non_neg_integer) :: Hunter.Status.t

Undo a favorite of a status

Parameters

  • conn - connection credentials
  • id - status identifier
unfollow(conn, id)
unfollow(conn :: Hunter.Client.t, id :: non_neg_integer) :: Hunter.Relationship.t

Unfollow a user

Parameters

  • conn - connection credentials
  • id - user identifier
unmute(conn, id)
unmute(conn :: Hunter.Client.t, id :: non_neg_integer) :: Hunter.Relationship.t

Unmute a user

Parameters

  • conn - connection credentials
  • id - user identifier
unreblog(conn, id)
unreblog(conn :: Hunter.Client.t, id :: non_neg_integer) :: Hunter.Status.t

Undo a reblog of a status

Parameters

  • conn - connection credentials
  • id - status identifier
upload_media(conn, file)
upload_media(conn :: Hunter.Client.t, file :: Path.t) :: Hunter.Media.t

Upload a media file

Parameters

  • conn - connection credentials
  • file -
verify_credentials(conn)
verify_credentials(conn :: Hunter.Client.t) :: Hunter.Account.t

Retrieve account of authenticated user

Parameters

  • conn - connection credentials