module Mastodon::REST::Endorsements

Public Instance Methods

endorse(account_id) click to toggle source

Endorse an account (feature on own profile) @param account_id [Integer] @return [Mastodon::Relationship]

# File lib/mastodon/rest/endorsements.rb, line 24
def endorse(account_id)
  perform_request_with_object(:post, "/api/v1/accounts/#{account_id}/pin", {}, Mastodon::Relationship)
end
endorsements(options = {}) click to toggle source

Get a list of endorsed accounts @param options [Hash] @option options :max_id [Integer] @option options :since_id [Integer] @option options :min_id [Integer] @option options :limit [Integer] @return [Mastodon::Collection<Mastodon::Account>]

# File lib/mastodon/rest/endorsements.rb, line 17
def endorsements(options = {})
  perform_request_with_collection('/api/v1/endorsements', options, Mastodon::Account)
end
unendorse(account_id) click to toggle source

Unendorse an account (no longer feature it on own profile) @param account_id [Integer] @return [Mastodon::Relationship]

# File lib/mastodon/rest/endorsements.rb, line 31
def unendorse(account_id)
  perform_request_with_object(:post, "/api/v1/accounts/#{account_id}/unpin", {}, Mastodon::Relationship)
end