Hunter.Relationship (hunter v0.6.0)

Copy Markdown View Source

Relationship entity

This module defines a Hunter.Relationship struct and the main functions for working with Relationship.

Fields

  • id - target account id
  • following - whether the user is currently following the account
  • followed_by - whether the user is currently being followed by the account
  • blocking - whether the user is currently blocking the account
  • muting - whether the user is currently muting the account
  • requested - whether the user has requested to follow the account
  • domain_blocking - whether the user is currently blocking the user's domain

Summary

Functions

Block a user

Follow a user

Mute a user

Get the relationships of authenticated user towards given other users

Unblock a user

Unfollow a user

Unmute a user

Types

t()

@type t() :: %Hunter.Relationship{
  blocking: boolean(),
  domain_blocking: boolean(),
  followed_by: boolean(),
  following: boolean(),
  id: non_neg_integer(),
  muting: boolean(),
  requested: boolean()
}

Functions

block(conn, id)

@spec block(Hunter.Client.t(), non_neg_integer()) :: t()

Block a user

Parameters

  • conn - Connection credentials
  • id - user id

follow(conn, id)

@spec follow(Hunter.Client.t(), non_neg_integer()) :: t()

Follow a user

Parameters

  • conn - Connection credentials
  • id - user id

mute(conn, id)

@spec mute(Hunter.Client.t(), non_neg_integer()) :: t()

Mute a user

Parameters

  • conn - Connection credentials
  • id - user id

relationships(conn, ids)

@spec relationships(Hunter.Client.t(), [non_neg_integer()]) :: [t()]

Get the relationships of authenticated user towards given other users

Parameters

  • conn - connection credentials
  • id - list of relationship IDs

unblock(conn, id)

@spec unblock(Hunter.Client.t(), non_neg_integer()) :: t()

Unblock a user

  • conn - Connection credentials
  • id - user id

unfollow(conn, id)

@spec unfollow(Hunter.Client.t(), non_neg_integer()) :: t()

Unfollow a user

Parameters

  • conn - Connection credentials
  • id - user id

unmute(conn, id)

@spec unmute(Hunter.Client.t(), non_neg_integer()) :: t()

Unmute a user

Parameters

  • conn - Connection credentials
  • id - user id