Class: Zype::Base::Videos
- Inherits:
-
Zype::BaseModel
- Object
- Zype::BaseModel
- Zype::Base::Videos
- Defined in:
- lib/zype/models/base/videos.rb
Overview
Any videos nested routes will inherit from this class
Direct Known Subclasses
Constant Summary
Constants inherited from Zype::BaseModel
Zype::BaseModel::ACCEPTED_KEYS
Instance Attribute Summary
Attributes inherited from Zype::BaseModel
Instance Method Summary collapse
-
#all(video_id:) ⇒ Array<Hash>
Returns all objects for given class.
-
#create(video_id:, params:) ⇒ Hash
Creates a new object via the API.
-
#delete(video_id:, id:) ⇒ Hash
Deletes an existing object via the API.
-
#find(video_id:, id:) ⇒ Hash
Returns object matching ID.
-
#update(video_id:, id:, params:) ⇒ Hash
Updates an existing object via the API.
Methods inherited from Zype::BaseModel
Constructor Details
This class inherits a constructor from Zype::BaseModel
Instance Method Details
#all(video_id:) ⇒ Array<Hash>
Returns all objects for given class
9 10 11 |
# File 'lib/zype/models/base/videos.rb', line 9 def all(video_id:) client.execute(method: :get, path: "/videos/#{video_id}/#{path}") end |
#create(video_id:, params:) ⇒ Hash
Creates a new object via the API.
27 28 29 |
# File 'lib/zype/models/base/videos.rb', line 27 def create(video_id:, params:) client.execute(method: :post, path: "/videos/#{video_id}/#{path}", params: params) end |
#delete(video_id:, id:) ⇒ Hash
Deletes an existing object via the API
45 46 47 |
# File 'lib/zype/models/base/videos.rb', line 45 def delete(video_id:, id:) client.execute(method: :delete, path: "/videos/#{video_id}/#{path}/#{id}") end |
#find(video_id:, id:) ⇒ Hash
Returns object matching ID
18 19 20 |
# File 'lib/zype/models/base/videos.rb', line 18 def find(video_id:, id:) client.execute(method: :get, path: "/videos/#{video_id}/#{path}/#{id}") end |
#update(video_id:, id:, params:) ⇒ Hash
Updates an existing object via the API
36 37 38 |
# File 'lib/zype/models/base/videos.rb', line 36 def update(video_id:, id:, params:) client.execute(method: :put, path: "/videos/#{video_id}/#{path}/#{id}", params: params) end |