Module: Lapse::Client::Clips
- Included in:
- Lapse::Client
- Defined in:
- lib/lapse/client/clips.rb
Overview
Client methods for working with clips
Instance Method Summary collapse
- #accept_frames(clip_id, frame_ids) ⇒ Object
- #all_clips ⇒ Object
- #create_clip ⇒ Object
- #destroy_clip(clip_id) ⇒ Object
- #featured_clips ⇒ Object
- #publish_clip(clip_id, title) ⇒ Object
Instance Method Details
#accept_frames(clip_id, frame_ids) ⇒ Object
17 18 19 20 21 22 |
# File 'lib/lapse/client/clips.rb', line 17 def accept_frames(clip_id, frame_ids) params = { :frame_ids => frame_ids } post("clips/#{clip_id}/accept_frames", params).body end |
#all_clips ⇒ Object
5 6 7 |
# File 'lib/lapse/client/clips.rb', line 5 def all_clips get('clips').body end |
#create_clip ⇒ Object
13 14 15 |
# File 'lib/lapse/client/clips.rb', line 13 def create_clip post('clips').body end |
#destroy_clip(clip_id) ⇒ Object
33 34 35 |
# File 'lib/lapse/client/clips.rb', line 33 def destroy_clip(clip_id) boolean_from_response(:delete, "clips/#{clip_id}") end |
#featured_clips ⇒ Object
9 10 11 |
# File 'lib/lapse/client/clips.rb', line 9 def featured_clips get('clips/featured').body end |
#publish_clip(clip_id, title) ⇒ Object
24 25 26 27 28 29 30 31 |
# File 'lib/lapse/client/clips.rb', line 24 def publish_clip(clip_id, title) params = { :clip => { :title => title } } post("clips/#{clip_id}/publish", params).body end |