Class: Bunny::VideoLibrary
- Inherits:
-
Object
- Object
- OpenStruct
- Object
- Bunny::VideoLibrary
show all
- Defined in:
- lib/bunny/models/video_library.rb
Class Method Summary
collapse
Methods inherited from Object
#camel_to_snake, #initialize, #to_ostruct
Constructor Details
This class inherits a constructor from Bunny::Object
Class Method Details
.create(name:) ⇒ Object
9
10
11
12
|
# File 'lib/bunny/models/video_library.rb', line 9
def create(name:)
response = Client.post_request("videolibrary", body: { name: name })
VideoLibrary.new(response.body)
end
|
.delete(id:) ⇒ Object
24
25
26
|
# File 'lib/bunny/models/video_library.rb', line 24
def delete(id:)
Client.delete_request("videolibrary/#{id}")
end
|
.retrieve(id:) ⇒ Object
14
15
16
17
|
# File 'lib/bunny/models/video_library.rb', line 14
def retrieve(id:)
response = Client.get_request("videolibrary/#{id}")
VideoLibrary.new(response.body)
end
|
.update(id:, **attributes) ⇒ Object
19
20
21
22
|
# File 'lib/bunny/models/video_library.rb', line 19
def update(id:, **attributes)
response = Client.post_request("videolibrary/#{id}", body: attributes)
VideoLibrary.new(response.body)
end
|