Module: Opera::MobileStoreSDK::APIAccessible::ClassMethods
- Defined in:
- lib/opera/mobile_store_sdk/api_accessible.rb
Instance Method Summary collapse
- #all ⇒ Object
- #includes(*included_fields) ⇒ Object
- #page(given_page) ⇒ Object
- #per(given_item_count) ⇒ Object
- #where(given_options = {}) ⇒ Object
Instance Method Details
#all ⇒ Object
27 28 29 |
# File 'lib/opera/mobile_store_sdk/api_accessible.rb', line 27 def all APIObjectList.new(name) end |
#includes(*included_fields) ⇒ Object
31 32 33 34 35 36 37 38 |
# File 'lib/opera/mobile_store_sdk/api_accessible.rb', line 31 def includes(*included_fields) params = included_fields.map(&:to_s).map(&:downcase) .select { |x| %w(original_images billing eula adult subsites compatibility profit rating).include? x } .map { |x| x == "billing" ? "show_billing" : x } .inject({}) { |hash, param_name| hash[param_name] = "1"; hash } APIObjectList.new name, params end |
#page(given_page) ⇒ Object
23 24 25 |
# File 'lib/opera/mobile_store_sdk/api_accessible.rb', line 23 def page(given_page) APIObjectList.new(name).page given_page end |
#per(given_item_count) ⇒ Object
19 20 21 |
# File 'lib/opera/mobile_store_sdk/api_accessible.rb', line 19 def per(given_item_count) APIObjectList.new(name).per given_item_count end |
#where(given_options = {}) ⇒ Object
15 16 17 |
# File 'lib/opera/mobile_store_sdk/api_accessible.rb', line 15 def where( = {}) APIObjectList.new(name).where end |