nexosis_api 1.0.5 → 1.0.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0f9a520d658fe88b6f7d4e73e9d04482dec0183a
4
- data.tar.gz: b7e5ccaa92a1970ce6562e497791cab3a3f7b418
3
+ metadata.gz: fe3d1ed072dd12148dfa91d50e9336245ba79888
4
+ data.tar.gz: d796f53c6c3633f1406b8a0a1d31024b1c92179e
5
5
  SHA512:
6
- metadata.gz: 61280b997acca1559619d03797003621f0e5c2a12f5ac5b78d4a86af2a5bd707783f2b9524358457b750a1b6db79df2725e6e2c4627fc4d815bc462fa239b180
7
- data.tar.gz: 5f6b90b6bbac7c35072ca6da4991cd1d69d66edeed02fa627e2e8c435a5f91dc6896ab800c39f80368f5e0c3807f98660a73028080e766b9e49ce4c9da5f75ad
6
+ metadata.gz: 99c82518f94f6ec269104cfb748ca847c13b14e3d84e98532771a8f00bef362290109b127a0ef5b59df3e52103d1180d98206c5c235e2cbd4914edf87c8a1c6d
7
+ data.tar.gz: 42e41e2538b2214c781a83046b426fc67aa10ea9c692d5c5ee55b0133434cbf83a0d86487c5f32338f4f7cdd7fac74e4f21265acd4f39bb488b05b6649ffd1dd
@@ -121,9 +121,10 @@ module NexosisApi
121
121
  # @param start_date [DateTime] The starting date of the forecast period. Can be ISO 8601 string.
122
122
  # @param end_date [DateTime] The ending date of the forecast period. Can be ISO 8601 string.
123
123
  # @param target_column [String] The name of the column for which you want predictions. Nil if defined in dataset.
124
+ # @param result_interval [NexosisApi::TimeInterval] (optional) - The date/time interval (e.g. Day, Hour) at which predictions should be generated. So, if Hour is specified for this parameter you will get a Result record for each hour between startDate and endDate. If unspecified, we’ll generate predictions at a Day interval.
124
125
  # @return [NexosisApi::SessionResponse] providing information about the sesssion, including the cost
125
- def estimate_forecast_session(dataset_name, start_date, end_date, target_column = nil)
126
- create_session dataset_name, start_date, end_date, target_column, true
126
+ def estimate_forecast_session(dataset_name, start_date, end_date, target_column = nil, result_interval = NexosisApi::TimeInterval::DAY)
127
+ create_session dataset_name, start_date, end_date, target_column, true, nil, "forecast", nil, nil, result_interval
127
128
  end
128
129
 
129
130
  # Analyze impact for an event with data already saved to the API.
@@ -161,9 +162,10 @@ module NexosisApi
161
162
  # @param end_date [DateTime] The ending date of the impactful event. Can be ISO 8601 string.
162
163
  # @param event_name [String] The name of the event.
163
164
  # @param target_column [String] The name of the column for which you want predictions. Nil if defined in dataset.
165
+ # @param result_interval [NexosisApi::TimeInterval] (optional) - The date/time interval (e.g. Day, Hour) at which predictions should be generated. So, if Hour is specified for this parameter you will get a Result record for each hour between startDate and endDate. If unspecified, we’ll generate predictions at a Day interval.
164
166
  # @return [NexosisApi::SessionResponse] providing information about the sesssion, including the cost
165
- def estimate_impact_session(dataset_name, start_date, end_date, event_name, target_column = nil)
166
- create_session dataset_name, start_date, end_date, target_column, true, event_name, "impact"
167
+ def estimate_impact_session(dataset_name, start_date, end_date, event_name, target_column = nil, result_interval = NexosisApi::TimeInterval::DAY)
168
+ create_session dataset_name, start_date, end_date, target_column, true, event_name, "impact", nil, "application/json", result_interval
167
169
  end
168
170
 
169
171
  # Get the results of the session.
data/nexosisapi.gemspec CHANGED
@@ -16,6 +16,6 @@ Gem::Specification.new do |spec|
16
16
  spec.require_paths = ['lib']
17
17
  spec.required_ruby_version = '>= 2.0.0'
18
18
  spec.summary = "Ruby client for working with the Nexosis API"
19
- spec.version = '1.0.5'
19
+ spec.version = '1.0.6'
20
20
  spec.metadata["yard.run"] = "yri"
21
21
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nexosis_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nexosis,Inc
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-03 00:00:00.000000000 Z
11
+ date: 2017-07-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler