Sha256: e66f9a2ec1d1970fa46288e86eaf544433aa992d7888cd02095deadf1b5d331a

Contents?: true

Size: 641 Bytes

Versions: 7

Compression:

Stored size: 641 Bytes

Contents

# frozen_string_literal: true

module RubyLokaliseApi
  module Resources
    class File < Base
      class << self
        def download(client, path, params)
          post(path, client, params)['content']
        end

        def upload(client, path, params)
          klass = RubyLokaliseApi::Resources::QueuedProcess
          klass.new post(path, client, params),
                    ->(project_id, id) { klass.endpoint(project_id, id) }
        end

        def endpoint(project_id, action = '')
          path_from projects: project_id,
                    files: action
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
ruby-lokalise-api-7.2.0 lib/ruby_lokalise_api/resources/file.rb
ruby-lokalise-api-7.1.1 lib/ruby_lokalise_api/resources/file.rb
ruby-lokalise-api-7.1.0 lib/ruby_lokalise_api/resources/file.rb
ruby-lokalise-api-7.0.0 lib/ruby_lokalise_api/resources/file.rb
ruby-lokalise-api-6.2.0 lib/ruby_lokalise_api/resources/file.rb
ruby-lokalise-api-6.1.0 lib/ruby_lokalise_api/resources/file.rb
ruby-lokalise-api-6.0.0 lib/ruby_lokalise_api/resources/file.rb