hunter v0.2.0 Hunter.Api.HTTPClient

HTTP Client for Hunter

Summary

Functions

Retrieve account

Block a user

Register a new OAuth client app on the target instance

Destroy status

Favorite a status

Fetch a user’s favourites

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

Functions

account(conn, id)

Retrieve account

Parameters

  • conn - connection credentials
  • id - account identifier

Callback implementation for Hunter.Api.account/2.

block(conn, id)

Block a user

Parameters

  • conn - connection credentials
  • id - user identifier

Callback implementation for Hunter.Api.block/2.

create_app(conn, name, redirect_uri, scopes, website)

Register a new OAuth client app on the target instance

Parameters

  • conn - connection credentials
  • name
  • redirect_uri
  • scopes
  • website

Callback implementation for Hunter.Api.create_app/5.

create_status(conn, text, in_reply_to_id, media_ids)

Create new status

Parameters

  • conn - connection credentials
  • text - [String]
  • in_reply_to_id - [Integer]
  • media_ids - [Array]

Callback implementation for Hunter.Api.create_status/4.

destroy_status(conn, id)

Destroy status

Parameters

  • conn - connection credentials
  • id - status identifier

Callback implementation for Hunter.Api.destroy_status/2.

favourite(conn, id)

Favorite a status

Parameters

  • conn - connection credentials
  • id - status identifier

Callback implementation for Hunter.Api.favourite/2.

favourites(conn)

Fetch a user’s favourites

Parameters

  • conn - connection credentials

Callback implementation for Hunter.Api.favourites/1.

follow(conn, id)

Follow a user

Parameters

  • conn - connection credentials
  • id - user id

Callback implementation for Hunter.Api.follow/2.

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

Callback implementation for Hunter.Api.follow_by_uri/2.

followers(conn, id)

Get a list of followers

Parameters

  • conn - connection credentials
  • id - account identifier

Callback implementation for Hunter.Api.followers/2.

following(conn, id)

Get a list of followed accounts

Parameters

  • conn - connection credentials
  • id - account identifier

Callback implementation for Hunter.Api.following/2.

hashtag_timeline(conn, hashtag, options)

Retrieve statuses from a hashtag

Parameters

  • conn - connection credentials
  • hashtag - list of strings

Options

  • max_id - [Integer]
  • since_id - [Integer]
  • limit - [Integer]

Callback implementation for Hunter.Api.hashtag_timeline/3.

home_timeline(conn, options)

Retrieve statuses from the home timeline

Parameters

  • conn - connection credentials
  • options - option list

Options

  • max_id - [Integer]
  • since_id - [Integer]
  • limit - [Integer]

Callback implementation for Hunter.Api.home_timeline/2.

mute(conn, id)

Mute a user

Parameters

  • conn - connection credentials
  • id - user identifier

Callback implementation for Hunter.Api.mute/2.

public_timeline(conn, options)

Retrieve statuses from the public timeline

Parameters

  • conn - connection credentials
  • options - option list

Options

  • max_id - [Integer]
  • since_id - [Integer]
  • limit - [Integer]

Callback implementation for Hunter.Api.public_timeline/2.

reblog(conn, id)

Reblog a status

Parameters

  • conn - connection credentials
  • id - status identifier

Callback implementation for Hunter.Api.reblog/2.

relationships(ids)

Get the relationships of authenticated user towards given other users

Parameters

  • id - list of relationship IDs

Callback implementation for Hunter.Api.relationships/1.

search(conn, query, options)

Search for content

Parameters

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

Options

  • resolve - whether to resolve non-local accounts

Callback implementation for Hunter.Api.search/3.

status(conn, id)

Retrieve status

Parameters

  • conn - connection credentials
  • id - status identifier

Callback implementation for Hunter.Api.status/2.

statuses(conn, account_id, options)

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]

Callback implementation for Hunter.Api.statuses/3.

unblock(conn, id)

Unblock a user

  • conn - connection credentials
  • id - user identifier

Callback implementation for Hunter.Api.unblock/2.

unfavourite(conn, id)

Undo a favorite of a status

Parameters

  • conn - connection credentials
  • id - status identifier

Callback implementation for Hunter.Api.unfavourite/2.

unfollow(conn, id)

Unfollow a user

Parameters

  • conn - connection credentials
  • id - user identifier

Callback implementation for Hunter.Api.unfollow/2.

unmute(conn, id)

Unmute a user

Parameters

  • conn - connection credentials
  • id - user identifier

Callback implementation for Hunter.Api.unmute/2.

unreblog(conn, id)

Undo a reblog of a status

Parameters

  • conn - connection credentials
  • id - status identifier

Callback implementation for Hunter.Api.unreblog/2.

upload_media(conn, file)

Upload a media file

Parameters

  • conn - connection credentials
  • file - media to be uploaded

Callback implementation for Hunter.Api.upload_media/2.

verify_credentials(conn)

Retrieve account of authenticated user

Parameters

  • conn - connection credentials

Callback implementation for Hunter.Api.verify_credentials/1.