Sha256: 52c383f46215bb054b65ef28279ed1f848ad7f2e44ed9f17417d5aba46f11692

Contents?: true

Size: 779 Bytes

Versions: 16

Compression:

Stored size: 779 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

16 entries across 16 versions & 1 rubygems

Version Path
quandl_client-2.8.0 examples/create.rb
quandl_client-2.7.12 examples/create.rb
quandl_client-2.7.9 examples/create.rb
quandl_client-2.7.8 examples/create.rb
quandl_client-2.7.7 examples/create.rb
quandl_client-2.7.6 examples/create.rb
quandl_client-2.7.3 examples/create.rb
quandl_client-2.7.2 examples/create.rb
quandl_client-2.7.1 examples/create.rb
quandl_client-2.7.0 examples/create.rb
quandl_client-2.6.2 examples/create.rb
quandl_client-2.6.1 examples/create.rb
quandl_client-2.6.0 examples/create.rb
quandl_client-2.5.3 examples/create.rb
quandl_client-2.5.2 examples/create.rb
quandl_client-2.5.1 examples/create.rb