datasift 3.9.0 → 3.10.0
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/CHANGELOG.md +4 -6
- data/README.md +12 -1
- data/lib/account.rb +2 -4
- data/lib/api/api_resource.rb +1 -1
- data/lib/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8aea8d0fc9dfd9704d01fa94ad2e2ea950dd9c4c
|
4
|
+
data.tar.gz: 99a95937f2d21b83598c920d48803210b6e83621
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dd93f2f93ecb5759643834eac7b3acd7e1c5a4353e08566eb1079dcbaedb7043048059a7b9eccb8e13ce3ee5c03fbf9cba4f4269d9bdd388f9c672b646f78473
|
7
|
+
data.tar.gz: e0cad5eb3ed1f7b4406880cab34be84055765e41c34eef7c4064b682e2bc18eceb22efb851a29e6debabe92b7389d5d9bd4b316f9c68ec0ae1125d9f728e2079
|
data/CHANGELOG.md
CHANGED
@@ -1,11 +1,9 @@
|
|
1
1
|
CHANGELOG
|
2
2
|
================================
|
3
|
-
## v.
|
4
|
-
###
|
5
|
-
*
|
6
|
-
*
|
7
|
-
* Designed to make the most of DataSift's latest API version and features
|
8
|
-
* Designed for Ruby 2.3+. Use features like keyword parameters across the board
|
3
|
+
## v.3.10.0 (2018-01-15)
|
4
|
+
### Changed
|
5
|
+
* Uses API v1.6 by default
|
6
|
+
* Change to `account.usage()` required by API; start/end times must be included
|
9
7
|
|
10
8
|
## v.3.9.0 (2017-08-16)
|
11
9
|
### Added
|
data/README.md
CHANGED
@@ -85,9 +85,11 @@ This version of the client library has been tested, and is known to work against
|
|
85
85
|
### Language Versions
|
86
86
|
* Ruby 1.9.3 (May work, but no longer officially supported)
|
87
87
|
* Ruby 2.0 (May work, but no longer officially supported)
|
88
|
-
* Ruby 2.1
|
88
|
+
* Ruby 2.1 (May work, but no longer officially supported)
|
89
89
|
* Ruby 2.2
|
90
90
|
* Ruby 2.3
|
91
|
+
* Ruby 2.4
|
92
|
+
* Ruby 2.5
|
91
93
|
|
92
94
|
### Operating Systems
|
93
95
|
* Linux
|
@@ -103,6 +105,15 @@ Contributions are always welcome and appreciated
|
|
103
105
|
2. Create a feature branch (we use [Gitflow](https://datasift.github.io/gitflow/IntroducingGitFlow.html) for branching)
|
104
106
|
3. Commit your changes with tests. Please try not to break backwards-compatibility :)
|
105
107
|
|
108
|
+
Testing
|
109
|
+
-------
|
110
|
+
When contributing new code, it should be accompanied with appropriate tests.
|
111
|
+
When adding new tests, or testing a new API version, you should follow these steps:
|
112
|
+
1. Add your credentials and appropriate API version to the `examples/auth.rb` file (these credentials will not be stored anywhere. Please remember to remove them before committing code!)
|
113
|
+
2. Run `bundle install; rake build; rake install` to ensure we are using the latest versions of your changes
|
114
|
+
3. Run `rake test` to run the full test suite, or you can run `ruby test/datasift/<test_file>` to run just a specific test.
|
115
|
+
4. When you have successfully tested your changes, and stored the API response from any new API calls using VCR (see the `test/fixtures/cassettes` directory), run `rake test` again to run the full test suite. If that passes, you should be good to commit and push your changes.
|
116
|
+
|
106
117
|
License
|
107
118
|
-------
|
108
119
|
This code is released under the BSD license. Please see the [LICENSE](LICENSE) file for details.
|
data/lib/account.rb
CHANGED
@@ -10,11 +10,9 @@ module DataSift
|
|
10
10
|
# @param end_time [Integer] (Optional) Unix timestamp of the end of the period
|
11
11
|
# you are querying
|
12
12
|
# @return [Object] API reponse object
|
13
|
-
def usage(
|
14
|
-
params = {}
|
13
|
+
def usage(start_time, end_time, period = '')
|
14
|
+
params = { start: start_time, end: end_time }
|
15
15
|
params.merge!(period: period) unless period.empty?
|
16
|
-
params.merge!(start: start_time) unless start_time.nil?
|
17
|
-
params.merge!(end: end_time) unless end_time.nil?
|
18
16
|
|
19
17
|
DataSift.request(:GET, 'account/usage', @config, params)
|
20
18
|
end
|
data/lib/api/api_resource.rb
CHANGED
@@ -14,7 +14,7 @@ module DataSift
|
|
14
14
|
config[:api_host] = 'api.datasift.com' unless config.has_key?(:api_host)
|
15
15
|
config[:stream_host] = 'websocket.datasift.com' unless config.has_key?(:stream_host)
|
16
16
|
config[:ingestion_host] = 'in.datasift.com' unless config.has_key?(:ingestion_host)
|
17
|
-
config[:api_version] = 'v1.
|
17
|
+
config[:api_version] = 'v1.6' unless config.has_key?(:api_version)
|
18
18
|
config[:enable_ssl] = true unless config.has_key?(:enable_ssl)
|
19
19
|
|
20
20
|
ssl_default = TLSv1_2
|
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: datasift
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- DataSift
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2018-01-17 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rest-client
|
@@ -125,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
125
125
|
version: 1.3.5
|
126
126
|
requirements: []
|
127
127
|
rubyforge_project:
|
128
|
-
rubygems_version: 2.6.
|
128
|
+
rubygems_version: 2.6.13
|
129
129
|
signing_key:
|
130
130
|
specification_version: 4
|
131
131
|
summary: DataSift is a simple wrapper for the DataSift API.
|