Sha256: 9b5476fe83747fce8c67d2bd7d3d56586a465bd32ea359809648296749b55dce

Contents?: true

Size: 722 Bytes

Versions: 4

Compression:

Stored size: 722 Bytes

Contents

# frozen_string_literal: true

module Kentaa
  module Api
    module Resources
      class PerformancePhoto < Resource
        class << self
          def attribute_key
            'photo'
          end
        end

        def object_key
          "ActionPerformancePhoto_#{id}"
        end

        def image_url
          data[:image_url]
        end

        private

        def load_resource
          request.get("#{endpoint_path}/#{id}", options)
        end

        def create_resource(attributes)
          io = attributes.fetch(:io)
          content_type = attributes.fetch(:content_type)

          request.post(endpoint_path, options, io, content_type: content_type)
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
kentaa-api-0.8.0 lib/kentaa/api/resources/performance_photo.rb
kentaa-api-0.7.2 lib/kentaa/api/resources/performance_photo.rb
kentaa-api-0.7.1 lib/kentaa/api/resources/performance_photo.rb
kentaa-api-0.7.0 lib/kentaa/api/resources/performance_photo.rb