Sha256: 70c911e746387e0375bd8f7099cb343bce23450c947863c08a2cb1e7dc78a5ba

Contents?: true

Size: 463 Bytes

Versions: 10

Compression:

Stored size: 463 Bytes

Contents

# frozen_string_literal: true
require 'dato/api_client'
require 'dato/upload/file'
require 'dato/upload/image'

module Dato
  module Site
    class Client
      include ApiClient

      json_schema 'site-api'

      def upload_file(path_or_url)
        file = Upload::File.new(self, path_or_url)
        file.upload
      end

      def upload_image(path_or_url)
        file = Upload::Image.new(self, path_or_url)
        file.upload
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
dato-0.6.9 lib/dato/site/client.rb
dato-0.6.8 lib/dato/site/client.rb
dato-0.6.7 lib/dato/site/client.rb
dato-0.6.6 lib/dato/site/client.rb
dato-0.6.5 lib/dato/site/client.rb
dato-0.6.3 lib/dato/site/client.rb
dato-0.6.3.beta lib/dato/site/client.rb
dato-0.6.2 lib/dato/site/client.rb
dato-0.6.1 lib/dato/site/client.rb
dato-0.6.0 lib/dato/site/client.rb