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
- #all_clips ⇒ Object
- #clip(clip_id) ⇒ Object
- #create_clip ⇒ Object
- #destroy_clip(clip_id) ⇒ Object
- #featured_clips ⇒ Object
- #publish_clip(clip_id, title) ⇒ Object
- #submit_frames(clip_id, frame_ids) ⇒ Object
Instance Method Details
#all_clips ⇒ Object
5 6 7 |
# File 'lib/lapse/client/clips.rb', line 5 def all_clips get('clips').body end |
#clip(clip_id) ⇒ Object
13 14 15 |
# File 'lib/lapse/client/clips.rb', line 13 def clip(clip_id) get("clips/#{clip_id}").body end |
#create_clip ⇒ Object
17 18 19 |
# File 'lib/lapse/client/clips.rb', line 17 def create_clip post('clips').body end |
#destroy_clip(clip_id) ⇒ Object
37 38 39 |
# File 'lib/lapse/client/clips.rb', line 37 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
28 29 30 31 32 33 34 35 |
# File 'lib/lapse/client/clips.rb', line 28 def publish_clip(clip_id, title) params = { :clip => { :title => title } } post("clips/#{clip_id}/publish", params).body end |
#submit_frames(clip_id, frame_ids) ⇒ Object
21 22 23 24 25 26 |
# File 'lib/lapse/client/clips.rb', line 21 def submit_frames(clip_id, frame_ids) params = { :frame_ids => frame_ids } post("clips/#{clip_id}/submit_frames", params).body end |