quata 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -4
- data/lib/quata/quandl.rb +1 -1
- data/lib/quata/version.rb +1 -1
- data/lib/quata/web_api.rb +7 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 580e41302fffc675f215c6e0be760ee1c12331d1
|
4
|
+
data.tar.gz: 2366adc0b92c05bb7b7fb3535c32cace572274fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 013f37a822659606f555ccc6c3c3f454e3b57b18a24f84234947812509e2455f8102d7ee46768751ec903019cb40038956095b5a4c585558dcee10a0fcce9979
|
7
|
+
data.tar.gz: 1d70b2d056137211277eb9e59070d3c8946a10eb14b4be974b39a22c5b39b863b9717d855383894df6d1bc41c410b04aa0ec014f9748d5000127867fae99b3db
|
data/README.md
CHANGED
@@ -24,7 +24,7 @@ Features
|
|
24
24
|
* Display output in various formats.
|
25
25
|
* Save output to a file, including bulk downloads.
|
26
26
|
|
27
|
-
|
27
|
+
Usage
|
28
28
|
--------------------------------------------------
|
29
29
|
|
30
30
|
First, require and initialize with your API key
|
@@ -68,10 +68,11 @@ you for the following requests is also easy:
|
|
68
68
|
|
69
69
|
```ruby
|
70
70
|
quandl.debug true
|
71
|
-
quandl.param :
|
72
|
-
quandl.param :order, 'asc'
|
71
|
+
quandl.param rows: 10, order: 'asc'
|
73
72
|
puts quandl.get 'WIKI/AAPL'
|
74
|
-
=> https://www.quandl.com/api/v3/WIKI/AAPL.json?auth_token=key&rows=10&order=asc
|
73
|
+
# => https://www.quandl.com/api/v3/WIKI/AAPL.json?auth_token=key&rows=10&order=asc
|
74
|
+
|
75
|
+
quandl.param order: nil # remove param
|
75
76
|
```
|
76
77
|
|
77
78
|
Command Line
|
@@ -124,5 +125,7 @@ $ quata url datasets/WIKI/AAPL rows:5
|
|
124
125
|
# => https://www.quandl.com/api/v3/datasets/WIKI/AAPL.csv?auth_token=YOUR_KEY&rows=5
|
125
126
|
```
|
126
127
|
|
128
|
+
![Quata Demo](https://raw.githubusercontent.com/DannyBen/quata/master/demo.gif "Quata Demo")
|
129
|
+
|
127
130
|
[1]: https://www.quandl.com/blog/getting-started-with-the-quandl-api
|
128
131
|
[2]: https://github.com/DannyBen/quata/blob/master/lib/quata/docopt.txt
|
data/lib/quata/quandl.rb
CHANGED
data/lib/quata/version.rb
CHANGED
data/lib/quata/web_api.rb
CHANGED
@@ -22,10 +22,13 @@ module Quata
|
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
25
|
-
# Add
|
26
|
-
# are always needed, like API keys.
|
27
|
-
def param(
|
28
|
-
|
25
|
+
# Add one or more parameter to the default query string. Good for
|
26
|
+
# adding keys that are always needed, like API keys.
|
27
|
+
def param(params)
|
28
|
+
params.each do |key, value|
|
29
|
+
default_params[key] = value
|
30
|
+
default_params.delete key if value.nil?
|
31
|
+
end
|
29
32
|
end
|
30
33
|
|
31
34
|
# Set the default format that will be appended to the URL. value can be
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: quata
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Danny Ben Shitrit
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-05-
|
11
|
+
date: 2016-05-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: docopt
|