Class: CodaDocs::Entities::Rows

Inherits:
Entity
  • Object
show all
Defined in:
lib/coda_docs/entities/rows.rb

Instance Method Summary collapse

Methods inherited from Entity

#connection, #initialize, #parse_response

Constructor Details

This class inherits a constructor from CodaDocs::Entities::Entity

Instance Method Details

#all(doc_id, table_id, options = nil) ⇒ Object



4
5
6
7
# File 'lib/coda_docs/entities/rows.rb', line 4

def all(doc_id, table_id, options = nil)
  response = connection.get("/docs/#{doc_id}/tables/#{table_id}/rows", query: options)
  parse_response(response)
end

#delete(doc_id, table_id, row_id) ⇒ Object



13
14
15
# File 'lib/coda_docs/entities/rows.rb', line 13

def delete(doc_id, table_id, row_id)
  connection.delete("/docs/#{doc_id}/tables/#{table_id}/rows/#{row_id}")
end

#find(doc_id, table_id, row_id) ⇒ Object



9
10
11
# File 'lib/coda_docs/entities/rows.rb', line 9

def find(doc_id, table_id, row_id)
  connection.get("/docs/#{doc_id}/tables/#{table_id}/rows/#{row_id}")
end