Sha256: 63896f605e9f715b7a8c35765020dfad158c4f8d41b7e94b36cb99f4ccd72de5
Contents?: true
Size: 819 Bytes
Versions: 4
Compression:
Stored size: 819 Bytes
Contents
require File.join(File.dirname(__FILE__), "..", "lib", "kooaba.rb") # set the data key Kooaba.data_key = <data-key-secret-token> # initialize the item item = Kooaba::Item.new( :title => "A lake", # the title of the item (String) :metadata => nil, # metadata associated with the item. It must be a valid JSON String (String) :image_files => <path-to-image-on-local-filesystem>, # images associated with the item (Array of Strings) :reference_id => "lake" # the reference id of an item (String) ) # select the bucket you want to put the item into bucket_id = <BUCKET_ID> # upload the item response = Kooaba.upload(item, bucket_id) puts "Response code: #{response.code}" puts "Response body: #{response.body}"
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
kooaba-0.0.7 | examples/upload.rb |
kooaba-0.0.6 | examples/upload.rb |
kooaba-0.0.5 | examples/upload.rb |
kooaba-0.0.4 | examples/upload.rb |