Module: Pixmatch::Client::List
- Included in:
- Pixmatch::Client
- Defined in:
- lib/pixmatch/client/list.rb
Instance Method Summary collapse
-
#list(offset = 0, limit = 0) ⇒ Object
List the contents of the collection.
Instance Method Details
#list(offset = 0, limit = 0) ⇒ Object
List the contents of the collection.
7 8 9 10 11 12 13 |
# File 'lib/pixmatch/client/list.rb', line 7 def list(offset = 0, limit = 0) response = request(:get, 'rest', { method: 'list', offset: offset, limit: limit }) result = response['result'] raise "Missing result in response." if result.nil? raise "Invalid result in response (#{result.class.name})." if ! result.is_a?(Array) result end |