Sha256: c4a7e3378f86495cb21e3fa3e15f4823ad2e9f75fcdb3f316f0d7ad9daaf1a0f

Contents?: true

Size: 829 Bytes

Versions: 12

Compression:

Stored size: 829 Bytes

Contents

# frozen_string_literal: true

module FinApps
  module REST
    class ScreeningMetadatas < FinAppsCore::REST::Resources # :nodoc:
      def show(id, key)
        not_blank(id, :session_id)
        not_blank(key, :key)

        path = "screenings/#{ERB::Util.url_encode(id)}/meta/#{ERB::Util.url_encode(key)}"
        super(nil, path)
      end

      def create(id, key, value)
        not_blank(id, :session_id)
        not_blank(key, :key)
        not_blank(value, :value)

        path = "screenings/#{ERB::Util.url_encode(id)}/meta"
        super({key: key, value: value}, path)
      end

      def destroy(id, key)
        not_blank(id, :session_id)
        not_blank(key, :key)

        path = "screenings/#{ERB::Util.url_encode(id)}/meta/#{ERB::Util.url_encode(key)}"
        super(nil, path)
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
finapps-6.13.1 lib/finapps/rest/screening_metadatas.rb
finapps-6.13.0 lib/finapps/rest/screening_metadatas.rb
finapps-6.12.0 lib/finapps/rest/screening_metadatas.rb
finapps-6.11.0 lib/finapps/rest/screening_metadatas.rb
finapps-6.10.2 lib/finapps/rest/screening_metadatas.rb
finapps-6.10.1 lib/finapps/rest/screening_metadatas.rb
finapps-6.10.0 lib/finapps/rest/screening_metadatas.rb
finapps-6.9.2 lib/finapps/rest/screening_metadatas.rb
finapps-6.9.1 lib/finapps/rest/screening_metadatas.rb
finapps-6.9.0 lib/finapps/rest/screening_metadatas.rb
finapps-6.8.0 lib/finapps/rest/screening_metadatas.rb
finapps-6.7.1 lib/finapps/rest/screening_metadatas.rb