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={}) request("devices/find/#{make_filter(filter)}") end def save(id, data) request("devices/#{id}", { :method => :post, :data => data }) end end end end end