Sha256: f6ab16710665bb2da906f8f6f28c5cd092f5161c2521d603f39efab3b586727a
Contents?: true
Size: 549 Bytes
Versions: 1
Compression:
Stored size: 549 Bytes
Contents
module LocoRb module Api module Import PATH = 'import' def import_locale(options={ext: 'json'}) opts = {} opts[:params] = { locale: options[:locale] } if options.dig( :locale) opts[:params] = opts[:params].merge({ "tag-updated": options[:tag_updated] }) if options.dig( :tag_updated) opts[:body] = IO.read(options[:path]) response = post("#{PATH}/#{options[:ext] || 'json'}", opts) LocoRb::Resource::Import.new(response.data, response.headers, 'import') end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
loco-rb-0.1.1 | lib/loco-rb/api/import.rb |