quintly 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +5 -3
- data/lib/quintly/qql.rb +1 -2
- data/lib/quintly/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f3bf84bcbc73fa44ff9a6f420b64d7af090964e1
|
|
4
|
+
data.tar.gz: 2da212c0e51d94c0293a9156e41c0c323b82ab80
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ba0f8c5a5ac2b28d2303f502d3584f6deaeff298ecf5247b9777ce1f63007cf050c076747d8164f6a9424ec22839290df1cbb72e2ea05866d248f8175e7b81ad
|
|
7
|
+
data.tar.gz: 15e0d52b207d5222111cc3d4a0d07f2632963a99aca9460a1b2b9ec808fb47174095866f3072322bcf0b1526ff1e0ad4693df1f4517b32ae51bcbbe4fcb88982
|
data/README.md
CHANGED
|
@@ -27,17 +27,19 @@ configuration = Quintly::Configuration.new do |conf|
|
|
|
27
27
|
conf.start_time = '2013-08-01',
|
|
28
28
|
conf.end_time = '2013-08-15',
|
|
29
29
|
conf.interval = 'daily', #(daily, weekly, monthly, yearly, total)
|
|
30
|
-
conf.profile_ids = 1111,
|
|
30
|
+
conf.profile_ids = '1111',
|
|
31
31
|
conf.username = 'your username',
|
|
32
32
|
conf.password = 'your password'
|
|
33
33
|
end
|
|
34
34
|
|
|
35
|
+
client = Quintly::QQL.new(configuration)
|
|
36
|
+
|
|
35
37
|
# get fanCount info with predefined metric
|
|
36
|
-
result =
|
|
38
|
+
result = client.metric('fanCount').first
|
|
37
39
|
#=> {"dim1"=>1111, "dim2"=>"2013-08-01 00:00:00", "fans"=>1340103}
|
|
38
40
|
|
|
39
41
|
# get fanCount info with QQL
|
|
40
|
-
result =
|
|
42
|
+
result = client.query('SELECT profileId, time, fans FROM facebook').first
|
|
41
43
|
#=> {"profileId"=>1111, "time"=>"2013-08-01 00:00:00", "fans"=>1340103}
|
|
42
44
|
|
|
43
45
|
|
data/lib/quintly/qql.rb
CHANGED
|
@@ -34,8 +34,7 @@ module Quintly
|
|
|
34
34
|
"profileIds=#{configuration.profile_ids}")
|
|
35
35
|
)
|
|
36
36
|
response = api_client.get(url)
|
|
37
|
-
|
|
38
|
-
response.success? ? JSON.parse(response.body)['data'] : []
|
|
37
|
+
response.success? ? JSON.parse(response.body)['data'] : reponse.body
|
|
39
38
|
end
|
|
40
39
|
end
|
|
41
40
|
end
|
data/lib/quintly/version.rb
CHANGED