Module: Mastodon::REST::Suggestions

Includes:
Utils
Included in:
API
Defined in:
lib/mastodon/rest/suggestions.rb

Instance Method Summary collapse

Methods included from Utils

#array_param, #perform_request, #perform_request_with_collection, #perform_request_with_object

Instance Method Details

#remove_suggestion(id) ⇒ Boolean

Remove account from suggestions

Parameters:

  • id (Integer)

Returns:

  • (Boolean)


21
22
23
24
# File 'lib/mastodon/rest/suggestions.rb', line 21

def remove_suggestion(id)
  !perform_request(:delete,
                   "/api/v1/suggestions/#{id}").nil?
end

#suggestionsMastodon::Collection<Mastodon::Account>

Get “who to follow” suggestions for authenticated user



13
14
15
16
# File 'lib/mastodon/rest/suggestions.rb', line 13

def suggestions
  perform_request_with_collection(:get, '/api/v1/accounts/suggestions',
                                  {}, Mastodon::Account)
end