Sha256: a85195c81111ca847a8f46da06f056ff53097cf9a1fd5e5a1651e0a936371e62

Contents?: true

Size: 759 Bytes

Versions: 7

Compression:

Stored size: 759 Bytes

Contents

require 'quandl/command/tasks/search'

class Quandl::Command::Tasks::List < Quandl::Command::Tasks::Search
  
  autoload_quandl_client
  
  description "List datasets matching conditions."
  options({
    String => {
      query:        "Only return datasets matching: [query]",
      code:         "Return datasets where code matches [code]",
    },
    Integer => {
      limit:        "Limit the number of datasets returned by the search. Defaults to unlimited.",
      page:         "Return datasets starting from: [page]",
    }
  })
  
  authenticated_users_only!
  
  def execute
    Quandl::Client::Dataset.owner('myself').where( declared_params ).each_in_page do |dataset|
      present(dataset)
    end
  end
  
  def query
    'myself'
  end
  
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
quandl-0.4.4 lib/quandl/command/tasks/list.rb
quandl-0.4.3 lib/quandl/command/tasks/list.rb
quandl-0.4.2 lib/quandl/command/tasks/list.rb
quandl-0.4.1 lib/quandl/command/tasks/list.rb
quandl-0.4.0 lib/quandl/command/tasks/list.rb
quandl-0.3.7 lib/quandl/command/tasks/list.rb
quandl-0.3.6 lib/quandl/command/tasks/list.rb