fabricio 1.2.0 → 1.3.0

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: 4b563c6a1abc94ee88a579aefa1b1cb3b8c0bada
4
- data.tar.gz: 043e03e7cee36b10518f330ef120f14c9946aed7
3
+ metadata.gz: 34f4feddf025abb20cd25ca41c32c2966be6225d
4
+ data.tar.gz: a3f4143e6eda2c46734f7618221763711884905a
5
5
  SHA512:
6
- metadata.gz: 06da627bd804c6e2c976646e1485fde6c045379892c9378a7c61d6ca6c2cd47191d04e3213675484e5d54551feded46a557f5f2ee7ad2bcc62e6b5d2f2bdf427
7
- data.tar.gz: a23c5b4a6af0dba6b52bb9f5813797ea8ef401af9ff341331902395507370ea8893fd712c848750c58e5b4514f8dd7a28594bf664e6f73dd18b3fc6e9175e16d
6
+ metadata.gz: 7d296a9a48bbe4bb2f2d013961d37cab5589884acb82433fd1502e501c4c2a77c1c7ae9362c2438d13a2af8896759a2405abdc0d299313e58619b93d258463ed
7
+ data.tar.gz: 737872c249145b1acdab8a2c71553755025b80050cdba6ad059bd436e7ac42c161fa147732db027c713c7e39ae86c18df445c06e874239ec236c47ce56d0f628
@@ -96,6 +96,27 @@ module Fabricio
96
96
  model
97
97
  end
98
98
 
99
+ # Returns a request model for obtaining the count of monhtly active users
100
+ #
101
+ # @param session [Fabricio::Authorization::Session]
102
+ # @param app_id [String]
103
+ # @param start_time [String] Timestamp of the start date
104
+ # @param end_time [String] Timestamp of the end date
105
+ # @param build [String] The version of the build. E.g. '4.0.1 (38)'
106
+ # @return [Fabricio::Networking::RequestModel]
107
+ def monthly_active_request_model(session, app_id, start_time, end_time, build)
108
+ path = growth_analytics_endpoint(session, app_id, 'monthly_active')
109
+ params = time_range_params(start_time, end_time)
110
+ params['build'] = build
111
+ model = Fabricio::Networking::RequestModel.new do |config|
112
+ config.type = :GET
113
+ config.base_url = FABRIC_API_URL
114
+ config.api_path = path
115
+ config.params = params
116
+ end
117
+ model
118
+ end
119
+
99
120
  # Returns a request model for obtaining the count of sessions
100
121
  #
101
122
  # @param session [Fabricio::Authorization::Session]
@@ -82,6 +82,21 @@ module Fabricio
82
82
  end
83
83
  end
84
84
 
85
+ # Obtains the count of monhtly active users
86
+ #
87
+ # @param id [String] Application identifier
88
+ # @param start_time [String] Timestamp of the start date
89
+ # @param end_time [String] Timestamp of the end date
90
+ # @param build [String] The version of the build. E.g. '4.0.1 (38)'
91
+ # @return [Array<Fabricio::Model::Point>]
92
+ def monthly_active(id, start_time, end_time, build)
93
+ request_model = @request_model_factory.monthly_active_request_model(@session, id, start_time, end_time, build)
94
+ response = @network_client.perform_request(request_model)
95
+ JSON.parse(response.body)['series'].map do |array|
96
+ Fabricio::Model::Point.new(array)
97
+ end
98
+ end
99
+
85
100
  # Obtains the count of sessions
86
101
  #
87
102
  # @param id [String] Application identifier
@@ -1,3 +1,3 @@
1
1
  module Fabricio
2
- VERSION = "1.2.0"
2
+ VERSION = "1.3.0"
3
3
  end
metadata CHANGED
@@ -1,97 +1,97 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fabricio
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Egor Tolstoy
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-06-19 00:00:00.000000000 Z
11
+ date: 2017-07-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ~>
32
32
  - !ruby/object:Gem::Version
33
33
  version: '10.0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ~>
39
39
  - !ruby/object:Gem::Version
40
40
  version: '10.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ~>
46
46
  - !ruby/object:Gem::Version
47
47
  version: '3.0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ~>
53
53
  - !ruby/object:Gem::Version
54
54
  version: '3.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: webmock
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - '>='
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ">="
66
+ - - '>='
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: simplecov
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ">="
73
+ - - '>='
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ">="
80
+ - - '>='
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: codeclimate-test-reporter
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - "~>"
87
+ - - ~>
88
88
  - !ruby/object:Gem::Version
89
89
  version: 1.0.0
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - "~>"
94
+ - - ~>
95
95
  - !ruby/object:Gem::Version
96
96
  version: 1.0.0
97
97
  description:
@@ -101,12 +101,12 @@ executables: []
101
101
  extensions: []
102
102
  extra_rdoc_files: []
103
103
  files:
104
- - ".codeclimate.yml"
105
- - ".gitignore"
106
- - ".idea/runConfigurations/IRB_console__fabricio.xml"
107
- - ".rspec"
108
- - ".rubocop.yml"
109
- - ".travis.yml"
104
+ - .codeclimate.yml
105
+ - .gitignore
106
+ - .idea/runConfigurations/IRB_console__fabricio.xml
107
+ - .rspec
108
+ - .rubocop.yml
109
+ - .travis.yml
110
110
  - CODE_OF_CONDUCT.md
111
111
  - Gemfile
112
112
  - Gemfile.lock
@@ -150,17 +150,17 @@ require_paths:
150
150
  - lib
151
151
  required_ruby_version: !ruby/object:Gem::Requirement
152
152
  requirements:
153
- - - ">="
153
+ - - '>='
154
154
  - !ruby/object:Gem::Version
155
155
  version: '0'
156
156
  required_rubygems_version: !ruby/object:Gem::Requirement
157
157
  requirements:
158
- - - ">="
158
+ - - '>='
159
159
  - !ruby/object:Gem::Version
160
160
  version: '0'
161
161
  requirements: []
162
162
  rubyforge_project:
163
- rubygems_version: 2.5.1
163
+ rubygems_version: 2.6.11
164
164
  signing_key:
165
165
  specification_version: 4
166
166
  summary: A simple gem that fetches mobile application statistics from Fabric.io API.