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

#all_clipsObject



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_clipObject



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


9
10
11
# File 'lib/lapse/client/clips.rb', line 9

def featured_clips
  get('clips/featured').body
end

#publish_clip(clip_id, title = nil) ⇒ Object



28
29
30
31
32
33
34
35
# File 'lib/lapse/client/clips.rb', line 28

def publish_clip(clip_id, title = nil)
  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