Sha256: 04ff200ff42c3315aab53ee2eac3af6ada9e97cd11a2e764d87967bcdd5555fc

Contents?: true

Size: 846 Bytes

Versions: 7

Compression:

Stored size: 846 Bytes

Contents

module Lapse
  class Client
    # Client methods for working with clips
    module Clips
      def all_clips
        get('clips').body
      end

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

      def clip(clip_id)
        get("clips/#{clip_id}").body
      end

      def create_clip
        post('clips').body
      end

      def submit_frames(clip_id, frame_ids)
        params = {
          :frame_ids => frame_ids
        }
        post("clips/#{clip_id}/submit_frames", params).body
      end

      def publish_clip(clip_id, title = nil)
        params = {
          :clip => {
            :title => title
          }
        }
        post("clips/#{clip_id}/publish", params).body
      end

      def destroy_clip(clip_id)
        boolean_from_response(:delete, "clips/#{clip_id}")
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
lapse-0.0.14 lib/lapse/client/clips.rb
lapse-0.0.13 lib/lapse/client/clips.rb
lapse-0.0.12 lib/lapse/client/clips.rb
lapse-0.0.11 lib/lapse/client/clips.rb
lapse-0.0.10 lib/lapse/client/clips.rb
lapse-0.0.9 lib/lapse/client/clips.rb
lapse-0.0.8 lib/lapse/client/clips.rb