Class: Playapi::Picking
- Extended by:
- Utils
- Defined in:
- lib/playapi/picking.rb
Instance Attribute Summary collapse
-
#target_class ⇒ Object
readonly
Returns the value of attribute target_class.
-
#target_features ⇒ Object
readonly
Returns the value of attribute target_features.
Attributes inherited from Feature
#attrs, #campaign_id, #default_points, #id, #live, #name
Instance Method Summary collapse
-
#get_set(set_size = 2, opts = {}) ⇒ Object
gets a set of interactions from a picking feature on playapi.
Methods included from Utils
Methods inherited from Feature
#campaign, create, #destroy, destroy, find_by_facet, get, #interactions, list, #push, update
Methods inherited from Identity
#==, fetch, #id, #initialize, store
Methods inherited from Base
#[], attr_reader, #attrs, fetch, fetch_or_new, from_response, identity_map, #initialize, store, #update
Constructor Details
This class inherits a constructor from Playapi::Identity
Instance Attribute Details
#target_class ⇒ Object (readonly)
Returns the value of attribute target_class.
7 8 9 |
# File 'lib/playapi/picking.rb', line 7 def target_class @target_class end |
#target_features ⇒ Object (readonly)
Returns the value of attribute target_features.
7 8 9 |
# File 'lib/playapi/picking.rb', line 7 def target_features @target_features end |
Instance Method Details
#get_set(set_size = 2, opts = {}) ⇒ Object
gets a set of interactions from a picking feature on playapi
10 11 12 13 14 |
# File 'lib/playapi/picking.rb', line 10 def get_set(set_size=2, opts={}) url = "api/v2/picks/#{id}" # public and private don't matter since you can use send... :/ self.class.send(:get_objects, :get, "results", url, opts.merge!(set_size: set_size)) end |