hisui 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/lib/hisui/model.rb +2 -2
- data/lib/hisui/version.rb +1 -1
- 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: af55565557423055909d226c7e42fa826269a5e5
|
4
|
+
data.tar.gz: 164cc444aa1143b0b5c60e07a1582a49054bd409
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1fdc7389ce7da297b307d14036fd5b5bc83228151fc428c6d24efe758fbf78f7b208df954ed10623b8993835bda3c86d86c01d13f2722881c5f55596f65e40f5
|
7
|
+
data.tar.gz: 957b5861d9ff9e41016cd4b73ccfd20b989e5ed98ce17f1adcf62f8c5cd04502a8c31562cad78e4d51e1e60da186b0d95efad4d859f9a52f11ef0e14b4d24ed3
|
data/README.md
CHANGED
@@ -37,8 +37,8 @@ profile = user.profiles.first # Select profile that you want to get Google Analy
|
|
37
37
|
class DailySummary
|
38
38
|
extend Hisui::Model
|
39
39
|
|
40
|
-
metrics
|
41
|
-
dimensions
|
40
|
+
metrics :pageviews, :sessions, :users, :new_users, :bounce_rate, :pageviews_per_session, :avg_session_duration
|
41
|
+
dimensions :date
|
42
42
|
end
|
43
43
|
```
|
44
44
|
|
@@ -60,7 +60,7 @@ response.total_values
|
|
60
60
|
|
61
61
|
#=> #<OpenStruct pageviews="646", sessions="308", users="223", newUsers="144", bounceRate="77.77777777777779", pageviewsPerSession="2.3518518518518519", avgSessionDuration="62.148148148148145">
|
62
62
|
|
63
|
-
response.
|
63
|
+
response.data?
|
64
64
|
|
65
65
|
#=> true
|
66
66
|
```
|
data/lib/hisui/model.rb
CHANGED
@@ -4,7 +4,7 @@ module Hisui
|
|
4
4
|
#
|
5
5
|
# @param fields [Symbol] the names of the fields to retrieve
|
6
6
|
# @return [ListParameter] the set of all metrics
|
7
|
-
def metrics(field
|
7
|
+
def metrics(*field)
|
8
8
|
@metrics ||= Set.new([])
|
9
9
|
field.try(:each) { |f| @metrics << { expression: Hisui.to_ga_string(f) } }
|
10
10
|
@metrics
|
@@ -14,7 +14,7 @@ module Hisui
|
|
14
14
|
#
|
15
15
|
# @param fields [Symbol] the names of the fields to retrieve
|
16
16
|
# @return [ListParameter] the set of all dimensions
|
17
|
-
def dimensions(field
|
17
|
+
def dimensions(*field)
|
18
18
|
@dimensions ||= Set.new([])
|
19
19
|
field.try(:each) { |f| @dimensions << { name: Hisui.to_ga_string(f) } }
|
20
20
|
@dimensions
|
data/lib/hisui/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hisui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ikepon
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-12-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|