Class: Zillabyte::API::Zillalogs
- Defined in:
- lib/zillabyte/api/zillalogs.rb
Instance Method Summary collapse
-
#find(id, session = nil, options = {}) ⇒ Object
GET /zillalogs/id.
-
#list(options = {}) ⇒ Object
GET /zillalogs.
-
#save(id, name, zillalog, options = {}) ⇒ Object
POST /zillalogs.
Methods inherited from Base
Constructor Details
This class inherits a constructor from Zillabyte::API::Base
Instance Method Details
#find(id, session = nil, options = {}) ⇒ Object
GET /zillalogs/id
24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/zillabyte/api/zillalogs.rb', line 24 def find(id, session = nil, = {}) # Get the resource res = @api.request( :expects => 200, :method => :get, :path => "/zillalogs/#{id}" ) res.body end |
#list(options = {}) ⇒ Object
GET /zillalogs
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/zillabyte/api/zillalogs.rb', line 6 def list( = {}) = { # TODO }.merge() res = @api.request( :expects => 200, :method => :get, :path => "/zillalogs" ) res.body end |
#save(id, name, zillalog, options = {}) ⇒ Object
POST /zillalogs
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/zillabyte/api/zillalogs.rb', line 41 def save(id, name, zillalog, = {}) = { :name => name, :zillalog => zillalog }.merge() [:id] = id if id res = @api.request( :expects => 200, :method => :post, :path => "/zillalogs", :body => .to_json ) res.body end |