Module: Mastodon::REST::Reports

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

Instance Method Summary collapse

Methods included from Utils

#array_param, #perform_request, #perform_request_with_collection, #perform_request_with_object

Instance Method Details

#create_report(account_id, params = {}) ⇒ Object

Create a report

Parameters:

  • account_id (Integer)
  • params (Hash) (defaults to: {})

Options Hash (params):

  • :status_ids (Array<Integer>)

    Statuses to be included in the report

  • :comment (String)

    Description of the report

  • :forward (Boolean)

    Whether to forward a copy of the report to the origin of the account



14
15
16
17
# File 'lib/mastodon/rest/reports.rb', line 14

def create_report(, params = {})
  params[:'status_ids[]'] = params.delete(:status_ids) if params.key?(:status_ids)
  perform_request(:post, '/api/v1/reports', { account_id:  }.merge(params))
end