Sha256: 4235e87d247f3c67738cf305b6741840dce0069470657ee850b405c8a89c3b7f

Contents?: true

Size: 562 Bytes

Versions: 2

Compression:

Stored size: 562 Bytes

Contents

# frozen_string_literal: true

module Kinescope
  class DRMResource < ResourceKit::Resource
    resources do
      action :show, 'GET /v1/drm/auth' do
        handler(200) { |response| DRMMapping.extract_single(response.body, :read) }
      end

      action :update, 'PUT /v1/drm/auth' do
        body { |object| DRMMapping.representation_for(:update, object) }
        handler(200) { |response| DRMMapping.extract_single(response.body, :read) }
      end

      action :delete, 'DELETE /v1/drm/auth' do
        handler(200) { true }
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
kinescope-rb-0.2.1 lib/kinescope/resources/drm_resource.rb
kinescope-rb-0.2.0 lib/kinescope/resources/drm_resource.rb