Method: Riaction::ProfileInstanceMethods#riaction_profile_challenges

Defined in:
lib/riaction/riaction.rb

#riaction_profile_challenges(filter_type = nil) ⇒ Object



346
347
348
349
350
351
352
353
354
355
356
# File 'lib/riaction/riaction.rb', line 346

def riaction_profile_challenges(filter_type=nil)
  keys = riaction_profile_keys
  unless keys.empty?
    @iactionable_api ||= IActionable::Api.new
    @iactionable_api.get_profile_challenges(keys[:profile_type], keys[:id_type], keys[:id], filter_type)
  else
    raise NoProfileDefined.new("Class #{self.class} does not adequately define itself as an IActionable profile")
  end
rescue IActionable::Error::BadRequest => e
  nil
end