module Onering module API class Devices < Base class< true, :sort => true, :filter => nil }) qs = { :q => make_filter(options[:filter]) } if options[:filter] rv = request("devices/list/#{field}", { :fields => qs }) rv = rv.uniq if options[:unique] rv = rv.sort if options[:sort] rv end def find(filter, options={}) rv = request("devices/find/#{make_filter(filter)}") rv end def save(id, data) request("devices/#{id}", { :method => :post, :data => data }) end end end end end