Method: ESP::StatSignature.for_stat

Defined in:
lib/esp/resources/stat_signature.rb

.for_stat(stat_id = nil, options = {}) ⇒ Object

Returns a paginated collection of signature stats for the given stat_id Convenience method to use instead of ::find since a stat_id is required to return signature stats.

Parameter

stat_id | Required | The ID of the stat to list signature stats for

options | Optional | A hash of options

Valid Options

include | The list of associated objects to return on the initial request.

valid Includable Associations

See API documentation for valid arguments

Example

stats = ESP::StatSignature.for_stat(1194)


33
34
35
36
37
# File 'lib/esp/resources/stat_signature.rb', line 33

def self.for_stat(stat_id = nil, options = {}) # rubocop:disable Style/OptionHash
  fail ArgumentError, "You must supply a stat id." unless stat_id.present?
  from = "#{prefix}stats/#{stat_id}/signatures.json"
  find(:all, from: from, params: options)
end