Sha256: 4f698ce3a14806676e66f5fe0490407cffe016dd34a1359031321bcfc0f9b8cd
Contents?: true
Size: 811 Bytes
Versions: 3
Compression:
Stored size: 811 Bytes
Contents
$:.unshift File.join(File.dirname(__FILE__), *%w[.. lib]) # load quandl api client require "quandl/client" # tools for debugging require "quandl/fabricate" require 'securerandom' require 'pry' # Make Dataset available in global namespace include Quandl::Client # configure quandl client Quandl::Client.use ENV['QUANDL_TEST_URL'] Quandl::Client.token = ENV['QUANDL_TEST_TOKEN'] # set some attributes d = Dataset.new( code: "MY_DATASET_#{Time.now.to_i.to_s(16)}", name: "My dataset has a name.", description: "This is the description.", data: [[ 2014, 1, 2 ]] ) # POST to server d.save if d.saved? puts "View your new dataset at: #{d.full_url}" else puts "Something went wrong:\n#{d.human_status}\n#{d.human_error_messages}" end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
quandl_client-2.7.11 | examples/create.rb |
quandl_client-2.7.5 | examples/create.rb |
quandl_client-2.7.4 | examples/create.rb |