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

#delete_suggestion(account_id) ⇒ Object

Remove a suggestion

Parameters:

  • account_id (Integer)


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

def delete_suggestion()
  perform_request(:delete, "/api/v1/suggestions/#{}")
end

#suggestions(options = {}) ⇒ Mastodon::Collection<Mastodon::Account>

Get “who to follow” suggestions for authenticated user

Parameters:

  • options (Hash) (defaults to: {})

Options Hash (options):

  • :max_id (Integer)
  • :since_id (Integer)
  • :min_id (Boolean)
  • :limit (Integer)

Returns:



16
17
18
# File 'lib/mastodon/rest/suggestions.rb', line 16

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