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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1020a01dd1a5f3b6aa38c32115d62e640445ce1e
4
- data.tar.gz: 3594dc12b39b223e3fb865edf336800f842ffcf1
3
+ metadata.gz: af55565557423055909d226c7e42fa826269a5e5
4
+ data.tar.gz: 164cc444aa1143b0b5c60e07a1582a49054bd409
5
5
  SHA512:
6
- metadata.gz: 85cb0d5f217b557933c7eb26ff82ab01fbe96e2fbd90822682515473835efec78bc425da35466b0af55f88f17801cf455b83291fef2297dddea323d35589ca43
7
- data.tar.gz: 4103a42346735e9faf18cdb5e07c43bda310e4958bf80e913658eac1046a03077a0b711bc9bfb378bb2af8cc85ec536d6b25bab44634bcc4b1b4f181fa80365f
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 %i[pageviews sessions users new_users bounce_rate pageviews_per_session avg_session_duration]
41
- dimensions %i[date]
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.date?
63
+ response.data?
64
64
 
65
65
  #=> true
66
66
  ```
@@ -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 = nil)
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 = nil)
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
@@ -1,3 +1,3 @@
1
1
  module Hisui
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
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.0
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-29 00:00:00.000000000 Z
11
+ date: 2017-12-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails