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

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_clipsObject



5
6
7
# File 'lib/lapse/client/clips.rb', line 5

def all_clips
  get('clips').body
end

#create_clipObject



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


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