From afe6327e5106133082cb974ba4f58a57bc4c0ec2 Mon Sep 17 00:00:00 2001 From: Jason Dugdale Date: Thu, 24 Sep 2015 11:18:52 +0100 Subject: [PATCH 01/14] Test against ruby-head, but allow failures --- .travis.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.travis.yml b/.travis.yml index 6e9d207..e33425a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,16 @@ language: ruby sudo: false +cache: bundler +bundler_args: --without development --retry=3 --jobs=3 + rvm: - 1.9.3 - 2.0.0 - 2.1 - 2.2 + - ruby-head + +matrix: + allow_failures: + - ruby-head + fast_finish: true \ No newline at end of file From ea48d282e803a15c494aa716710a12478cb15f08 Mon Sep 17 00:00:00 2001 From: Jason Dugdale Date: Wed, 7 Oct 2015 16:31:02 +0100 Subject: [PATCH 02/14] Adds support for new /account/usage API endpoint --- CHANGELOG.md | 10 ++++-- examples/account_eg.rb | 33 +++++++++++++++++ lib/account.rb | 18 +++++++++- test/datasift/account_api_test.rb | 35 +++++++++++++++++++ .../identity/after_create_success.json | 1 + .../identity/after_successful_update.json | 1 + .../account/identity/before_get_success.json | 1 + .../identity/before_successful_delete.json | 1 + .../identity/before_successful_update.json | 1 + .../account/identity/create_success.json | 1 + .../identity/limit/after_create_success.json | 1 + .../account/identity/limit/after_delete.json | 1 + .../identity/limit/after_get_success.json | 1 + .../limit/after_successful_update.json | 1 + .../identity/limit/before_create_success.json | 1 + .../account/identity/limit/before_delete.json | 1 + .../identity/limit/before_get_success.json | 1 + .../limit/before_successful_update.json | 1 + .../limit/get_failure_invalid_identity.json | 1 + .../identity/token/after_create_success.json | 1 + .../account/identity/token/after_delete.json | 1 + .../identity/token/after_get_success.json | 1 + .../token/after_successful_update.json | 1 + .../identity/token/before_create_success.json | 1 + .../account/identity/token/before_delete.json | 1 + .../identity/token/before_get_success.json | 1 + .../token/before_successful_update.json | 1 + .../token/get_failure_invalid_identity.json | 1 + .../account/identity/update_id_404.json | 1 + .../cassettes/account/usage/default.json | 1 + .../cassettes/account/usage/invalid.json | 1 + .../cassettes/account/usage/valid_params.json | 1 + 32 files changed, 120 insertions(+), 4 deletions(-) create mode 100644 examples/account_eg.rb create mode 100644 test/datasift/account_api_test.rb create mode 100644 test/fixtures/cassettes/account/identity/after_create_success.json create mode 100644 test/fixtures/cassettes/account/identity/after_successful_update.json create mode 100644 test/fixtures/cassettes/account/identity/before_get_success.json create mode 100644 test/fixtures/cassettes/account/identity/before_successful_delete.json create mode 100644 test/fixtures/cassettes/account/identity/before_successful_update.json create mode 100644 test/fixtures/cassettes/account/identity/create_success.json create mode 100644 test/fixtures/cassettes/account/identity/limit/after_create_success.json create mode 100644 test/fixtures/cassettes/account/identity/limit/after_delete.json create mode 100644 test/fixtures/cassettes/account/identity/limit/after_get_success.json create mode 100644 test/fixtures/cassettes/account/identity/limit/after_successful_update.json create mode 100644 test/fixtures/cassettes/account/identity/limit/before_create_success.json create mode 100644 test/fixtures/cassettes/account/identity/limit/before_delete.json create mode 100644 test/fixtures/cassettes/account/identity/limit/before_get_success.json create mode 100644 test/fixtures/cassettes/account/identity/limit/before_successful_update.json create mode 100644 test/fixtures/cassettes/account/identity/limit/get_failure_invalid_identity.json create mode 100644 test/fixtures/cassettes/account/identity/token/after_create_success.json create mode 100644 test/fixtures/cassettes/account/identity/token/after_delete.json create mode 100644 test/fixtures/cassettes/account/identity/token/after_get_success.json create mode 100644 test/fixtures/cassettes/account/identity/token/after_successful_update.json create mode 100644 test/fixtures/cassettes/account/identity/token/before_create_success.json create mode 100644 test/fixtures/cassettes/account/identity/token/before_delete.json create mode 100644 test/fixtures/cassettes/account/identity/token/before_get_success.json create mode 100644 test/fixtures/cassettes/account/identity/token/before_successful_update.json create mode 100644 test/fixtures/cassettes/account/identity/token/get_failure_invalid_identity.json create mode 100644 test/fixtures/cassettes/account/identity/update_id_404.json create mode 100644 test/fixtures/cassettes/account/usage/default.json create mode 100644 test/fixtures/cassettes/account/usage/invalid.json create mode 100644 test/fixtures/cassettes/account/usage/valid_params.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 63b1abf..bca42ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,14 @@ CHANGELOG ================================ +## v.3.5.0 (2015-09-29) +### Added +* Support for the [/account/usage](http://dev.datasift.com/pylon/docs/api/acct-api-endpoints/get-accountusage) API endpoint + ## v.3.4.0 (2015-08-20) ### Added -* Support for [Open Data Processing](https://datasift.com/products/open-data-processing-for-twitter/) batch uploads (Thanks @giovannelli) -* Explicit supprot for 413 and 422 errors from API -* Ability to get at API response headers using the ```object.response``` accessor. (Thanks again @giovannelli) +* Support for [Open Data Processing](https://datasift.com/products/open-data-processing-for-twitter/) batch uploads (Thanks [@giovannelli](https://github.com/giovannelli)) +* Explicit support for 413 and 422 errors from API +* Ability to get at API response headers using the ```object.response``` accessor. (Thanks again [@giovannelli](https://github.com/giovannelli)) ### Changed * Bumped [rest-client](https://github.com/rest-client/rest-client) dependency to ~> 1.8 diff --git a/examples/account_eg.rb b/examples/account_eg.rb new file mode 100644 index 0000000..33558c6 --- /dev/null +++ b/examples/account_eg.rb @@ -0,0 +1,33 @@ +require './auth' +class AccountEg < DataSiftExample + def initialize + super + @datasift = DataSift::Client.new(@config) + run + end + + def run + begin + puts "Get account usage for the default period" + puts @datasift.account.usage[:data].to_json + + puts "\nGet account usage for the past month" + puts @datasift.account.usage('monthly')[:data].to_json + + rescue DataSiftError => dse + puts dse.message + # Then match specific error to take action; + # All errors thrown by the client extend DataSiftError + case dse + when ConnectionError + # some connection error + when AuthError + when BadRequestError + else + # do something else... + end + end + end +end + +AccountEg.new diff --git a/lib/account.rb b/lib/account.rb index f07fd35..2dd8567 100644 --- a/lib/account.rb +++ b/lib/account.rb @@ -1,6 +1,22 @@ module DataSift # - # Class for accessing DataSift's Account API Identities + # Class for accessing DataSift's Account API class Account < DataSift::ApiResource + # Check your account usage for a given period and timeframe + # + # @param period [String] (Optional) Period is one of either daily, weekly or monthly + # @param start_time [Integer] (Optional) Unix timestamp of the start of the period + # you are querying + # @param end_time [Integer] (Optional) Unix timestamp of the end of the period + # you are querying + # @return [Object] API reponse object + def usage(period = '', start_time = nil, end_time = nil) + params = {} + params.merge!(period: period) unless period.empty? + params.merge!(start: start_time) unless start_time.nil? + params.merge!(end: end_time) unless end_time.nil? + + DataSift.request(:GET, 'account/usage', @config, params) + end end end diff --git a/test/datasift/account_api_test.rb b/test/datasift/account_api_test.rb new file mode 100644 index 0000000..ccc0115 --- /dev/null +++ b/test/datasift/account_api_test.rb @@ -0,0 +1,35 @@ +require File.expand_path('../../test_helper', __FILE__) + +describe 'DataSift::Account' do + before do + auth = DataSiftExample.new + @datasift = auth.datasift + end + + ## + # Account Usage + # + describe '#usage' do + it 'can get account usage using default params' do + VCR.use_cassette('account/usage/default') do + response = @datasift.account.usage + assert_equal STATUS.valid, response[:http][:status] + end + end + + it 'can get account usage using valid params' do + VCR.use_cassette('account/usage/valid_params') do + response = @datasift.account.usage('monthly') + assert_equal STATUS.valid, response[:http][:status] + end + end + + it 'handles 400 when using invalid params' do + VCR.use_cassette('account/usage/invalid') do + assert_raises BadRequestError do + @datasift.account.usage('invalid_period') + end + end + end + end +end diff --git a/test/fixtures/cassettes/account/identity/after_create_success.json b/test/fixtures/cassettes/account/identity/after_create_success.json new file mode 100644 index 0000000..94d1bf4 --- /dev/null +++ b/test/fixtures/cassettes/account/identity/after_create_success.json @@ -0,0 +1 @@ +{"http_interactions":[{"request":{"method":"delete","uri":"https://api.datasift.com/v1/account/identity/b9646788547eaafe9963911c2ecd0143","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1 Ruby/v3.2.0.rc3"],"Authorization":[""],"Content-Type":["application/x-www-form-urlencoded"]}},"response":{"status":{"code":404,"message":"Not Found"},"headers":{"Server":["nginx"],"Date":["Wed, 13 May 2015 15:42:09 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9995"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1431535329"],"X-Ratelimit-Reset-Ttl":["3600"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"IkRlbGV0aW9uIG9mIElkZW50aXRpZXMgaXMgY3VycmVudGx5IHVuYXZhaWxh\nYmxlIg==\n"},"http_version":null},"recorded_at":"Wed, 13 May 2015 15:42:10 GMT"},{"request":{"method":"delete","uri":"https://api.datasift.com/v1/account/identity/","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1 Ruby/v3.2.0.rc3"],"Authorization":[""],"Content-Type":["application/x-www-form-urlencoded"]}},"response":{"status":{"code":405,"message":"Method Not Allowed"},"headers":{"Server":["nginx"],"Date":["Wed, 13 May 2015 15:42:10 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1"],"P3p":["CP=\"CAO PSA\""],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6Ik1ldGhvZCBERUxFVEUgbm90IGFsbG93ZWQgZm9yIHRoaXMg\nZW5kcG9pbnQifQ==\n"},"http_version":null},"recorded_at":"Wed, 13 May 2015 15:42:10 GMT"},{"request":{"method":"delete","uri":"https://api.datasift.com/v1.1/account/identity/","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/x-www-form-urlencoded"]}},"response":{"status":{"code":405,"message":"Method Not Allowed"},"headers":{"Server":["nginx"],"Date":["Fri, 15 May 2015 09:08:08 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6Ik1ldGhvZCBERUxFVEUgbm90IGFsbG93ZWQgZm9yIHRoaXMg\nZW5kcG9pbnQifQ==\n"},"http_version":null},"recorded_at":"Fri, 15 May 2015 09:08:09 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/account/identity/after_successful_update.json b/test/fixtures/cassettes/account/identity/after_successful_update.json new file mode 100644 index 0000000..ccb2a92 --- /dev/null +++ b/test/fixtures/cassettes/account/identity/after_successful_update.json @@ -0,0 +1 @@ +{"http_interactions":[{"request":{"method":"delete","uri":"https://api.datasift.com/v1/account/identity/","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1 Ruby/v3.2.0.rc3"],"Authorization":[""],"Content-Type":["application/x-www-form-urlencoded"]}},"response":{"status":{"code":405,"message":"Method Not Allowed"},"headers":{"Server":["nginx"],"Date":["Wed, 13 May 2015 15:42:10 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1"],"P3p":["CP=\"CAO PSA\""],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6Ik1ldGhvZCBERUxFVEUgbm90IGFsbG93ZWQgZm9yIHRoaXMg\nZW5kcG9pbnQifQ==\n"},"http_version":null},"recorded_at":"Wed, 13 May 2015 15:42:10 GMT"},{"request":{"method":"delete","uri":"https://api.datasift.com/v1.1/account/identity/","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/x-www-form-urlencoded"]}},"response":{"status":{"code":405,"message":"Method Not Allowed"},"headers":{"Server":["nginx"],"Date":["Fri, 15 May 2015 09:08:17 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6Ik1ldGhvZCBERUxFVEUgbm90IGFsbG93ZWQgZm9yIHRoaXMg\nZW5kcG9pbnQifQ==\n"},"http_version":null},"recorded_at":"Fri, 15 May 2015 09:08:17 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/account/identity/before_get_success.json b/test/fixtures/cassettes/account/identity/before_get_success.json new file mode 100644 index 0000000..222bb2c --- /dev/null +++ b/test/fixtures/cassettes/account/identity/before_get_success.json @@ -0,0 +1 @@ +{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1/account/identity","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1 Ruby/v3.2.0.rc3"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["53"]}},"response":{"status":{"code":409,"message":"Conflict"},"headers":{"Server":["nginx"],"Date":["Wed, 13 May 2015 15:42:09 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9985"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1431535329"],"X-Ratelimit-Reset-Ttl":["3600"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6IkFuIElkZW50aXR5IHdpdGggdGhhdCBsYWJlbCBhbHJlYWR5\nIGV4aXN0cyIsIm9yaWdpbmFsX2Vycm9yIjoiQ29uZmxpY3QgKDQwOSk6IHtc\nImVycm9yXCI6XCJBbiBJZGVudGl0eSB3aXRoIHRoYXQgbGFiZWwgYWxyZWFk\neSBleGlzdHNcIn0ifQ==\n"},"http_version":null},"recorded_at":"Wed, 13 May 2015 15:42:10 GMT"},{"request":{"method":"post","uri":"https://api.datasift.com/v1.1/account/identity","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["38"]}},"response":{"status":{"code":409,"message":"Conflict"},"headers":{"Server":["nginx"],"Date":["Fri, 15 May 2015 09:08:15 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9735"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1431684488"],"X-Ratelimit-Reset-Ttl":["3593"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6IkFuIElkZW50aXR5IHdpdGggdGhhdCBsYWJlbCBhbHJlYWR5\nIGV4aXN0cyIsIm9yaWdpbmFsX2Vycm9yIjoiQ29uZmxpY3QgKDQwOSk6IHtc\nImVycm9yXCI6XCJBbiBJZGVudGl0eSB3aXRoIHRoYXQgbGFiZWwgYWxyZWFk\neSBleGlzdHNcIn0ifQ==\n"},"http_version":null},"recorded_at":"Fri, 15 May 2015 09:08:16 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/account/identity/before_successful_delete.json b/test/fixtures/cassettes/account/identity/before_successful_delete.json new file mode 100644 index 0000000..021ea84 --- /dev/null +++ b/test/fixtures/cassettes/account/identity/before_successful_delete.json @@ -0,0 +1 @@ +{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1/account/identity","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1 Ruby/v3.2.0.rc3"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["53"]}},"response":{"status":{"code":409,"message":"Conflict"},"headers":{"Server":["nginx"],"Date":["Wed, 13 May 2015 15:42:09 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9990"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1431535329"],"X-Ratelimit-Reset-Ttl":["3600"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6IkFuIElkZW50aXR5IHdpdGggdGhhdCBsYWJlbCBhbHJlYWR5\nIGV4aXN0cyIsIm9yaWdpbmFsX2Vycm9yIjoiQ29uZmxpY3QgKDQwOSk6IHtc\nImVycm9yXCI6XCJBbiBJZGVudGl0eSB3aXRoIHRoYXQgbGFiZWwgYWxyZWFk\neSBleGlzdHNcIn0ifQ==\n"},"http_version":null},"recorded_at":"Wed, 13 May 2015 15:42:10 GMT"},{"request":{"method":"post","uri":"https://api.datasift.com/v1.1/account/identity","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["38"]}},"response":{"status":{"code":409,"message":"Conflict"},"headers":{"Server":["nginx"],"Date":["Fri, 15 May 2015 09:08:14 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9770"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1431684488"],"X-Ratelimit-Reset-Ttl":["3594"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6IkFuIElkZW50aXR5IHdpdGggdGhhdCBsYWJlbCBhbHJlYWR5\nIGV4aXN0cyIsIm9yaWdpbmFsX2Vycm9yIjoiQ29uZmxpY3QgKDQwOSk6IHtc\nImVycm9yXCI6XCJBbiBJZGVudGl0eSB3aXRoIHRoYXQgbGFiZWwgYWxyZWFk\neSBleGlzdHNcIn0ifQ==\n"},"http_version":null},"recorded_at":"Fri, 15 May 2015 09:08:14 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/account/identity/before_successful_update.json b/test/fixtures/cassettes/account/identity/before_successful_update.json new file mode 100644 index 0000000..9d84184 --- /dev/null +++ b/test/fixtures/cassettes/account/identity/before_successful_update.json @@ -0,0 +1 @@ +{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1/account/identity","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1 Ruby/v3.2.0.rc3"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["53"]}},"response":{"status":{"code":409,"message":"Conflict"},"headers":{"Server":["nginx"],"Date":["Wed, 13 May 2015 15:42:10 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9980"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1431535329"],"X-Ratelimit-Reset-Ttl":["3599"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6IkFuIElkZW50aXR5IHdpdGggdGhhdCBsYWJlbCBhbHJlYWR5\nIGV4aXN0cyIsIm9yaWdpbmFsX2Vycm9yIjoiQ29uZmxpY3QgKDQwOSk6IHtc\nImVycm9yXCI6XCJBbiBJZGVudGl0eSB3aXRoIHRoYXQgbGFiZWwgYWxyZWFk\neSBleGlzdHNcIn0ifQ==\n"},"http_version":null},"recorded_at":"Wed, 13 May 2015 15:42:10 GMT"},{"request":{"method":"post","uri":"https://api.datasift.com/v1.1/account/identity","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["38"]}},"response":{"status":{"code":409,"message":"Conflict"},"headers":{"Server":["nginx"],"Date":["Fri, 15 May 2015 09:08:17 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9705"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1431684488"],"X-Ratelimit-Reset-Ttl":["3591"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6IkFuIElkZW50aXR5IHdpdGggdGhhdCBsYWJlbCBhbHJlYWR5\nIGV4aXN0cyIsIm9yaWdpbmFsX2Vycm9yIjoiQ29uZmxpY3QgKDQwOSk6IHtc\nImVycm9yXCI6XCJBbiBJZGVudGl0eSB3aXRoIHRoYXQgbGFiZWwgYWxyZWFk\neSBleGlzdHNcIn0ifQ==\n"},"http_version":null},"recorded_at":"Fri, 15 May 2015 09:08:17 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/account/identity/create_success.json b/test/fixtures/cassettes/account/identity/create_success.json new file mode 100644 index 0000000..b1a2cad --- /dev/null +++ b/test/fixtures/cassettes/account/identity/create_success.json @@ -0,0 +1 @@ +{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1/account/identity","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1 Ruby/v3.2.0.rc3"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["53"]}},"response":{"status":{"code":201,"message":"Created"},"headers":{"Server":["nginx"],"Date":["Wed, 13 May 2015 15:42:09 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["10000"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1431535329"],"X-Ratelimit-Reset-Ttl":["3600"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2587"]},"body":{"encoding":"UTF-8","base64_string":"eyJpZCI6ImI5NjQ2Nzg4NTQ3ZWFhZmU5OTYzOTExYzJlY2QwMTQzIiwibGFi\nZWwiOiJtaW5pdGVzdCIsImFwaV9rZXkiOiJjYmM3ZGM2ZjY5OWYwZWY3MWRm\nZDJjMTQ0OTMxOTc4YSIsInN0YXR1cyI6ImFjdGl2ZSIsIm1hc3RlciI6ZmFs\nc2UsImNyZWF0ZWRfYXQiOjE0MzE1MzE3MjksInVwZGF0ZWRfYXQiOjE0MzE1\nMzE3MjksImV4cGlyZXNfYXQiOm51bGx9\n"},"http_version":null},"recorded_at":"Wed, 13 May 2015 15:42:09 GMT"},{"request":{"method":"post","uri":"https://api.datasift.com/v1.1/account/identity","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["53"]}},"response":{"status":{"code":409,"message":"Conflict"},"headers":{"Server":["nginx"],"Date":["Fri, 15 May 2015 09:08:08 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["10000"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1431684488"],"X-Ratelimit-Reset-Ttl":["3600"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6IkFuIElkZW50aXR5IHdpdGggdGhhdCBsYWJlbCBhbHJlYWR5\nIGV4aXN0cyIsIm9yaWdpbmFsX2Vycm9yIjoiQ29uZmxpY3QgKDQwOSk6IHtc\nImVycm9yXCI6XCJBbiBJZGVudGl0eSB3aXRoIHRoYXQgbGFiZWwgYWxyZWFk\neSBleGlzdHNcIn0ifQ==\n"},"http_version":null},"recorded_at":"Fri, 15 May 2015 09:08:09 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/account/identity/limit/after_create_success.json b/test/fixtures/cassettes/account/identity/limit/after_create_success.json new file mode 100644 index 0000000..c2e92a6 --- /dev/null +++ b/test/fixtures/cassettes/account/identity/limit/after_create_success.json @@ -0,0 +1 @@ +{"http_interactions":[{"request":{"method":"delete","uri":"https://api.datasift.com/v1.1/account/identity/","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/x-www-form-urlencoded"]}},"response":{"status":{"code":405,"message":"Method Not Allowed"},"headers":{"Server":["nginx"],"Date":["Fri, 15 May 2015 09:08:17 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6Ik1ldGhvZCBERUxFVEUgbm90IGFsbG93ZWQgZm9yIHRoaXMg\nZW5kcG9pbnQifQ==\n"},"http_version":null},"recorded_at":"Fri, 15 May 2015 09:08:17 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/account/identity/limit/after_delete.json b/test/fixtures/cassettes/account/identity/limit/after_delete.json new file mode 100644 index 0000000..d29bf2c --- /dev/null +++ b/test/fixtures/cassettes/account/identity/limit/after_delete.json @@ -0,0 +1 @@ +{"http_interactions":[{"request":{"method":"delete","uri":"https://api.datasift.com/v1.1/account/identity/","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/x-www-form-urlencoded"]}},"response":{"status":{"code":405,"message":"Method Not Allowed"},"headers":{"Server":["nginx"],"Date":["Fri, 15 May 2015 09:08:08 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6Ik1ldGhvZCBERUxFVEUgbm90IGFsbG93ZWQgZm9yIHRoaXMg\nZW5kcG9pbnQifQ==\n"},"http_version":null},"recorded_at":"Fri, 15 May 2015 09:08:09 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/account/identity/limit/after_get_success.json b/test/fixtures/cassettes/account/identity/limit/after_get_success.json new file mode 100644 index 0000000..a0dafa0 --- /dev/null +++ b/test/fixtures/cassettes/account/identity/limit/after_get_success.json @@ -0,0 +1 @@ +{"http_interactions":[{"request":{"method":"delete","uri":"https://api.datasift.com/v1.1/account/identity/","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/x-www-form-urlencoded"]}},"response":{"status":{"code":405,"message":"Method Not Allowed"},"headers":{"Server":["nginx"],"Date":["Fri, 15 May 2015 09:08:14 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6Ik1ldGhvZCBERUxFVEUgbm90IGFsbG93ZWQgZm9yIHRoaXMg\nZW5kcG9pbnQifQ==\n"},"http_version":null},"recorded_at":"Fri, 15 May 2015 09:08:15 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/account/identity/limit/after_successful_update.json b/test/fixtures/cassettes/account/identity/limit/after_successful_update.json new file mode 100644 index 0000000..e15f2fe --- /dev/null +++ b/test/fixtures/cassettes/account/identity/limit/after_successful_update.json @@ -0,0 +1 @@ +{"http_interactions":[{"request":{"method":"delete","uri":"https://api.datasift.com/v1.1/account/identity/","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/x-www-form-urlencoded"]}},"response":{"status":{"code":405,"message":"Method Not Allowed"},"headers":{"Server":["nginx"],"Date":["Fri, 15 May 2015 09:08:12 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6Ik1ldGhvZCBERUxFVEUgbm90IGFsbG93ZWQgZm9yIHRoaXMg\nZW5kcG9pbnQifQ==\n"},"http_version":null},"recorded_at":"Fri, 15 May 2015 09:08:13 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/account/identity/limit/before_create_success.json b/test/fixtures/cassettes/account/identity/limit/before_create_success.json new file mode 100644 index 0000000..87d888e --- /dev/null +++ b/test/fixtures/cassettes/account/identity/limit/before_create_success.json @@ -0,0 +1 @@ +{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.1/account/identity","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["38"]}},"response":{"status":{"code":409,"message":"Conflict"},"headers":{"Server":["nginx"],"Date":["Fri, 15 May 2015 09:08:16 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9710"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1431684488"],"X-Ratelimit-Reset-Ttl":["3592"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6IkFuIElkZW50aXR5IHdpdGggdGhhdCBsYWJlbCBhbHJlYWR5\nIGV4aXN0cyIsIm9yaWdpbmFsX2Vycm9yIjoiQ29uZmxpY3QgKDQwOSk6IHtc\nImVycm9yXCI6XCJBbiBJZGVudGl0eSB3aXRoIHRoYXQgbGFiZWwgYWxyZWFk\neSBleGlzdHNcIn0ifQ==\n"},"http_version":null},"recorded_at":"Fri, 15 May 2015 09:08:17 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/account/identity/limit/before_delete.json b/test/fixtures/cassettes/account/identity/limit/before_delete.json new file mode 100644 index 0000000..47aa818 --- /dev/null +++ b/test/fixtures/cassettes/account/identity/limit/before_delete.json @@ -0,0 +1 @@ +{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.1/account/identity","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["38"]}},"response":{"status":{"code":409,"message":"Conflict"},"headers":{"Server":["nginx"],"Date":["Fri, 15 May 2015 09:08:08 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9965"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1431684488"],"X-Ratelimit-Reset-Ttl":["3600"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6IkFuIElkZW50aXR5IHdpdGggdGhhdCBsYWJlbCBhbHJlYWR5\nIGV4aXN0cyIsIm9yaWdpbmFsX2Vycm9yIjoiQ29uZmxpY3QgKDQwOSk6IHtc\nImVycm9yXCI6XCJBbiBJZGVudGl0eSB3aXRoIHRoYXQgbGFiZWwgYWxyZWFk\neSBleGlzdHNcIn0ifQ==\n"},"http_version":null},"recorded_at":"Fri, 15 May 2015 09:08:09 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/account/identity/limit/before_get_success.json b/test/fixtures/cassettes/account/identity/limit/before_get_success.json new file mode 100644 index 0000000..fef644d --- /dev/null +++ b/test/fixtures/cassettes/account/identity/limit/before_get_success.json @@ -0,0 +1 @@ +{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.1/account/identity","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["38"]}},"response":{"status":{"code":409,"message":"Conflict"},"headers":{"Server":["nginx"],"Date":["Fri, 15 May 2015 09:08:14 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9750"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1431684488"],"X-Ratelimit-Reset-Ttl":["3594"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6IkFuIElkZW50aXR5IHdpdGggdGhhdCBsYWJlbCBhbHJlYWR5\nIGV4aXN0cyIsIm9yaWdpbmFsX2Vycm9yIjoiQ29uZmxpY3QgKDQwOSk6IHtc\nImVycm9yXCI6XCJBbiBJZGVudGl0eSB3aXRoIHRoYXQgbGFiZWwgYWxyZWFk\neSBleGlzdHNcIn0ifQ==\n"},"http_version":null},"recorded_at":"Fri, 15 May 2015 09:08:15 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/account/identity/limit/before_successful_update.json b/test/fixtures/cassettes/account/identity/limit/before_successful_update.json new file mode 100644 index 0000000..8fd0c62 --- /dev/null +++ b/test/fixtures/cassettes/account/identity/limit/before_successful_update.json @@ -0,0 +1 @@ +{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.1/account/identity","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["38"]}},"response":{"status":{"code":409,"message":"Conflict"},"headers":{"Server":["nginx"],"Date":["Fri, 15 May 2015 09:08:12 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9855"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1431684488"],"X-Ratelimit-Reset-Ttl":["3596"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6IkFuIElkZW50aXR5IHdpdGggdGhhdCBsYWJlbCBhbHJlYWR5\nIGV4aXN0cyIsIm9yaWdpbmFsX2Vycm9yIjoiQ29uZmxpY3QgKDQwOSk6IHtc\nImVycm9yXCI6XCJBbiBJZGVudGl0eSB3aXRoIHRoYXQgbGFiZWwgYWxyZWFk\neSBleGlzdHNcIn0ifQ==\n"},"http_version":null},"recorded_at":"Fri, 15 May 2015 09:08:13 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/account/identity/limit/get_failure_invalid_identity.json b/test/fixtures/cassettes/account/identity/limit/get_failure_invalid_identity.json new file mode 100644 index 0000000..47f17cf --- /dev/null +++ b/test/fixtures/cassettes/account/identity/limit/get_failure_invalid_identity.json @@ -0,0 +1 @@ +{"http_interactions":[{"request":{"method":"get","uri":"https://api.datasift.com/v1.1/account/identity/INVALID_IDENTITY_ID/limit/facebook","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/x-www-form-urlencoded"]}},"response":{"status":{"code":400,"message":"Bad Request"},"headers":{"Server":["nginx"],"Date":["Fri, 15 May 2015 09:08:13 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9810"],"X-Ratelimit-Cost":["25"],"X-Ratelimit-Reset":["1431684488"],"X-Ratelimit-Reset-Ttl":["3595"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6ImlkZW50aXR5X2lkIG11c3QgYmUgYSB2YWxpZCBoYXNoIn0=\n"},"http_version":null},"recorded_at":"Fri, 15 May 2015 09:08:14 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/account/identity/token/after_create_success.json b/test/fixtures/cassettes/account/identity/token/after_create_success.json new file mode 100644 index 0000000..03ab253 --- /dev/null +++ b/test/fixtures/cassettes/account/identity/token/after_create_success.json @@ -0,0 +1 @@ +{"http_interactions":[{"request":{"method":"delete","uri":"https://api.datasift.com/v1.1/account/identity/","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/x-www-form-urlencoded"]}},"response":{"status":{"code":405,"message":"Method Not Allowed"},"headers":{"Server":["nginx"],"Date":["Fri, 15 May 2015 09:08:11 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6Ik1ldGhvZCBERUxFVEUgbm90IGFsbG93ZWQgZm9yIHRoaXMg\nZW5kcG9pbnQifQ==\n"},"http_version":null},"recorded_at":"Fri, 15 May 2015 09:08:12 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/account/identity/token/after_delete.json b/test/fixtures/cassettes/account/identity/token/after_delete.json new file mode 100644 index 0000000..5792d2d --- /dev/null +++ b/test/fixtures/cassettes/account/identity/token/after_delete.json @@ -0,0 +1 @@ +{"http_interactions":[{"request":{"method":"delete","uri":"https://api.datasift.com/v1.1/account/identity/","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/x-www-form-urlencoded"]}},"response":{"status":{"code":405,"message":"Method Not Allowed"},"headers":{"Server":["nginx"],"Date":["Fri, 15 May 2015 09:08:13 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6Ik1ldGhvZCBERUxFVEUgbm90IGFsbG93ZWQgZm9yIHRoaXMg\nZW5kcG9pbnQifQ==\n"},"http_version":null},"recorded_at":"Fri, 15 May 2015 09:08:14 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/account/identity/token/after_get_success.json b/test/fixtures/cassettes/account/identity/token/after_get_success.json new file mode 100644 index 0000000..e15f2fe --- /dev/null +++ b/test/fixtures/cassettes/account/identity/token/after_get_success.json @@ -0,0 +1 @@ +{"http_interactions":[{"request":{"method":"delete","uri":"https://api.datasift.com/v1.1/account/identity/","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/x-www-form-urlencoded"]}},"response":{"status":{"code":405,"message":"Method Not Allowed"},"headers":{"Server":["nginx"],"Date":["Fri, 15 May 2015 09:08:12 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6Ik1ldGhvZCBERUxFVEUgbm90IGFsbG93ZWQgZm9yIHRoaXMg\nZW5kcG9pbnQifQ==\n"},"http_version":null},"recorded_at":"Fri, 15 May 2015 09:08:13 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/account/identity/token/after_successful_update.json b/test/fixtures/cassettes/account/identity/token/after_successful_update.json new file mode 100644 index 0000000..bc4fc36 --- /dev/null +++ b/test/fixtures/cassettes/account/identity/token/after_successful_update.json @@ -0,0 +1 @@ +{"http_interactions":[{"request":{"method":"delete","uri":"https://api.datasift.com/v1.1/account/identity/","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/x-www-form-urlencoded"]}},"response":{"status":{"code":405,"message":"Method Not Allowed"},"headers":{"Server":["nginx"],"Date":["Fri, 15 May 2015 09:08:16 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6Ik1ldGhvZCBERUxFVEUgbm90IGFsbG93ZWQgZm9yIHRoaXMg\nZW5kcG9pbnQifQ==\n"},"http_version":null},"recorded_at":"Fri, 15 May 2015 09:08:17 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/account/identity/token/before_create_success.json b/test/fixtures/cassettes/account/identity/token/before_create_success.json new file mode 100644 index 0000000..d714668 --- /dev/null +++ b/test/fixtures/cassettes/account/identity/token/before_create_success.json @@ -0,0 +1 @@ +{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.1/account/identity","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["38"]}},"response":{"status":{"code":409,"message":"Conflict"},"headers":{"Server":["nginx"],"Date":["Fri, 15 May 2015 09:08:11 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9865"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1431684488"],"X-Ratelimit-Reset-Ttl":["3597"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6IkFuIElkZW50aXR5IHdpdGggdGhhdCBsYWJlbCBhbHJlYWR5\nIGV4aXN0cyIsIm9yaWdpbmFsX2Vycm9yIjoiQ29uZmxpY3QgKDQwOSk6IHtc\nImVycm9yXCI6XCJBbiBJZGVudGl0eSB3aXRoIHRoYXQgbGFiZWwgYWxyZWFk\neSBleGlzdHNcIn0ifQ==\n"},"http_version":null},"recorded_at":"Fri, 15 May 2015 09:08:12 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/account/identity/token/before_delete.json b/test/fixtures/cassettes/account/identity/token/before_delete.json new file mode 100644 index 0000000..d90c9b9 --- /dev/null +++ b/test/fixtures/cassettes/account/identity/token/before_delete.json @@ -0,0 +1 @@ +{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.1/account/identity","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["38"]}},"response":{"status":{"code":409,"message":"Conflict"},"headers":{"Server":["nginx"],"Date":["Fri, 15 May 2015 09:08:13 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9835"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1431684488"],"X-Ratelimit-Reset-Ttl":["3595"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6IkFuIElkZW50aXR5IHdpdGggdGhhdCBsYWJlbCBhbHJlYWR5\nIGV4aXN0cyIsIm9yaWdpbmFsX2Vycm9yIjoiQ29uZmxpY3QgKDQwOSk6IHtc\nImVycm9yXCI6XCJBbiBJZGVudGl0eSB3aXRoIHRoYXQgbGFiZWwgYWxyZWFk\neSBleGlzdHNcIn0ifQ==\n"},"http_version":null},"recorded_at":"Fri, 15 May 2015 09:08:14 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/account/identity/token/before_get_success.json b/test/fixtures/cassettes/account/identity/token/before_get_success.json new file mode 100644 index 0000000..edd8a82 --- /dev/null +++ b/test/fixtures/cassettes/account/identity/token/before_get_success.json @@ -0,0 +1 @@ +{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.1/account/identity","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["38"]}},"response":{"status":{"code":409,"message":"Conflict"},"headers":{"Server":["nginx"],"Date":["Fri, 15 May 2015 09:08:12 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9860"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1431684488"],"X-Ratelimit-Reset-Ttl":["3596"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6IkFuIElkZW50aXR5IHdpdGggdGhhdCBsYWJlbCBhbHJlYWR5\nIGV4aXN0cyIsIm9yaWdpbmFsX2Vycm9yIjoiQ29uZmxpY3QgKDQwOSk6IHtc\nImVycm9yXCI6XCJBbiBJZGVudGl0eSB3aXRoIHRoYXQgbGFiZWwgYWxyZWFk\neSBleGlzdHNcIn0ifQ==\n"},"http_version":null},"recorded_at":"Fri, 15 May 2015 09:08:12 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/account/identity/token/before_successful_update.json b/test/fixtures/cassettes/account/identity/token/before_successful_update.json new file mode 100644 index 0000000..88c6d09 --- /dev/null +++ b/test/fixtures/cassettes/account/identity/token/before_successful_update.json @@ -0,0 +1 @@ +{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.1/account/identity","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["38"]}},"response":{"status":{"code":409,"message":"Conflict"},"headers":{"Server":["nginx"],"Date":["Fri, 15 May 2015 09:08:16 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9720"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1431684488"],"X-Ratelimit-Reset-Ttl":["3592"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6IkFuIElkZW50aXR5IHdpdGggdGhhdCBsYWJlbCBhbHJlYWR5\nIGV4aXN0cyIsIm9yaWdpbmFsX2Vycm9yIjoiQ29uZmxpY3QgKDQwOSk6IHtc\nImVycm9yXCI6XCJBbiBJZGVudGl0eSB3aXRoIHRoYXQgbGFiZWwgYWxyZWFk\neSBleGlzdHNcIn0ifQ==\n"},"http_version":null},"recorded_at":"Fri, 15 May 2015 09:08:17 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/account/identity/token/get_failure_invalid_identity.json b/test/fixtures/cassettes/account/identity/token/get_failure_invalid_identity.json new file mode 100644 index 0000000..a616ecd --- /dev/null +++ b/test/fixtures/cassettes/account/identity/token/get_failure_invalid_identity.json @@ -0,0 +1 @@ +{"http_interactions":[{"request":{"method":"get","uri":"https://api.datasift.com/v1.1/account/identity/INVALID_IDENTITY_ID/token/facebook","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/x-www-form-urlencoded"]}},"response":{"status":{"code":400,"message":"Bad Request"},"headers":{"Server":["nginx"],"Date":["Fri, 15 May 2015 09:08:13 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9840"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1431684488"],"X-Ratelimit-Reset-Ttl":["3595"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6ImlkZW50aXR5X2lkIG11c3QgYmUgYSB2YWxpZCBoYXNoIn0=\n"},"http_version":null},"recorded_at":"Fri, 15 May 2015 09:08:14 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/account/identity/update_id_404.json b/test/fixtures/cassettes/account/identity/update_id_404.json new file mode 100644 index 0000000..00f917c --- /dev/null +++ b/test/fixtures/cassettes/account/identity/update_id_404.json @@ -0,0 +1 @@ +{"http_interactions":[{"request":{"method":"put","uri":"https://api.datasift.com/v1.1/account/identity/fake_id","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["60"]}},"response":{"status":{"code":404,"message":"Not Found"},"headers":{"Server":["nginx"],"Date":["Fri, 15 May 2015 09:08:16 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9715"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1431684488"],"X-Ratelimit-Reset-Ttl":["3592"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6IklkZW50aXR5IG5vdCBmb3VuZCJ9\n"},"http_version":null},"recorded_at":"Fri, 15 May 2015 09:08:17 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/account/usage/default.json b/test/fixtures/cassettes/account/usage/default.json new file mode 100644 index 0000000..f484b94 --- /dev/null +++ b/test/fixtures/cassettes/account/usage/default.json @@ -0,0 +1 @@ +{"http_interactions":[{"request":{"method":"get","uri":"https://api.datasift.com/v1.2/account/usage","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.5.0"],"Authorization":[""]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Wed, 07 Oct 2015 15:14:21 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9433"],"X-Ratelimit-Cost":["25"],"X-Ratelimit-Reset":["1444231382"],"X-Ratelimit-Reset-Ttl":["521"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2587"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"W10=\n"},"http_version":null},"recorded_at":"Wed, 07 Oct 2015 15:14:23 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/account/usage/invalid.json b/test/fixtures/cassettes/account/usage/invalid.json new file mode 100644 index 0000000..9b5e3ba --- /dev/null +++ b/test/fixtures/cassettes/account/usage/invalid.json @@ -0,0 +1 @@ +{"http_interactions":[{"request":{"method":"get","uri":"https://api.datasift.com/v1.2/account/usage?period=invalid_period","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.5.0"],"Authorization":[""]}},"response":{"status":{"code":400,"message":"Bad Request"},"headers":{"Server":["nginx"],"Date":["Wed, 07 Oct 2015 15:14:22 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9383"],"X-Ratelimit-Cost":["25"],"X-Ratelimit-Reset":["1444231382"],"X-Ratelimit-Reset-Ttl":["520"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6InBlcmlvZCBpcyBpbnZhbGlkOyB2YWxpZCB2YWx1ZXMgYXJl\nOiBob3VybHksZGFpbHksbW9udGhseSJ9\n"},"http_version":null},"recorded_at":"Wed, 07 Oct 2015 15:14:24 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/account/usage/valid_params.json b/test/fixtures/cassettes/account/usage/valid_params.json new file mode 100644 index 0000000..d6d42d1 --- /dev/null +++ b/test/fixtures/cassettes/account/usage/valid_params.json @@ -0,0 +1 @@ +{"http_interactions":[{"request":{"method":"get","uri":"https://api.datasift.com/v1.2/account/usage?period=monthly","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.5.0"],"Authorization":[""]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Wed, 07 Oct 2015 15:14:21 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9408"],"X-Ratelimit-Cost":["25"],"X-Ratelimit-Reset":["1444231382"],"X-Ratelimit-Reset-Ttl":["521"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2584"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJ1c2FnZSI6W3sicXVhbnRpdHkiOjIyLCJjb3N0IjowLCJjYXRlZ29yeSI6\nImhpc3RvcmljcHJldmlldyIsInVuaXQiOiJkcHUiLCJzb3VyY2UiOiIiLCJ0\naW1lc3RhbXAiOjE0NDM2NTc2MDB9LHsicXVhbnRpdHkiOjYuNDUwNDgsImNv\nc3QiOjAsImNhdGVnb3J5IjoibWFuYWdlZF9zb3VyY2VzIiwidW5pdCI6ImRw\ndSIsInNvdXJjZSI6ImZhY2Vib29rX3BhZ2VzIiwidGltZXN0YW1wIjoxNDQz\nNjU3NjAwfSx7InF1YW50aXR5IjoxMC4xNzc0OCwiY29zdCI6MCwiY2F0ZWdv\ncnkiOiJyZWFsdGltZSIsInVuaXQiOiJkcHUiLCJzb3VyY2UiOiIiLCJ0aW1l\nc3RhbXAiOjE0NDM2NTc2MDB9XX0=\n"},"http_version":null},"recorded_at":"Wed, 07 Oct 2015 15:14:23 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file From 80d716ee69162f537a5b61b6c21380e31b03ecc5 Mon Sep 17 00:00:00 2001 From: Jason Dugdale Date: Thu, 22 Oct 2015 16:03:16 +0100 Subject: [PATCH 03/14] Minor performance improvements by allocating fewer objects --- CHANGELOG.md | 4 ++++ lib/api/api_resource.rb | 6 ++++-- lib/datasift.rb | 43 +++++++++++++++++++++++------------------ lib/odp.rb | 8 ++++++-- 4 files changed, 38 insertions(+), 23 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bca42ff..5f19826 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ CHANGELOG ### Added * Support for the [/account/usage](http://dev.datasift.com/pylon/docs/api/acct-api-endpoints/get-accountusage) API endpoint +### Changed +* Only set ```Content-Type``` HTTP header for POST/PUT requests; it's not necessary unless we are passing a request entity +* Teased out some minor performance enhancements by allocating fewer objects on each request + ## v.3.4.0 (2015-08-20) ### Added * Support for [Open Data Processing](https://datasift.com/products/open-data-processing-for-twitter/) batch uploads (Thanks [@giovannelli](https://github.com/giovannelli)) diff --git a/lib/api/api_resource.rb b/lib/api/api_resource.rb index d7e92c3..5c7417c 100755 --- a/lib/api/api_resource.rb +++ b/lib/api/api_resource.rb @@ -2,6 +2,8 @@ module DataSift # Base API class class ApiResource include DataSift + TLSv1_2 = "TLSv1_2".freeze + TLSv1 = "TLSv1".freeze # Initializer to create global @config object # @@ -15,10 +17,10 @@ def initialize(config) config[:api_version] = 'v1.2' unless config.has_key?(:api_version) config[:enable_ssl] = true unless config.has_key?(:enable_ssl) - ssl_default = "TLSv1_2" + ssl_default = TLSv1_2 if RUBY_VERSION.to_i == 1 # Ruby 1.x does not seem to support > TLSv1 - ssl_default = "TLSv1" + ssl_default = TLSv1 end config[:ssl_version] = config[:ssl_version] || ssl_default diff --git a/lib/datasift.rb b/lib/datasift.rb index 7cdb91f..bfad7d5 100755 --- a/lib/datasift.rb +++ b/lib/datasift.rb @@ -33,6 +33,14 @@ module DataSift DETECT_DEAD_SOCKETS = true SOCKET_DETECTOR_TIMEOUT = 6.5 + GET = 'GET'.freeze + HEAD = 'HEAD'.freeze + DELETE = 'DELETE'.freeze + APPLICATION_JSON = 'application/json'.freeze + X_RATELIMIT_LIMIT = 'x_ratelimit_limit'.freeze + X_RATELIMIT_REMAINING = 'x_ratelimit_remaining'.freeze + X_RATELIMIT_COST = 'x_ratelimit_cost'.freeze + Thread.new do while DETECT_DEAD_SOCKETS now = Time.now.to_i @@ -155,25 +163,24 @@ def self.request(method, path, config, params = {}, headers = {}, timeout = 30, open_timeout = 30, new_line_separated = false) validate config - options = {} url = build_url(path, config) headers.update( :user_agent => "DataSift/#{config[:api_version]} Ruby/v#{VERSION}", :authorization => "#{config[:username]}:#{config[:api_key]}", - :content_type => 'application/x-www-form-urlencoded' + :accept => '*/*' ) - case method.to_s.downcase.to_sym - when :get, :head, :delete + case method.to_s.upcase + when GET, HEAD, DELETE url += "#{URI.parse(url).query ? '&' : '?'}#{encode params}" payload = nil else payload = params.is_a?(String) ? params : MultiJson.dump(params) - headers.update({ :content_type => 'application/json' }) + headers.update({ :content_type => APPLICATION_JSON }) end - options.update( + options = { :headers => headers, :method => method, :open_timeout => open_timeout, @@ -182,16 +189,15 @@ def self.request(method, path, config, params = {}, headers = {}, :url => url, :ssl_version => config[:ssl_version], :verify_ssl => OpenSSL::SSL::VERIFY_PEER - ) + } response = nil begin response = RestClient::Request.execute options if !response.nil? && response.length > 0 if new_line_separated - res_arr = response.split("\n") - data = [] - res_arr.each { |e| + data = [] + response.split("\n").each { |e| interaction = MultiJson.load(e, :symbolize_keys => true) data.push(interaction) if params.key? :on_interaction @@ -207,9 +213,9 @@ def self.request(method, path, config, params = {}, headers = {}, { :data => data, :datasift => { - :x_ratelimit_limit => response.headers[:x_ratelimit_limit], - :x_ratelimit_remaining => response.headers[:x_ratelimit_remaining], - :x_ratelimit_cost => response.headers[:x_ratelimit_cost] + X_RATELIMIT_LIMIT => response.headers[:x_ratelimit_limit], + X_RATELIMIT_REMAINING => response.headers[:x_ratelimit_remaining], + X_RATELIMIT_COST => response.headers[:x_ratelimit_cost] }, :http => { :status => response.code, @@ -229,9 +235,9 @@ def self.request(method, path, config, params = {}, headers = {}, response_on_error = { :data => nil, :datasift => { - :x_ratelimit_limit => e.response.headers[:x_ratelimit_limit], - :x_ratelimit_remaining => e.response.headers[:x_ratelimit_remaining], - :x_ratelimit_cost => e.response.headers[:x_ratelimit_cost] + X_RATELIMIT_LIMIT => e.response.headers[:x_ratelimit_limit], + X_RATELIMIT_REMAINING => e.response.headers[:x_ratelimit_remaining], + X_RATELIMIT_COST => e.response.headers[:x_ratelimit_cost] }, :http => { :status => e.response.code, @@ -255,10 +261,9 @@ def self.request(method, path, config, params = {}, headers = {}, def self.build_url(path, config) url = 'http' + (config[:enable_ssl] ? 's' : '') + '://' + config[:api_host] if !config[:api_version].nil? - url += '/' + config[:api_version] + '/' + path - else - url += '/' + path + url += '/' + config[:api_version] end + url += '/' + path end # Returns true if username or api key are not set diff --git a/lib/odp.rb b/lib/odp.rb index 938886b..840d65e 100644 --- a/lib/odp.rb +++ b/lib/odp.rb @@ -7,8 +7,12 @@ def ingest(source_id, data) fail ArgumentError, 'source_id is required' if source_id.nil? fail ArgumentError, 'data payload is required' if data.nil? - config = @config.merge(api_host: @config[:ingestion_host], api_version: nil) - DataSift.request(:POST, source_id, config, data) + DataSift.request( + :POST, + source_id, + @config.merge(api_host: @config[:ingestion_host], api_version: nil), + data + ) end end end From ec955062dc0615cb0fe47e59c243464191a6c21c Mon Sep 17 00:00:00 2001 From: Jason Dugdale Date: Thu, 22 Oct 2015 16:05:08 +0100 Subject: [PATCH 04/14] Added explicit support for 412, 415, 503 and 504 HTTP error responses --- CHANGELOG.md | 1 + lib/datasift.rb | 8 ++++++++ lib/errors.rb | 16 ++++++++++++++++ 3 files changed, 25 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f19826..7f0b53c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ CHANGELOG ## v.3.5.0 (2015-09-29) ### Added * Support for the [/account/usage](http://dev.datasift.com/pylon/docs/api/acct-api-endpoints/get-accountusage) API endpoint +* Added explicit support for 412, 415, 503 and 504 HTTP error responses ### Changed * Only set ```Content-Type``` HTTP header for POST/PUT requests; it's not necessary unless we are passing a request entity diff --git a/lib/datasift.rb b/lib/datasift.rb index bfad7d5..a4d1c11 100755 --- a/lib/datasift.rb +++ b/lib/datasift.rb @@ -293,12 +293,20 @@ def self.handle_api_error(code, body, response) raise ConflictError.new(code, body, response) when 410 raise GoneError.new(code, body, response) + when 412 + raise PreconditionFailedError.new(code, body, response) when 413 raise PayloadTooLargeError.new(code, body, response) + when 415 + raise UnsupportedMediaTypeError.new(code, body, response) when 422 raise UnprocessableEntityError.new(code, body, response) when 429 raise TooManyRequestsError.new(code, body, response) + when 503 + raise ServiceUnavailableError.new(code, body, response) + when 504 + raise GatewayTimeoutError.new(code, body, response) else raise DataSiftError.new(code, body, response) end diff --git a/lib/errors.rb b/lib/errors.rb index dc7b24c..953d2fd 100644 --- a/lib/errors.rb +++ b/lib/errors.rb @@ -48,10 +48,18 @@ class ConflictError < DataSiftError class GoneError < DataSiftError end +# Standard error returned when receiving a 412 response from the API +class PreconditionFailedError < DataSiftError +end + # Standard error returned when receiving a 413 response from the API class PayloadTooLargeError < DataSiftError end +# Standard error returned when receiving a 415 response from the API +class UnsupportedMediaTypeError < DataSiftError +end + # Standard error returned when receiving a 422 response from the API class UnprocessableEntityError < DataSiftError end @@ -60,6 +68,14 @@ class UnprocessableEntityError < DataSiftError class TooManyRequestsError < DataSiftError end +# Standard error returned when receiving a 503 response from the API +class ServiceUnavailableError < DataSiftError +end + +# Standard error returned when receiving a 504 response from the API +class GatewayTimeoutError < DataSiftError +end + class InvalidConfigError < DataSiftError end From e461b3d63336a1f7d1df1fa988feee0c2cca272f Mon Sep 17 00:00:00 2001 From: Jason Dugdale Date: Thu, 22 Oct 2015 16:10:37 +0100 Subject: [PATCH 05/14] Loosen some Gem dependancies. Successfully tested against rest-client v2.0.0 --- CHANGELOG.md | 1 + Gemfile | 2 +- datasift.gemspec | 8 ++++---- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f0b53c..44f0b26 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ CHANGELOG ### Changed * Only set ```Content-Type``` HTTP header for POST/PUT requests; it's not necessary unless we are passing a request entity * Teased out some minor performance enhancements by allocating fewer objects on each request +* Loosen some Gem dependancies. Successfully tested against [rest-client](https://github.com/rest-client/rest-client) v2.0.0 ## v.3.4.0 (2015-08-20) ### Added diff --git a/Gemfile b/Gemfile index b6f976c..4422fc2 100644 --- a/Gemfile +++ b/Gemfile @@ -7,7 +7,7 @@ group :test do gem 'minitest', '~> 5.0' gem 'rubocop', '>= 0.27' gem 'simplecov', '>= 0.9' - gem 'shoulda', '~> 2.11' + gem 'shoulda', '>= 2.11' gem 'vcr', '~> 2.9' gem 'webmock' end diff --git a/datasift.gemspec b/datasift.gemspec index d3c2bf7..228bb53 100644 --- a/datasift.gemspec +++ b/datasift.gemspec @@ -15,8 +15,8 @@ Gem::Specification.new do |s| s.test_files = `git ls-files -- {test}/*`.split("\n") s.require_paths = ["lib"] - s.add_runtime_dependency('rest-client', '~> 1.8') - s.add_runtime_dependency('multi_json', '~> 1.7') - s.add_runtime_dependency('websocket-td', '~> 0.0.5') - s.add_development_dependency('bundler', '~> 1.0') + s.add_runtime_dependency 'rest-client', ['>= 1.8', '< 3.0'] + s.add_runtime_dependency 'multi_json', '~> 1.7' + s.add_runtime_dependency 'websocket-td', '~> 0.0.5' + s.add_development_dependency 'bundler', '~> 1.0' end From a26c3a9b664a18057021133f4a3828f6ac914e71 Mon Sep 17 00:00:00 2001 From: Jason Dugdale Date: Wed, 28 Oct 2015 10:44:08 +0000 Subject: [PATCH 06/14] Fixed typo in docs --- lib/account.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/account.rb b/lib/account.rb index 2dd8567..059cad0 100644 --- a/lib/account.rb +++ b/lib/account.rb @@ -4,7 +4,7 @@ module DataSift class Account < DataSift::ApiResource # Check your account usage for a given period and timeframe # - # @param period [String] (Optional) Period is one of either daily, weekly or monthly + # @param period [String] (Optional) Period is one of either hourly, daily or monthly # @param start_time [Integer] (Optional) Unix timestamp of the start of the period # you are querying # @param end_time [Integer] (Optional) Unix timestamp of the end of the period From 9bc39532918be26a50f31c63cf7b40d8661fbe9d Mon Sep 17 00:00:00 2001 From: Jason Dugdale Date: Thu, 5 Nov 2015 12:40:28 +0000 Subject: [PATCH 07/14] Minor updates to /account/* examples to improve error handling, cleanup on error and output readability --- examples/account_identity_eg.rb | 18 ++++++++++-------- examples/account_identity_limit_eg.rb | 18 ++++++++++-------- examples/account_identity_token_eg.rb | 7 +++++-- 3 files changed, 25 insertions(+), 18 deletions(-) diff --git a/examples/account_identity_eg.rb b/examples/account_identity_eg.rb index 23ce1fb..5f59329 100644 --- a/examples/account_identity_eg.rb +++ b/examples/account_identity_eg.rb @@ -10,27 +10,27 @@ def run begin puts "Create a new identity" identity = @datasift.account_identity.create( - "Ruby Identity", "active", false + "Ruby Identity #{DateTime.now.to_s}", "active", false ) identity_id = identity[:data][:id] - puts identity.to_json + puts identity[:data].to_json puts "\nList all existing identities" - puts @datasift.account_identity.list.to_json + puts @datasift.account_identity.list[:data].to_json puts "\nGet existing identity" - puts @datasift.account_identity.get(identity_id).to_json + puts @datasift.account_identity.get(identity_id)[:data].to_json puts "\nUpdate an identity" puts @datasift.account_identity.update( - identity_id, 'Updated Ruby Identity' - ).to_json + identity_id, "Updated Ruby Identity #{DateTime.now.to_s}" + )[:data].to_json puts "\nDelete an identity" - puts @datasift.account_identity.delete(identity_id).to_json + @datasift.account_identity.delete(identity_id) rescue DataSiftError => dse - puts dse.message + puts dse.inspect # Then match specific error to take action; # All errors thrown by the client extend DataSiftError case dse @@ -41,6 +41,8 @@ def run else # do something else... end + puts "\nClean up and delete the identity" + @datasift.account_identity.delete(identity_id) end end end diff --git a/examples/account_identity_limit_eg.rb b/examples/account_identity_limit_eg.rb index 6c3f893..6fb8709 100644 --- a/examples/account_identity_limit_eg.rb +++ b/examples/account_identity_limit_eg.rb @@ -13,44 +13,44 @@ def run "Ruby Identity for Token Limits", "active", false ) identity_id = identity[:data][:id] - puts identity.to_json + puts identity[:data].to_json puts "\nCreate a Limit for our Identity" puts @datasift.account_identity_limit.create( identity_id, 'facebook', 100_000 - ) + )[:data].to_json puts "\nList all existing Limits for this Service" puts @datasift.account_identity_limit.list( 'facebook' - ).to_json + )[:data].to_json puts "\nGet existing Limit by Identity and Service" puts @datasift.account_identity_limit.get( identity_id, 'facebook' - ).to_json + )[:data].to_json puts "\nUpdate a Limit for a given Identity" puts @datasift.account_identity_limit.update( identity_id, 'facebook', 250_000 - ).to_json + )[:data].to_json puts "\nRemove the Limit from a given Identity and Service" - puts @datasift.account_identity_limit.delete( + @datasift.account_identity_limit.delete( identity_id, 'facebook' - ).to_json + ) puts "\nCleanup and remove the Identity" @datasift.account_identity.delete(identity_id) rescue DataSiftError => dse - puts dse.message + puts dse.inspect # Then match specific error to take action; # All errors thrown by the client extend DataSiftError case dse @@ -61,6 +61,8 @@ def run else # do something else... end + puts "\nCleanup and remove the Identity" + @datasift.account_identity.delete(identity_id) end end end diff --git a/examples/account_identity_token_eg.rb b/examples/account_identity_token_eg.rb index 0c147c8..110ecf4 100644 --- a/examples/account_identity_token_eg.rb +++ b/examples/account_identity_token_eg.rb @@ -10,7 +10,7 @@ def run begin puts "Create a new identity to create tokens for" identity = @datasift.account_identity.create( - "Ruby Identity for Tokens", + "Ruby Identity for Tokena", "active", false ) @@ -52,7 +52,7 @@ def run @datasift.account_identity.delete(identity_id) rescue DataSiftError => dse - puts dse.message + puts dse.inspect # Then match specific error to take action; # All errors thrown by the client extend DataSiftError case dse @@ -60,9 +60,12 @@ def run # some connection error when AuthError when BadRequestError + puts '[WARNING] You will need to use a valid token to run through this example' else # do something else... end + puts "\nCleanup and remove the Identity" + @datasift.account_identity.delete(identity_id) end end end From a53d0f876416596ab393e09fdbe79f93f9d3243e Mon Sep 17 00:00:00 2001 From: Jason Dugdale Date: Wed, 11 Nov 2015 16:36:20 +0000 Subject: [PATCH 08/14] Adds support for the /pylon/sample API endpoint --- lib/pylon.rb | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/lib/pylon.rb b/lib/pylon.rb index 205ef98..751a4cb 100644 --- a/lib/pylon.rb +++ b/lib/pylon.rb @@ -118,5 +118,28 @@ def tags(hash) DataSift.request(:GET, 'pylon/tags', @config, params) end + + # Hit the PYLON Sample endpoint to pull public sample data from a PYLON recording + # + # @param hash [String] The CSDL hash that identifies the recording you want to sample + # @param count [Integer] Optional number of public interactions you wish to receive + # @param start_time [Integer] Optional start timestamp for filtering by date + # @param end_time [Integer] Optional end timestamp for filtering by date + # @param filter [String] Optional PYLON CSDL for a query filter + # @return [Object] API reponse object + def sample(hash = '', count = nil, start_time = nil, end_time = nil, filter = '') + fail BadParametersError, 'hash is required' if hash.empty? + params = { hash: hash } + params.merge!(count: count) unless count.nil? + params.merge!(start_time: start_time) unless start_time.nil? + params.merge!(end_time: end_time) unless end_time.nil? + + if filter.empty? + DataSift.request(:GET, 'pylon/sample', @config, params) + else + params.merge!(filter: filter) + DataSift.request(:POST, 'pylon/sample', @config, params) + end + end end end From 37be19f0073db611e3ea5bbb4292b63578027f57 Mon Sep 17 00:00:00 2001 From: Jason Dugdale Date: Wed, 11 Nov 2015 16:38:16 +0000 Subject: [PATCH 09/14] Removed some unnecessary test fixtures --- test/datasift/account_api_test.rb | 35 ------------------- .../identity/after_create_success.json | 1 - .../identity/after_successful_update.json | 1 - .../account/identity/before_get_success.json | 1 - .../identity/before_successful_delete.json | 1 - .../identity/before_successful_update.json | 1 - .../account/identity/create_success.json | 1 - .../identity/limit/after_create_success.json | 1 - .../account/identity/limit/after_delete.json | 1 - .../identity/limit/after_get_success.json | 1 - .../limit/after_successful_update.json | 1 - .../identity/limit/before_create_success.json | 1 - .../account/identity/limit/before_delete.json | 1 - .../identity/limit/before_get_success.json | 1 - .../limit/before_successful_update.json | 1 - .../limit/get_failure_invalid_identity.json | 1 - .../identity/token/after_create_success.json | 1 - .../account/identity/token/after_delete.json | 1 - .../identity/token/after_get_success.json | 1 - .../token/after_successful_update.json | 1 - .../identity/token/before_create_success.json | 1 - .../account/identity/token/before_delete.json | 1 - .../identity/token/before_get_success.json | 1 - .../token/before_successful_update.json | 1 - .../token/get_failure_invalid_identity.json | 1 - .../account/identity/update_id_404.json | 1 - 26 files changed, 60 deletions(-) delete mode 100644 test/datasift/account_api_test.rb delete mode 100644 test/fixtures/cassettes/account/identity/after_create_success.json delete mode 100644 test/fixtures/cassettes/account/identity/after_successful_update.json delete mode 100644 test/fixtures/cassettes/account/identity/before_get_success.json delete mode 100644 test/fixtures/cassettes/account/identity/before_successful_delete.json delete mode 100644 test/fixtures/cassettes/account/identity/before_successful_update.json delete mode 100644 test/fixtures/cassettes/account/identity/create_success.json delete mode 100644 test/fixtures/cassettes/account/identity/limit/after_create_success.json delete mode 100644 test/fixtures/cassettes/account/identity/limit/after_delete.json delete mode 100644 test/fixtures/cassettes/account/identity/limit/after_get_success.json delete mode 100644 test/fixtures/cassettes/account/identity/limit/after_successful_update.json delete mode 100644 test/fixtures/cassettes/account/identity/limit/before_create_success.json delete mode 100644 test/fixtures/cassettes/account/identity/limit/before_delete.json delete mode 100644 test/fixtures/cassettes/account/identity/limit/before_get_success.json delete mode 100644 test/fixtures/cassettes/account/identity/limit/before_successful_update.json delete mode 100644 test/fixtures/cassettes/account/identity/limit/get_failure_invalid_identity.json delete mode 100644 test/fixtures/cassettes/account/identity/token/after_create_success.json delete mode 100644 test/fixtures/cassettes/account/identity/token/after_delete.json delete mode 100644 test/fixtures/cassettes/account/identity/token/after_get_success.json delete mode 100644 test/fixtures/cassettes/account/identity/token/after_successful_update.json delete mode 100644 test/fixtures/cassettes/account/identity/token/before_create_success.json delete mode 100644 test/fixtures/cassettes/account/identity/token/before_delete.json delete mode 100644 test/fixtures/cassettes/account/identity/token/before_get_success.json delete mode 100644 test/fixtures/cassettes/account/identity/token/before_successful_update.json delete mode 100644 test/fixtures/cassettes/account/identity/token/get_failure_invalid_identity.json delete mode 100644 test/fixtures/cassettes/account/identity/update_id_404.json diff --git a/test/datasift/account_api_test.rb b/test/datasift/account_api_test.rb deleted file mode 100644 index ccc0115..0000000 --- a/test/datasift/account_api_test.rb +++ /dev/null @@ -1,35 +0,0 @@ -require File.expand_path('../../test_helper', __FILE__) - -describe 'DataSift::Account' do - before do - auth = DataSiftExample.new - @datasift = auth.datasift - end - - ## - # Account Usage - # - describe '#usage' do - it 'can get account usage using default params' do - VCR.use_cassette('account/usage/default') do - response = @datasift.account.usage - assert_equal STATUS.valid, response[:http][:status] - end - end - - it 'can get account usage using valid params' do - VCR.use_cassette('account/usage/valid_params') do - response = @datasift.account.usage('monthly') - assert_equal STATUS.valid, response[:http][:status] - end - end - - it 'handles 400 when using invalid params' do - VCR.use_cassette('account/usage/invalid') do - assert_raises BadRequestError do - @datasift.account.usage('invalid_period') - end - end - end - end -end diff --git a/test/fixtures/cassettes/account/identity/after_create_success.json b/test/fixtures/cassettes/account/identity/after_create_success.json deleted file mode 100644 index 94d1bf4..0000000 --- a/test/fixtures/cassettes/account/identity/after_create_success.json +++ /dev/null @@ -1 +0,0 @@ -{"http_interactions":[{"request":{"method":"delete","uri":"https://api.datasift.com/v1/account/identity/b9646788547eaafe9963911c2ecd0143","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1 Ruby/v3.2.0.rc3"],"Authorization":[""],"Content-Type":["application/x-www-form-urlencoded"]}},"response":{"status":{"code":404,"message":"Not Found"},"headers":{"Server":["nginx"],"Date":["Wed, 13 May 2015 15:42:09 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9995"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1431535329"],"X-Ratelimit-Reset-Ttl":["3600"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"IkRlbGV0aW9uIG9mIElkZW50aXRpZXMgaXMgY3VycmVudGx5IHVuYXZhaWxh\nYmxlIg==\n"},"http_version":null},"recorded_at":"Wed, 13 May 2015 15:42:10 GMT"},{"request":{"method":"delete","uri":"https://api.datasift.com/v1/account/identity/","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1 Ruby/v3.2.0.rc3"],"Authorization":[""],"Content-Type":["application/x-www-form-urlencoded"]}},"response":{"status":{"code":405,"message":"Method Not Allowed"},"headers":{"Server":["nginx"],"Date":["Wed, 13 May 2015 15:42:10 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1"],"P3p":["CP=\"CAO PSA\""],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6Ik1ldGhvZCBERUxFVEUgbm90IGFsbG93ZWQgZm9yIHRoaXMg\nZW5kcG9pbnQifQ==\n"},"http_version":null},"recorded_at":"Wed, 13 May 2015 15:42:10 GMT"},{"request":{"method":"delete","uri":"https://api.datasift.com/v1.1/account/identity/","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/x-www-form-urlencoded"]}},"response":{"status":{"code":405,"message":"Method Not Allowed"},"headers":{"Server":["nginx"],"Date":["Fri, 15 May 2015 09:08:08 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6Ik1ldGhvZCBERUxFVEUgbm90IGFsbG93ZWQgZm9yIHRoaXMg\nZW5kcG9pbnQifQ==\n"},"http_version":null},"recorded_at":"Fri, 15 May 2015 09:08:09 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/account/identity/after_successful_update.json b/test/fixtures/cassettes/account/identity/after_successful_update.json deleted file mode 100644 index ccb2a92..0000000 --- a/test/fixtures/cassettes/account/identity/after_successful_update.json +++ /dev/null @@ -1 +0,0 @@ -{"http_interactions":[{"request":{"method":"delete","uri":"https://api.datasift.com/v1/account/identity/","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1 Ruby/v3.2.0.rc3"],"Authorization":[""],"Content-Type":["application/x-www-form-urlencoded"]}},"response":{"status":{"code":405,"message":"Method Not Allowed"},"headers":{"Server":["nginx"],"Date":["Wed, 13 May 2015 15:42:10 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1"],"P3p":["CP=\"CAO PSA\""],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6Ik1ldGhvZCBERUxFVEUgbm90IGFsbG93ZWQgZm9yIHRoaXMg\nZW5kcG9pbnQifQ==\n"},"http_version":null},"recorded_at":"Wed, 13 May 2015 15:42:10 GMT"},{"request":{"method":"delete","uri":"https://api.datasift.com/v1.1/account/identity/","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/x-www-form-urlencoded"]}},"response":{"status":{"code":405,"message":"Method Not Allowed"},"headers":{"Server":["nginx"],"Date":["Fri, 15 May 2015 09:08:17 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6Ik1ldGhvZCBERUxFVEUgbm90IGFsbG93ZWQgZm9yIHRoaXMg\nZW5kcG9pbnQifQ==\n"},"http_version":null},"recorded_at":"Fri, 15 May 2015 09:08:17 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/account/identity/before_get_success.json b/test/fixtures/cassettes/account/identity/before_get_success.json deleted file mode 100644 index 222bb2c..0000000 --- a/test/fixtures/cassettes/account/identity/before_get_success.json +++ /dev/null @@ -1 +0,0 @@ -{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1/account/identity","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1 Ruby/v3.2.0.rc3"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["53"]}},"response":{"status":{"code":409,"message":"Conflict"},"headers":{"Server":["nginx"],"Date":["Wed, 13 May 2015 15:42:09 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9985"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1431535329"],"X-Ratelimit-Reset-Ttl":["3600"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6IkFuIElkZW50aXR5IHdpdGggdGhhdCBsYWJlbCBhbHJlYWR5\nIGV4aXN0cyIsIm9yaWdpbmFsX2Vycm9yIjoiQ29uZmxpY3QgKDQwOSk6IHtc\nImVycm9yXCI6XCJBbiBJZGVudGl0eSB3aXRoIHRoYXQgbGFiZWwgYWxyZWFk\neSBleGlzdHNcIn0ifQ==\n"},"http_version":null},"recorded_at":"Wed, 13 May 2015 15:42:10 GMT"},{"request":{"method":"post","uri":"https://api.datasift.com/v1.1/account/identity","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["38"]}},"response":{"status":{"code":409,"message":"Conflict"},"headers":{"Server":["nginx"],"Date":["Fri, 15 May 2015 09:08:15 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9735"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1431684488"],"X-Ratelimit-Reset-Ttl":["3593"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6IkFuIElkZW50aXR5IHdpdGggdGhhdCBsYWJlbCBhbHJlYWR5\nIGV4aXN0cyIsIm9yaWdpbmFsX2Vycm9yIjoiQ29uZmxpY3QgKDQwOSk6IHtc\nImVycm9yXCI6XCJBbiBJZGVudGl0eSB3aXRoIHRoYXQgbGFiZWwgYWxyZWFk\neSBleGlzdHNcIn0ifQ==\n"},"http_version":null},"recorded_at":"Fri, 15 May 2015 09:08:16 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/account/identity/before_successful_delete.json b/test/fixtures/cassettes/account/identity/before_successful_delete.json deleted file mode 100644 index 021ea84..0000000 --- a/test/fixtures/cassettes/account/identity/before_successful_delete.json +++ /dev/null @@ -1 +0,0 @@ -{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1/account/identity","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1 Ruby/v3.2.0.rc3"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["53"]}},"response":{"status":{"code":409,"message":"Conflict"},"headers":{"Server":["nginx"],"Date":["Wed, 13 May 2015 15:42:09 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9990"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1431535329"],"X-Ratelimit-Reset-Ttl":["3600"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6IkFuIElkZW50aXR5IHdpdGggdGhhdCBsYWJlbCBhbHJlYWR5\nIGV4aXN0cyIsIm9yaWdpbmFsX2Vycm9yIjoiQ29uZmxpY3QgKDQwOSk6IHtc\nImVycm9yXCI6XCJBbiBJZGVudGl0eSB3aXRoIHRoYXQgbGFiZWwgYWxyZWFk\neSBleGlzdHNcIn0ifQ==\n"},"http_version":null},"recorded_at":"Wed, 13 May 2015 15:42:10 GMT"},{"request":{"method":"post","uri":"https://api.datasift.com/v1.1/account/identity","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["38"]}},"response":{"status":{"code":409,"message":"Conflict"},"headers":{"Server":["nginx"],"Date":["Fri, 15 May 2015 09:08:14 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9770"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1431684488"],"X-Ratelimit-Reset-Ttl":["3594"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6IkFuIElkZW50aXR5IHdpdGggdGhhdCBsYWJlbCBhbHJlYWR5\nIGV4aXN0cyIsIm9yaWdpbmFsX2Vycm9yIjoiQ29uZmxpY3QgKDQwOSk6IHtc\nImVycm9yXCI6XCJBbiBJZGVudGl0eSB3aXRoIHRoYXQgbGFiZWwgYWxyZWFk\neSBleGlzdHNcIn0ifQ==\n"},"http_version":null},"recorded_at":"Fri, 15 May 2015 09:08:14 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/account/identity/before_successful_update.json b/test/fixtures/cassettes/account/identity/before_successful_update.json deleted file mode 100644 index 9d84184..0000000 --- a/test/fixtures/cassettes/account/identity/before_successful_update.json +++ /dev/null @@ -1 +0,0 @@ -{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1/account/identity","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1 Ruby/v3.2.0.rc3"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["53"]}},"response":{"status":{"code":409,"message":"Conflict"},"headers":{"Server":["nginx"],"Date":["Wed, 13 May 2015 15:42:10 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9980"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1431535329"],"X-Ratelimit-Reset-Ttl":["3599"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6IkFuIElkZW50aXR5IHdpdGggdGhhdCBsYWJlbCBhbHJlYWR5\nIGV4aXN0cyIsIm9yaWdpbmFsX2Vycm9yIjoiQ29uZmxpY3QgKDQwOSk6IHtc\nImVycm9yXCI6XCJBbiBJZGVudGl0eSB3aXRoIHRoYXQgbGFiZWwgYWxyZWFk\neSBleGlzdHNcIn0ifQ==\n"},"http_version":null},"recorded_at":"Wed, 13 May 2015 15:42:10 GMT"},{"request":{"method":"post","uri":"https://api.datasift.com/v1.1/account/identity","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["38"]}},"response":{"status":{"code":409,"message":"Conflict"},"headers":{"Server":["nginx"],"Date":["Fri, 15 May 2015 09:08:17 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9705"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1431684488"],"X-Ratelimit-Reset-Ttl":["3591"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6IkFuIElkZW50aXR5IHdpdGggdGhhdCBsYWJlbCBhbHJlYWR5\nIGV4aXN0cyIsIm9yaWdpbmFsX2Vycm9yIjoiQ29uZmxpY3QgKDQwOSk6IHtc\nImVycm9yXCI6XCJBbiBJZGVudGl0eSB3aXRoIHRoYXQgbGFiZWwgYWxyZWFk\neSBleGlzdHNcIn0ifQ==\n"},"http_version":null},"recorded_at":"Fri, 15 May 2015 09:08:17 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/account/identity/create_success.json b/test/fixtures/cassettes/account/identity/create_success.json deleted file mode 100644 index b1a2cad..0000000 --- a/test/fixtures/cassettes/account/identity/create_success.json +++ /dev/null @@ -1 +0,0 @@ -{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1/account/identity","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1 Ruby/v3.2.0.rc3"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["53"]}},"response":{"status":{"code":201,"message":"Created"},"headers":{"Server":["nginx"],"Date":["Wed, 13 May 2015 15:42:09 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["10000"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1431535329"],"X-Ratelimit-Reset-Ttl":["3600"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2587"]},"body":{"encoding":"UTF-8","base64_string":"eyJpZCI6ImI5NjQ2Nzg4NTQ3ZWFhZmU5OTYzOTExYzJlY2QwMTQzIiwibGFi\nZWwiOiJtaW5pdGVzdCIsImFwaV9rZXkiOiJjYmM3ZGM2ZjY5OWYwZWY3MWRm\nZDJjMTQ0OTMxOTc4YSIsInN0YXR1cyI6ImFjdGl2ZSIsIm1hc3RlciI6ZmFs\nc2UsImNyZWF0ZWRfYXQiOjE0MzE1MzE3MjksInVwZGF0ZWRfYXQiOjE0MzE1\nMzE3MjksImV4cGlyZXNfYXQiOm51bGx9\n"},"http_version":null},"recorded_at":"Wed, 13 May 2015 15:42:09 GMT"},{"request":{"method":"post","uri":"https://api.datasift.com/v1.1/account/identity","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["53"]}},"response":{"status":{"code":409,"message":"Conflict"},"headers":{"Server":["nginx"],"Date":["Fri, 15 May 2015 09:08:08 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["10000"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1431684488"],"X-Ratelimit-Reset-Ttl":["3600"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6IkFuIElkZW50aXR5IHdpdGggdGhhdCBsYWJlbCBhbHJlYWR5\nIGV4aXN0cyIsIm9yaWdpbmFsX2Vycm9yIjoiQ29uZmxpY3QgKDQwOSk6IHtc\nImVycm9yXCI6XCJBbiBJZGVudGl0eSB3aXRoIHRoYXQgbGFiZWwgYWxyZWFk\neSBleGlzdHNcIn0ifQ==\n"},"http_version":null},"recorded_at":"Fri, 15 May 2015 09:08:09 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/account/identity/limit/after_create_success.json b/test/fixtures/cassettes/account/identity/limit/after_create_success.json deleted file mode 100644 index c2e92a6..0000000 --- a/test/fixtures/cassettes/account/identity/limit/after_create_success.json +++ /dev/null @@ -1 +0,0 @@ -{"http_interactions":[{"request":{"method":"delete","uri":"https://api.datasift.com/v1.1/account/identity/","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/x-www-form-urlencoded"]}},"response":{"status":{"code":405,"message":"Method Not Allowed"},"headers":{"Server":["nginx"],"Date":["Fri, 15 May 2015 09:08:17 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6Ik1ldGhvZCBERUxFVEUgbm90IGFsbG93ZWQgZm9yIHRoaXMg\nZW5kcG9pbnQifQ==\n"},"http_version":null},"recorded_at":"Fri, 15 May 2015 09:08:17 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/account/identity/limit/after_delete.json b/test/fixtures/cassettes/account/identity/limit/after_delete.json deleted file mode 100644 index d29bf2c..0000000 --- a/test/fixtures/cassettes/account/identity/limit/after_delete.json +++ /dev/null @@ -1 +0,0 @@ -{"http_interactions":[{"request":{"method":"delete","uri":"https://api.datasift.com/v1.1/account/identity/","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/x-www-form-urlencoded"]}},"response":{"status":{"code":405,"message":"Method Not Allowed"},"headers":{"Server":["nginx"],"Date":["Fri, 15 May 2015 09:08:08 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6Ik1ldGhvZCBERUxFVEUgbm90IGFsbG93ZWQgZm9yIHRoaXMg\nZW5kcG9pbnQifQ==\n"},"http_version":null},"recorded_at":"Fri, 15 May 2015 09:08:09 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/account/identity/limit/after_get_success.json b/test/fixtures/cassettes/account/identity/limit/after_get_success.json deleted file mode 100644 index a0dafa0..0000000 --- a/test/fixtures/cassettes/account/identity/limit/after_get_success.json +++ /dev/null @@ -1 +0,0 @@ -{"http_interactions":[{"request":{"method":"delete","uri":"https://api.datasift.com/v1.1/account/identity/","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/x-www-form-urlencoded"]}},"response":{"status":{"code":405,"message":"Method Not Allowed"},"headers":{"Server":["nginx"],"Date":["Fri, 15 May 2015 09:08:14 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6Ik1ldGhvZCBERUxFVEUgbm90IGFsbG93ZWQgZm9yIHRoaXMg\nZW5kcG9pbnQifQ==\n"},"http_version":null},"recorded_at":"Fri, 15 May 2015 09:08:15 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/account/identity/limit/after_successful_update.json b/test/fixtures/cassettes/account/identity/limit/after_successful_update.json deleted file mode 100644 index e15f2fe..0000000 --- a/test/fixtures/cassettes/account/identity/limit/after_successful_update.json +++ /dev/null @@ -1 +0,0 @@ -{"http_interactions":[{"request":{"method":"delete","uri":"https://api.datasift.com/v1.1/account/identity/","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/x-www-form-urlencoded"]}},"response":{"status":{"code":405,"message":"Method Not Allowed"},"headers":{"Server":["nginx"],"Date":["Fri, 15 May 2015 09:08:12 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6Ik1ldGhvZCBERUxFVEUgbm90IGFsbG93ZWQgZm9yIHRoaXMg\nZW5kcG9pbnQifQ==\n"},"http_version":null},"recorded_at":"Fri, 15 May 2015 09:08:13 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/account/identity/limit/before_create_success.json b/test/fixtures/cassettes/account/identity/limit/before_create_success.json deleted file mode 100644 index 87d888e..0000000 --- a/test/fixtures/cassettes/account/identity/limit/before_create_success.json +++ /dev/null @@ -1 +0,0 @@ -{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.1/account/identity","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["38"]}},"response":{"status":{"code":409,"message":"Conflict"},"headers":{"Server":["nginx"],"Date":["Fri, 15 May 2015 09:08:16 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9710"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1431684488"],"X-Ratelimit-Reset-Ttl":["3592"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6IkFuIElkZW50aXR5IHdpdGggdGhhdCBsYWJlbCBhbHJlYWR5\nIGV4aXN0cyIsIm9yaWdpbmFsX2Vycm9yIjoiQ29uZmxpY3QgKDQwOSk6IHtc\nImVycm9yXCI6XCJBbiBJZGVudGl0eSB3aXRoIHRoYXQgbGFiZWwgYWxyZWFk\neSBleGlzdHNcIn0ifQ==\n"},"http_version":null},"recorded_at":"Fri, 15 May 2015 09:08:17 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/account/identity/limit/before_delete.json b/test/fixtures/cassettes/account/identity/limit/before_delete.json deleted file mode 100644 index 47aa818..0000000 --- a/test/fixtures/cassettes/account/identity/limit/before_delete.json +++ /dev/null @@ -1 +0,0 @@ -{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.1/account/identity","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["38"]}},"response":{"status":{"code":409,"message":"Conflict"},"headers":{"Server":["nginx"],"Date":["Fri, 15 May 2015 09:08:08 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9965"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1431684488"],"X-Ratelimit-Reset-Ttl":["3600"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6IkFuIElkZW50aXR5IHdpdGggdGhhdCBsYWJlbCBhbHJlYWR5\nIGV4aXN0cyIsIm9yaWdpbmFsX2Vycm9yIjoiQ29uZmxpY3QgKDQwOSk6IHtc\nImVycm9yXCI6XCJBbiBJZGVudGl0eSB3aXRoIHRoYXQgbGFiZWwgYWxyZWFk\neSBleGlzdHNcIn0ifQ==\n"},"http_version":null},"recorded_at":"Fri, 15 May 2015 09:08:09 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/account/identity/limit/before_get_success.json b/test/fixtures/cassettes/account/identity/limit/before_get_success.json deleted file mode 100644 index fef644d..0000000 --- a/test/fixtures/cassettes/account/identity/limit/before_get_success.json +++ /dev/null @@ -1 +0,0 @@ -{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.1/account/identity","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["38"]}},"response":{"status":{"code":409,"message":"Conflict"},"headers":{"Server":["nginx"],"Date":["Fri, 15 May 2015 09:08:14 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9750"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1431684488"],"X-Ratelimit-Reset-Ttl":["3594"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6IkFuIElkZW50aXR5IHdpdGggdGhhdCBsYWJlbCBhbHJlYWR5\nIGV4aXN0cyIsIm9yaWdpbmFsX2Vycm9yIjoiQ29uZmxpY3QgKDQwOSk6IHtc\nImVycm9yXCI6XCJBbiBJZGVudGl0eSB3aXRoIHRoYXQgbGFiZWwgYWxyZWFk\neSBleGlzdHNcIn0ifQ==\n"},"http_version":null},"recorded_at":"Fri, 15 May 2015 09:08:15 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/account/identity/limit/before_successful_update.json b/test/fixtures/cassettes/account/identity/limit/before_successful_update.json deleted file mode 100644 index 8fd0c62..0000000 --- a/test/fixtures/cassettes/account/identity/limit/before_successful_update.json +++ /dev/null @@ -1 +0,0 @@ -{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.1/account/identity","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["38"]}},"response":{"status":{"code":409,"message":"Conflict"},"headers":{"Server":["nginx"],"Date":["Fri, 15 May 2015 09:08:12 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9855"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1431684488"],"X-Ratelimit-Reset-Ttl":["3596"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6IkFuIElkZW50aXR5IHdpdGggdGhhdCBsYWJlbCBhbHJlYWR5\nIGV4aXN0cyIsIm9yaWdpbmFsX2Vycm9yIjoiQ29uZmxpY3QgKDQwOSk6IHtc\nImVycm9yXCI6XCJBbiBJZGVudGl0eSB3aXRoIHRoYXQgbGFiZWwgYWxyZWFk\neSBleGlzdHNcIn0ifQ==\n"},"http_version":null},"recorded_at":"Fri, 15 May 2015 09:08:13 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/account/identity/limit/get_failure_invalid_identity.json b/test/fixtures/cassettes/account/identity/limit/get_failure_invalid_identity.json deleted file mode 100644 index 47f17cf..0000000 --- a/test/fixtures/cassettes/account/identity/limit/get_failure_invalid_identity.json +++ /dev/null @@ -1 +0,0 @@ -{"http_interactions":[{"request":{"method":"get","uri":"https://api.datasift.com/v1.1/account/identity/INVALID_IDENTITY_ID/limit/facebook","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/x-www-form-urlencoded"]}},"response":{"status":{"code":400,"message":"Bad Request"},"headers":{"Server":["nginx"],"Date":["Fri, 15 May 2015 09:08:13 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9810"],"X-Ratelimit-Cost":["25"],"X-Ratelimit-Reset":["1431684488"],"X-Ratelimit-Reset-Ttl":["3595"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6ImlkZW50aXR5X2lkIG11c3QgYmUgYSB2YWxpZCBoYXNoIn0=\n"},"http_version":null},"recorded_at":"Fri, 15 May 2015 09:08:14 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/account/identity/token/after_create_success.json b/test/fixtures/cassettes/account/identity/token/after_create_success.json deleted file mode 100644 index 03ab253..0000000 --- a/test/fixtures/cassettes/account/identity/token/after_create_success.json +++ /dev/null @@ -1 +0,0 @@ -{"http_interactions":[{"request":{"method":"delete","uri":"https://api.datasift.com/v1.1/account/identity/","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/x-www-form-urlencoded"]}},"response":{"status":{"code":405,"message":"Method Not Allowed"},"headers":{"Server":["nginx"],"Date":["Fri, 15 May 2015 09:08:11 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6Ik1ldGhvZCBERUxFVEUgbm90IGFsbG93ZWQgZm9yIHRoaXMg\nZW5kcG9pbnQifQ==\n"},"http_version":null},"recorded_at":"Fri, 15 May 2015 09:08:12 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/account/identity/token/after_delete.json b/test/fixtures/cassettes/account/identity/token/after_delete.json deleted file mode 100644 index 5792d2d..0000000 --- a/test/fixtures/cassettes/account/identity/token/after_delete.json +++ /dev/null @@ -1 +0,0 @@ -{"http_interactions":[{"request":{"method":"delete","uri":"https://api.datasift.com/v1.1/account/identity/","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/x-www-form-urlencoded"]}},"response":{"status":{"code":405,"message":"Method Not Allowed"},"headers":{"Server":["nginx"],"Date":["Fri, 15 May 2015 09:08:13 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6Ik1ldGhvZCBERUxFVEUgbm90IGFsbG93ZWQgZm9yIHRoaXMg\nZW5kcG9pbnQifQ==\n"},"http_version":null},"recorded_at":"Fri, 15 May 2015 09:08:14 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/account/identity/token/after_get_success.json b/test/fixtures/cassettes/account/identity/token/after_get_success.json deleted file mode 100644 index e15f2fe..0000000 --- a/test/fixtures/cassettes/account/identity/token/after_get_success.json +++ /dev/null @@ -1 +0,0 @@ -{"http_interactions":[{"request":{"method":"delete","uri":"https://api.datasift.com/v1.1/account/identity/","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/x-www-form-urlencoded"]}},"response":{"status":{"code":405,"message":"Method Not Allowed"},"headers":{"Server":["nginx"],"Date":["Fri, 15 May 2015 09:08:12 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6Ik1ldGhvZCBERUxFVEUgbm90IGFsbG93ZWQgZm9yIHRoaXMg\nZW5kcG9pbnQifQ==\n"},"http_version":null},"recorded_at":"Fri, 15 May 2015 09:08:13 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/account/identity/token/after_successful_update.json b/test/fixtures/cassettes/account/identity/token/after_successful_update.json deleted file mode 100644 index bc4fc36..0000000 --- a/test/fixtures/cassettes/account/identity/token/after_successful_update.json +++ /dev/null @@ -1 +0,0 @@ -{"http_interactions":[{"request":{"method":"delete","uri":"https://api.datasift.com/v1.1/account/identity/","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/x-www-form-urlencoded"]}},"response":{"status":{"code":405,"message":"Method Not Allowed"},"headers":{"Server":["nginx"],"Date":["Fri, 15 May 2015 09:08:16 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6Ik1ldGhvZCBERUxFVEUgbm90IGFsbG93ZWQgZm9yIHRoaXMg\nZW5kcG9pbnQifQ==\n"},"http_version":null},"recorded_at":"Fri, 15 May 2015 09:08:17 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/account/identity/token/before_create_success.json b/test/fixtures/cassettes/account/identity/token/before_create_success.json deleted file mode 100644 index d714668..0000000 --- a/test/fixtures/cassettes/account/identity/token/before_create_success.json +++ /dev/null @@ -1 +0,0 @@ -{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.1/account/identity","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["38"]}},"response":{"status":{"code":409,"message":"Conflict"},"headers":{"Server":["nginx"],"Date":["Fri, 15 May 2015 09:08:11 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9865"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1431684488"],"X-Ratelimit-Reset-Ttl":["3597"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6IkFuIElkZW50aXR5IHdpdGggdGhhdCBsYWJlbCBhbHJlYWR5\nIGV4aXN0cyIsIm9yaWdpbmFsX2Vycm9yIjoiQ29uZmxpY3QgKDQwOSk6IHtc\nImVycm9yXCI6XCJBbiBJZGVudGl0eSB3aXRoIHRoYXQgbGFiZWwgYWxyZWFk\neSBleGlzdHNcIn0ifQ==\n"},"http_version":null},"recorded_at":"Fri, 15 May 2015 09:08:12 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/account/identity/token/before_delete.json b/test/fixtures/cassettes/account/identity/token/before_delete.json deleted file mode 100644 index d90c9b9..0000000 --- a/test/fixtures/cassettes/account/identity/token/before_delete.json +++ /dev/null @@ -1 +0,0 @@ -{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.1/account/identity","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["38"]}},"response":{"status":{"code":409,"message":"Conflict"},"headers":{"Server":["nginx"],"Date":["Fri, 15 May 2015 09:08:13 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9835"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1431684488"],"X-Ratelimit-Reset-Ttl":["3595"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6IkFuIElkZW50aXR5IHdpdGggdGhhdCBsYWJlbCBhbHJlYWR5\nIGV4aXN0cyIsIm9yaWdpbmFsX2Vycm9yIjoiQ29uZmxpY3QgKDQwOSk6IHtc\nImVycm9yXCI6XCJBbiBJZGVudGl0eSB3aXRoIHRoYXQgbGFiZWwgYWxyZWFk\neSBleGlzdHNcIn0ifQ==\n"},"http_version":null},"recorded_at":"Fri, 15 May 2015 09:08:14 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/account/identity/token/before_get_success.json b/test/fixtures/cassettes/account/identity/token/before_get_success.json deleted file mode 100644 index edd8a82..0000000 --- a/test/fixtures/cassettes/account/identity/token/before_get_success.json +++ /dev/null @@ -1 +0,0 @@ -{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.1/account/identity","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["38"]}},"response":{"status":{"code":409,"message":"Conflict"},"headers":{"Server":["nginx"],"Date":["Fri, 15 May 2015 09:08:12 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9860"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1431684488"],"X-Ratelimit-Reset-Ttl":["3596"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6IkFuIElkZW50aXR5IHdpdGggdGhhdCBsYWJlbCBhbHJlYWR5\nIGV4aXN0cyIsIm9yaWdpbmFsX2Vycm9yIjoiQ29uZmxpY3QgKDQwOSk6IHtc\nImVycm9yXCI6XCJBbiBJZGVudGl0eSB3aXRoIHRoYXQgbGFiZWwgYWxyZWFk\neSBleGlzdHNcIn0ifQ==\n"},"http_version":null},"recorded_at":"Fri, 15 May 2015 09:08:12 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/account/identity/token/before_successful_update.json b/test/fixtures/cassettes/account/identity/token/before_successful_update.json deleted file mode 100644 index 88c6d09..0000000 --- a/test/fixtures/cassettes/account/identity/token/before_successful_update.json +++ /dev/null @@ -1 +0,0 @@ -{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.1/account/identity","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["38"]}},"response":{"status":{"code":409,"message":"Conflict"},"headers":{"Server":["nginx"],"Date":["Fri, 15 May 2015 09:08:16 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9720"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1431684488"],"X-Ratelimit-Reset-Ttl":["3592"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6IkFuIElkZW50aXR5IHdpdGggdGhhdCBsYWJlbCBhbHJlYWR5\nIGV4aXN0cyIsIm9yaWdpbmFsX2Vycm9yIjoiQ29uZmxpY3QgKDQwOSk6IHtc\nImVycm9yXCI6XCJBbiBJZGVudGl0eSB3aXRoIHRoYXQgbGFiZWwgYWxyZWFk\neSBleGlzdHNcIn0ifQ==\n"},"http_version":null},"recorded_at":"Fri, 15 May 2015 09:08:17 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/account/identity/token/get_failure_invalid_identity.json b/test/fixtures/cassettes/account/identity/token/get_failure_invalid_identity.json deleted file mode 100644 index a616ecd..0000000 --- a/test/fixtures/cassettes/account/identity/token/get_failure_invalid_identity.json +++ /dev/null @@ -1 +0,0 @@ -{"http_interactions":[{"request":{"method":"get","uri":"https://api.datasift.com/v1.1/account/identity/INVALID_IDENTITY_ID/token/facebook","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/x-www-form-urlencoded"]}},"response":{"status":{"code":400,"message":"Bad Request"},"headers":{"Server":["nginx"],"Date":["Fri, 15 May 2015 09:08:13 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9840"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1431684488"],"X-Ratelimit-Reset-Ttl":["3595"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6ImlkZW50aXR5X2lkIG11c3QgYmUgYSB2YWxpZCBoYXNoIn0=\n"},"http_version":null},"recorded_at":"Fri, 15 May 2015 09:08:14 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/account/identity/update_id_404.json b/test/fixtures/cassettes/account/identity/update_id_404.json deleted file mode 100644 index 00f917c..0000000 --- a/test/fixtures/cassettes/account/identity/update_id_404.json +++ /dev/null @@ -1 +0,0 @@ -{"http_interactions":[{"request":{"method":"put","uri":"https://api.datasift.com/v1.1/account/identity/fake_id","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["60"]}},"response":{"status":{"code":404,"message":"Not Found"},"headers":{"Server":["nginx"],"Date":["Fri, 15 May 2015 09:08:16 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9715"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1431684488"],"X-Ratelimit-Reset-Ttl":["3592"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6IklkZW50aXR5IG5vdCBmb3VuZCJ9\n"},"http_version":null},"recorded_at":"Fri, 15 May 2015 09:08:17 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file From 1f0c9fc2f90c7e8577a0ab4a66538ef5105b95df Mon Sep 17 00:00:00 2001 From: Jason Dugdale Date: Thu, 12 Nov 2015 10:54:06 +0000 Subject: [PATCH 10/14] Adds an example for the /pylon/sample API endpoint --- examples/pylon_eg.rb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/examples/pylon_eg.rb b/examples/pylon_eg.rb index d09f20e..16bd6ac 100644 --- a/examples/pylon_eg.rb +++ b/examples/pylon_eg.rb @@ -138,11 +138,20 @@ def run_analysis puts "\nTags analysis" puts @datasift.pylon.tags(hash)[:data].to_json + puts "\nGet Public Posts" + puts @datasift.pylon.sample( + hash, + 10, + Time.now.to_i - (60 * 60), # from 1hr ago + Time.now.to_i, # to 'now' + 'fb.content contains_any "your, filter, terms"' + )[:data].to_json + puts "\nStop recording filter with hash #{hash}" puts @datasift.pylon.stop(hash)[:data].to_json rescue DataSiftError => dse - puts dse.to_s + puts dse.inspect end end end From 71ddc474049e668b7991a4fdca44eccd1832f2e6 Mon Sep 17 00:00:00 2001 From: Jason Dugdale Date: Thu, 12 Nov 2015 10:55:14 +0000 Subject: [PATCH 11/14] Bump to v.3.5.0 --- CHANGELOG.md | 1 + VERSION | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 44f0b26..b119903 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ CHANGELOG ### Added * Support for the [/account/usage](http://dev.datasift.com/pylon/docs/api/acct-api-endpoints/get-accountusage) API endpoint * Added explicit support for 412, 415, 503 and 504 HTTP error responses +* Support for the [/pylon/sample](http://dev.datasift.com/pylon/docs/api/pylon-api-endpoints/pylonsample) API endpoint. Full details about the feature can be found in our [platform release notes]() ### Changed * Only set ```Content-Type``` HTTP header for POST/PUT requests; it's not necessary unless we are passing a request entity diff --git a/VERSION b/VERSION index fbcbf73..e5b8203 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.4.0 \ No newline at end of file +3.5.0 \ No newline at end of file From 6db493398405262cfffb1094e7dbafcb7b65feed Mon Sep 17 00:00:00 2001 From: Jason Dugdale Date: Fri, 13 Nov 2015 14:41:10 +0000 Subject: [PATCH 12/14] Resolve merge conflicts + update VCR test fixtures --- test/datasift/account/account_api_test.rb | 35 +++++++++++++++++++ .../cassettes/account/usage/default.json | 2 +- .../cassettes/account/usage/invalid.json | 2 +- .../cassettes/account/usage/valid_params.json | 2 +- .../cassettes/core/after_historic_dpu.json | 2 +- test/fixtures/cassettes/core/balance_get.json | 2 +- test/fixtures/cassettes/core/before_dpu.json | 2 +- .../cassettes/core/before_historic_dpu.json | 2 +- .../cassettes/core/compile_success.json | 2 +- .../fixtures/cassettes/core/dpu_get_cost.json | 2 +- .../cassettes/core/dpu_throw_badrequest.json | 2 +- .../fixtures/cassettes/core/historic_dpu.json | 2 +- .../cassettes/core/usage_success.json | 2 +- .../cassettes/core/validate_invalid_hash.json | 2 +- .../cassettes/core/validate_success_bool.json | 2 +- .../cassettes/core/validate_success_hash.json | 2 +- .../cassettes/odp/batch/after_upload.json | 2 +- .../cassettes/odp/batch/before_upload.json | 2 +- .../odp/batch/upload_failure_no_source.json | 2 +- .../cassettes/odp/batch/upload_success.json | 2 +- .../preview/before_preview_create.json | 2 +- .../cassettes/preview/before_preview_get.json | 2 +- .../preview/preview_create_success.json | 2 +- .../preview/preview_get_success.json | 2 +- .../cassettes/push/after_push_create.json | 2 +- .../cassettes/push/after_push_get.json | 2 +- .../cassettes/push/after_push_log.json | 2 +- .../cassettes/push/after_push_pause.json | 2 +- .../cassettes/push/after_push_resume.json | 2 +- .../cassettes/push/after_push_stop.json | 2 +- .../cassettes/push/after_push_update.json | 2 +- .../cassettes/push/before_push_create.json | 2 +- .../cassettes/push/before_push_delete.json | 2 +- .../cassettes/push/before_push_get.json | 2 +- .../cassettes/push/before_push_log.json | 2 +- .../cassettes/push/before_push_pause.json | 2 +- .../cassettes/push/before_push_resume.json | 2 +- .../cassettes/push/before_push_stop.json | 2 +- .../cassettes/push/before_push_update.json | 2 +- test/fixtures/cassettes/push/push_create.json | 2 +- test/fixtures/cassettes/push/push_delete.json | 2 +- .../cassettes/push/push_get_by_id.json | 2 +- .../cassettes/push/push_log_with_id.json | 2 +- test/fixtures/cassettes/push/push_pause.json | 2 +- test/fixtures/cassettes/push/push_resume.json | 2 +- test/fixtures/cassettes/push/push_stop.json | 2 +- test/fixtures/cassettes/push/push_update.json | 2 +- .../cassettes/push/push_validate.json | 2 +- 48 files changed, 82 insertions(+), 47 deletions(-) create mode 100644 test/datasift/account/account_api_test.rb diff --git a/test/datasift/account/account_api_test.rb b/test/datasift/account/account_api_test.rb new file mode 100644 index 0000000..7f48865 --- /dev/null +++ b/test/datasift/account/account_api_test.rb @@ -0,0 +1,35 @@ +require File.expand_path('../../../test_helper', __FILE__) + +describe 'DataSift::Account' do + before do + auth = DataSiftExample.new + @datasift = auth.datasift + end + + ## + # Account Usage + # + describe '#usage' do + it 'can get account usage using default params' do + VCR.use_cassette('account/usage/default') do + response = @datasift.account.usage + assert_equal STATUS.valid, response[:http][:status] + end + end + + it 'can get account usage using valid params' do + VCR.use_cassette('account/usage/valid_params') do + response = @datasift.account.usage('monthly') + assert_equal STATUS.valid, response[:http][:status] + end + end + + it 'handles 400 when using invalid params' do + VCR.use_cassette('account/usage/invalid') do + assert_raises BadRequestError do + @datasift.account.usage('invalid_period') + end + end + end + end +end diff --git a/test/fixtures/cassettes/account/usage/default.json b/test/fixtures/cassettes/account/usage/default.json index f484b94..4921485 100644 --- a/test/fixtures/cassettes/account/usage/default.json +++ b/test/fixtures/cassettes/account/usage/default.json @@ -1 +1 @@ -{"http_interactions":[{"request":{"method":"get","uri":"https://api.datasift.com/v1.2/account/usage","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.5.0"],"Authorization":[""]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Wed, 07 Oct 2015 15:14:21 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9433"],"X-Ratelimit-Cost":["25"],"X-Ratelimit-Reset":["1444231382"],"X-Ratelimit-Reset-Ttl":["521"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2587"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"W10=\n"},"http_version":null},"recorded_at":"Wed, 07 Oct 2015 15:14:23 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file +{"http_interactions":[{"request":{"method":"get","uri":"https://api.datasift.com/v1.2/account/usage","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.5.0"],"Authorization":[""]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 12 Nov 2015 10:59:44 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9629"],"X-Ratelimit-Cost":["25"],"X-Ratelimit-Reset":["1447329263"],"X-Ratelimit-Reset-Ttl":["3279"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"Access-Control-Allow-Methods":["GET,POST,PUT,DELETE"],"X-Served-By":["ded2587"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJ1c2FnZSI6W3sicXVhbnRpdHkiOjAsImNvc3QiOjAsImNhdGVnb3J5Ijoi\nbWFuYWdlZF9zb3VyY2VzIiwidW5pdCI6ImRwdSIsInNvdXJjZSI6ImZhY2Vi\nb29rX3BhZ2VzIiwidGltZXN0YW1wIjoxNDQ3MzIyNDAwfSx7InF1YW50aXR5\nIjowLjIyNDkxLCJjb3N0IjowLCJjYXRlZ29yeSI6InJlYWx0aW1lIiwidW5p\ndCI6ImRwdSIsInNvdXJjZSI6IiIsInRpbWVzdGFtcCI6MTQ0NzMyMjQwMH1d\nfQ==\n"},"http_version":null},"recorded_at":"Thu, 12 Nov 2015 10:59:44 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/account/usage/invalid.json b/test/fixtures/cassettes/account/usage/invalid.json index 9b5e3ba..f67017d 100644 --- a/test/fixtures/cassettes/account/usage/invalid.json +++ b/test/fixtures/cassettes/account/usage/invalid.json @@ -1 +1 @@ -{"http_interactions":[{"request":{"method":"get","uri":"https://api.datasift.com/v1.2/account/usage?period=invalid_period","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.5.0"],"Authorization":[""]}},"response":{"status":{"code":400,"message":"Bad Request"},"headers":{"Server":["nginx"],"Date":["Wed, 07 Oct 2015 15:14:22 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9383"],"X-Ratelimit-Cost":["25"],"X-Ratelimit-Reset":["1444231382"],"X-Ratelimit-Reset-Ttl":["520"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6InBlcmlvZCBpcyBpbnZhbGlkOyB2YWxpZCB2YWx1ZXMgYXJl\nOiBob3VybHksZGFpbHksbW9udGhseSJ9\n"},"http_version":null},"recorded_at":"Wed, 07 Oct 2015 15:14:24 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file +{"http_interactions":[{"request":{"method":"get","uri":"https://api.datasift.com/v1.2/account/usage?period=invalid_period","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.5.0"],"Authorization":[""]}},"response":{"status":{"code":400,"message":"Bad Request"},"headers":{"Server":["nginx"],"Date":["Thu, 12 Nov 2015 10:59:44 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9579"],"X-Ratelimit-Cost":["25"],"X-Ratelimit-Reset":["1447329263"],"X-Ratelimit-Reset-Ttl":["3279"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"Access-Control-Allow-Methods":["GET,POST,PUT,DELETE"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6InBlcmlvZCBpcyBpbnZhbGlkOyB2YWxpZCB2YWx1ZXMgYXJl\nOiBob3VybHksZGFpbHksbW9udGhseSJ9\n"},"http_version":null},"recorded_at":"Thu, 12 Nov 2015 10:59:44 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/account/usage/valid_params.json b/test/fixtures/cassettes/account/usage/valid_params.json index d6d42d1..fd67383 100644 --- a/test/fixtures/cassettes/account/usage/valid_params.json +++ b/test/fixtures/cassettes/account/usage/valid_params.json @@ -1 +1 @@ -{"http_interactions":[{"request":{"method":"get","uri":"https://api.datasift.com/v1.2/account/usage?period=monthly","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.5.0"],"Authorization":[""]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Wed, 07 Oct 2015 15:14:21 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9408"],"X-Ratelimit-Cost":["25"],"X-Ratelimit-Reset":["1444231382"],"X-Ratelimit-Reset-Ttl":["521"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2584"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJ1c2FnZSI6W3sicXVhbnRpdHkiOjIyLCJjb3N0IjowLCJjYXRlZ29yeSI6\nImhpc3RvcmljcHJldmlldyIsInVuaXQiOiJkcHUiLCJzb3VyY2UiOiIiLCJ0\naW1lc3RhbXAiOjE0NDM2NTc2MDB9LHsicXVhbnRpdHkiOjYuNDUwNDgsImNv\nc3QiOjAsImNhdGVnb3J5IjoibWFuYWdlZF9zb3VyY2VzIiwidW5pdCI6ImRw\ndSIsInNvdXJjZSI6ImZhY2Vib29rX3BhZ2VzIiwidGltZXN0YW1wIjoxNDQz\nNjU3NjAwfSx7InF1YW50aXR5IjoxMC4xNzc0OCwiY29zdCI6MCwiY2F0ZWdv\ncnkiOiJyZWFsdGltZSIsInVuaXQiOiJkcHUiLCJzb3VyY2UiOiIiLCJ0aW1l\nc3RhbXAiOjE0NDM2NTc2MDB9XX0=\n"},"http_version":null},"recorded_at":"Wed, 07 Oct 2015 15:14:23 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file +{"http_interactions":[{"request":{"method":"get","uri":"https://api.datasift.com/v1.2/account/usage?period=monthly","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.5.0"],"Authorization":[""]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 12 Nov 2015 10:59:44 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9604"],"X-Ratelimit-Cost":["25"],"X-Ratelimit-Reset":["1447329263"],"X-Ratelimit-Reset-Ttl":["3279"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"Access-Control-Allow-Methods":["GET,POST,PUT,DELETE"],"X-Served-By":["ded2584"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJ1c2FnZSI6W3sicXVhbnRpdHkiOjExLjUxMzc2LCJjb3N0IjowLCJjYXRl\nZ29yeSI6Im1hbmFnZWRfc291cmNlcyIsInVuaXQiOiJkcHUiLCJzb3VyY2Ui\nOiJmYWNlYm9va19wYWdlcyIsInRpbWVzdGFtcCI6MTQ0NjMzNjAwMH0seyJx\ndWFudGl0eSI6MzUxNy45MzM0MiwiY29zdCI6MCwiY2F0ZWdvcnkiOiJtYW5h\nZ2VkX3NvdXJjZXMiLCJ1bml0IjoiZHB1Iiwic291cmNlIjoiaW5zdGFncmFt\nIiwidGltZXN0YW1wIjoxNDQ2MzM2MDAwfSx7InF1YW50aXR5Ijo3OC43NjE4\nOSwiY29zdCI6MCwiY2F0ZWdvcnkiOiJyZWFsdGltZSIsInVuaXQiOiJkcHUi\nLCJzb3VyY2UiOiIiLCJ0aW1lc3RhbXAiOjE0NDYzMzYwMDB9XX0=\n"},"http_version":null},"recorded_at":"Thu, 12 Nov 2015 10:59:44 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/core/after_historic_dpu.json b/test/fixtures/cassettes/core/after_historic_dpu.json index 4e9d26b..25e92d5 100644 --- a/test/fixtures/cassettes/core/after_historic_dpu.json +++ b/test/fixtures/cassettes/core/after_historic_dpu.json @@ -1 +1 @@ -{"http_interactions":[{"request":{"method":"delete","uri":"https://api.datasift.com/v1.2/historics/delete?id=d5de7feebc6813c53dd2","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/x-www-form-urlencoded"]}},"response":{"status":{"code":204,"message":"No Content"},"headers":{"Server":["nginx"],"Date":["Wed, 01 Jul 2015 15:36:13 GMT"],"Content-Type":["text/html"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9602"],"X-Ratelimit-Cost":["25"],"X-Ratelimit-Reset":["1435765382"],"X-Ratelimit-Reset-Ttl":["409"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2587"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":""},"http_version":null},"recorded_at":"Wed, 01 Jul 2015 15:36:14 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file +{"http_interactions":[{"request":{"method":"delete","uri":"https://api.datasift.com/v1.2/historics/delete?id=40f55f9c8afe0f793003","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.5.0"],"Authorization":[""]}},"response":{"status":{"code":204,"message":"No Content"},"headers":{"Server":["nginx"],"Date":["Thu, 12 Nov 2015 10:59:29 GMT"],"Content-Type":["text/html"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9889"],"X-Ratelimit-Cost":["25"],"X-Ratelimit-Reset":["1447329263"],"X-Ratelimit-Reset-Ttl":["3294"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"Access-Control-Allow-Methods":["GET,POST,PUT,DELETE"],"X-Served-By":["ded2584"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":""},"http_version":null},"recorded_at":"Thu, 12 Nov 2015 10:59:29 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/core/balance_get.json b/test/fixtures/cassettes/core/balance_get.json index 3afa839..2a09066 100644 --- a/test/fixtures/cassettes/core/balance_get.json +++ b/test/fixtures/cassettes/core/balance_get.json @@ -1 +1 @@ -{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/balance","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["2"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Wed, 01 Jul 2015 15:36:12 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9662"],"X-Ratelimit-Cost":["25"],"X-Ratelimit-Reset":["1435765382"],"X-Ratelimit-Reset-Ttl":["410"],"X-Cache-Control":["max-age=300, must-revalidate"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2587"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"e30=\n"},"http_version":null},"recorded_at":"Wed, 01 Jul 2015 15:36:13 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file +{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/balance","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.5.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["2"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 12 Nov 2015 10:59:28 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9949"],"X-Ratelimit-Cost":["25"],"X-Ratelimit-Reset":["1447329263"],"X-Ratelimit-Reset-Ttl":["3295"],"X-Cache-Control":["max-age=300, must-revalidate"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"Access-Control-Allow-Methods":["GET,POST,PUT,DELETE"],"X-Served-By":["ded2584"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"e30=\n"},"http_version":null},"recorded_at":"Thu, 12 Nov 2015 10:59:28 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/core/before_dpu.json b/test/fixtures/cassettes/core/before_dpu.json index 7e889ac..f07ef0e 100644 --- a/test/fixtures/cassettes/core/before_dpu.json +++ b/test/fixtures/cassettes/core/before_dpu.json @@ -1 +1 @@ -{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/compile","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["48"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Wed, 01 Jul 2015 15:36:13 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9597"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1435765382"],"X-Ratelimit-Reset-Ttl":["409"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2587"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJoYXNoIjoiMTQ1ZWEyNGE0ZDgzYTE0ZWNiOTA3N2I4MzFmMTQ4MDkiLCJj\ncmVhdGVkX2F0IjoiMjAxNS0wNy0wMSAxNTozNjoxMyIsImRwdSI6IjAuMSJ9\n"},"http_version":null},"recorded_at":"Wed, 01 Jul 2015 15:36:15 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file +{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/compile","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.5.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["48"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 12 Nov 2015 10:59:29 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9884"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1447329263"],"X-Ratelimit-Reset-Ttl":["3294"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"Access-Control-Allow-Methods":["GET,POST,PUT,DELETE"],"X-Served-By":["ded2587"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJoYXNoIjoiMTQ1ZWEyNGE0ZDgzYTE0ZWNiOTA3N2I4MzFmMTQ4MDkiLCJj\ncmVhdGVkX2F0IjoiMjAxNS0xMS0xMiAxMDo1OToyOSIsImRwdSI6IjAuMSJ9\n"},"http_version":null},"recorded_at":"Thu, 12 Nov 2015 10:59:29 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/core/before_historic_dpu.json b/test/fixtures/cassettes/core/before_historic_dpu.json index 48edd77..576621a 100644 --- a/test/fixtures/cassettes/core/before_historic_dpu.json +++ b/test/fixtures/cassettes/core/before_historic_dpu.json @@ -1 +1 @@ -{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/compile","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["48"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Wed, 01 Jul 2015 15:36:12 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9657"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1435765382"],"X-Ratelimit-Reset-Ttl":["410"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2587"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJoYXNoIjoiMTQ1ZWEyNGE0ZDgzYTE0ZWNiOTA3N2I4MzFmMTQ4MDkiLCJj\ncmVhdGVkX2F0IjoiMjAxNS0wNy0wMSAxNTozNjoxMiIsImRwdSI6IjAuMSJ9\n"},"http_version":null},"recorded_at":"Wed, 01 Jul 2015 15:36:13 GMT"},{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/historics/prepare","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["135"]}},"response":{"status":{"code":202,"message":"Accepted"},"headers":{"Server":["nginx"],"Date":["Wed, 01 Jul 2015 15:36:13 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9632"],"X-Ratelimit-Cost":["25"],"X-Ratelimit-Reset":["1435765382"],"X-Ratelimit-Reset-Ttl":["410"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJpZCI6ImQ1ZGU3ZmVlYmM2ODEzYzUzZGQyIiwiZHB1cyI6MC40LCJhdmFp\nbGFiaWxpdHkiOnsic3RhcnQiOiIxNDM1NzA4ODAwIiwiZW5kIjoiMTQzNTcw\nODgwMCIsInNvdXJjZXMiOnsidHVtYmxyIjp7ImF1Z21lbnRhdGlvbnMiOltd\nLCJ2ZXJzaW9ucyI6WyIzIl0sInN0YXR1cyI6MTAwfX19fQ==\n"},"http_version":null},"recorded_at":"Wed, 01 Jul 2015 15:36:14 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file +{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/compile","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.5.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["48"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 12 Nov 2015 10:59:29 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9944"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1447329263"],"X-Ratelimit-Reset-Ttl":["3295"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"Access-Control-Allow-Methods":["GET,POST,PUT,DELETE"],"X-Served-By":["ded2584"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJoYXNoIjoiMTQ1ZWEyNGE0ZDgzYTE0ZWNiOTA3N2I4MzFmMTQ4MDkiLCJj\ncmVhdGVkX2F0IjoiMjAxNS0xMS0xMiAxMDo1OToyOSIsImRwdSI6IjAuMSJ9\n"},"http_version":null},"recorded_at":"Thu, 12 Nov 2015 10:59:29 GMT"},{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/historics/prepare","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.5.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["135"]}},"response":{"status":{"code":202,"message":"Accepted"},"headers":{"Server":["nginx"],"Date":["Thu, 12 Nov 2015 10:59:29 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9919"],"X-Ratelimit-Cost":["25"],"X-Ratelimit-Reset":["1447329263"],"X-Ratelimit-Reset-Ttl":["3294"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"Access-Control-Allow-Methods":["GET,POST,PUT,DELETE"]},"body":{"encoding":"UTF-8","base64_string":"eyJpZCI6IjQwZjU1ZjljOGFmZTBmNzkzMDAzIiwiZHB1cyI6MC40LCJhdmFp\nbGFiaWxpdHkiOnsic3RhcnQiOiIxNDQ3Mjg2NDAwIiwiZW5kIjoiMTQ0NzI4\nNjQwMCIsInNvdXJjZXMiOnsidHVtYmxyIjp7ImF1Z21lbnRhdGlvbnMiOltd\nLCJ2ZXJzaW9ucyI6WyIzIl0sInN0YXR1cyI6MTAwfX19fQ==\n"},"http_version":null},"recorded_at":"Thu, 12 Nov 2015 10:59:29 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/core/compile_success.json b/test/fixtures/cassettes/core/compile_success.json index 4223982..c0db403 100644 --- a/test/fixtures/cassettes/core/compile_success.json +++ b/test/fixtures/cassettes/core/compile_success.json @@ -1 +1 @@ -{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/compile","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["48"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Wed, 01 Jul 2015 15:36:12 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9687"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1435765382"],"X-Ratelimit-Reset-Ttl":["410"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2587"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJoYXNoIjoiMTQ1ZWEyNGE0ZDgzYTE0ZWNiOTA3N2I4MzFmMTQ4MDkiLCJj\ncmVhdGVkX2F0IjoiMjAxNS0wNy0wMSAxNTozNjoxMiIsImRwdSI6IjAuMSJ9\n"},"http_version":null},"recorded_at":"Wed, 01 Jul 2015 15:36:13 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file +{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/compile","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.5.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["48"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 12 Nov 2015 10:59:29 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9869"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1447329263"],"X-Ratelimit-Reset-Ttl":["3294"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"Access-Control-Allow-Methods":["GET,POST,PUT,DELETE"],"X-Served-By":["ded2587"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJoYXNoIjoiMTQ1ZWEyNGE0ZDgzYTE0ZWNiOTA3N2I4MzFmMTQ4MDkiLCJj\ncmVhdGVkX2F0IjoiMjAxNS0xMS0xMiAxMDo1OToyOSIsImRwdSI6IjAuMSJ9\n"},"http_version":null},"recorded_at":"Thu, 12 Nov 2015 10:59:29 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/core/dpu_get_cost.json b/test/fixtures/cassettes/core/dpu_get_cost.json index 5a4d640..51a5c09 100644 --- a/test/fixtures/cassettes/core/dpu_get_cost.json +++ b/test/fixtures/cassettes/core/dpu_get_cost.json @@ -1 +1 @@ -{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/dpu","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["43"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Wed, 01 Jul 2015 15:36:14 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9592"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1435765382"],"X-Ratelimit-Reset-Ttl":["409"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2587"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJkcHUiOjAuMSwiZGV0YWlsIjp7ImNvbnRhaW5zIjp7ImNvdW50IjoxLCJk\ncHUiOjAuMSwidGFyZ2V0cyI6eyJpbnRlcmFjdGlvbi5jb250ZW50Ijp7ImNv\ndW50IjoxLCJkcHUiOjAuMX19fX19\n"},"http_version":null},"recorded_at":"Wed, 01 Jul 2015 15:36:15 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file +{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/dpu","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.5.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["43"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 12 Nov 2015 10:59:29 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9879"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1447329263"],"X-Ratelimit-Reset-Ttl":["3294"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"Access-Control-Allow-Methods":["GET,POST,PUT,DELETE"],"X-Served-By":["ded2584"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJkcHUiOjAuMSwiZGV0YWlsIjp7ImNvbnRhaW5zIjp7ImNvdW50IjoxLCJk\ncHUiOjAuMSwidGFyZ2V0cyI6eyJpbnRlcmFjdGlvbi5jb250ZW50Ijp7ImNv\ndW50IjoxLCJkcHUiOjAuMX19fX19\n"},"http_version":null},"recorded_at":"Thu, 12 Nov 2015 10:59:29 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/core/dpu_throw_badrequest.json b/test/fixtures/cassettes/core/dpu_throw_badrequest.json index 2d397e0..f904543 100644 --- a/test/fixtures/cassettes/core/dpu_throw_badrequest.json +++ b/test/fixtures/cassettes/core/dpu_throw_badrequest.json @@ -1 +1 @@ -{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/dpu","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["42"]}},"response":{"status":{"code":400,"message":"Bad Request"},"headers":{"Server":["nginx"],"Date":["Wed, 01 Jul 2015 15:36:14 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9587"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1435765382"],"X-Ratelimit-Reset-Ttl":["408"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6IlVuYWJsZSB0byBnZXQgRFBVIFs0MDBdIiwib3JpZ2luYWxf\nZXJyb3IiOiJVbmFibGUgdG8gZ2V0IERQVSBbNDAwXSJ9\n"},"http_version":null},"recorded_at":"Wed, 01 Jul 2015 15:36:15 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file +{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/dpu","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.5.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["42"]}},"response":{"status":{"code":400,"message":"Bad Request"},"headers":{"Server":["nginx"],"Date":["Thu, 12 Nov 2015 10:59:29 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9874"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1447329263"],"X-Ratelimit-Reset-Ttl":["3294"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"Access-Control-Allow-Methods":["GET,POST,PUT,DELETE"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6IlVuYWJsZSB0byBnZXQgRFBVIFs0MDBdIiwib3JpZ2luYWxf\nZXJyb3IiOiJVbmFibGUgdG8gZ2V0IERQVSBbNDAwXSJ9\n"},"http_version":null},"recorded_at":"Thu, 12 Nov 2015 10:59:29 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/core/historic_dpu.json b/test/fixtures/cassettes/core/historic_dpu.json index 437494b..94287c5 100644 --- a/test/fixtures/cassettes/core/historic_dpu.json +++ b/test/fixtures/cassettes/core/historic_dpu.json @@ -1 +1 @@ -{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/dpu","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["39"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Wed, 01 Jul 2015 15:36:13 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9627"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1435765382"],"X-Ratelimit-Reset-Ttl":["409"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2587"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJkcHUiOjAuNCwiZGV0YWlsIjp7fX0=\n"},"http_version":null},"recorded_at":"Wed, 01 Jul 2015 15:36:14 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file +{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/dpu","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.5.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["39"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 12 Nov 2015 10:59:29 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9914"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1447329263"],"X-Ratelimit-Reset-Ttl":["3294"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"Access-Control-Allow-Methods":["GET,POST,PUT,DELETE"],"X-Served-By":["ded2584"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJkcHUiOjAuNCwiZGV0YWlsIjp7fX0=\n"},"http_version":null},"recorded_at":"Thu, 12 Nov 2015 10:59:29 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/core/usage_success.json b/test/fixtures/cassettes/core/usage_success.json index c6e7101..40797fb 100644 --- a/test/fixtures/cassettes/core/usage_success.json +++ b/test/fixtures/cassettes/core/usage_success.json @@ -1 +1 @@ -{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/usage","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["17"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Wed, 01 Jul 2015 15:36:11 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9707"],"X-Ratelimit-Cost":["25"],"X-Ratelimit-Reset":["1435765382"],"X-Ratelimit-Reset-Ttl":["411"],"X-Cache-Control":["max-age=300, must-revalidate"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2584"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJzdGFydCI6IldlZCwgMDEgSnVsIDIwMTUgMTQ6MzU6MDAgKzAwMDAiLCJl\nbmQiOiJXZWQsIDAxIEp1bCAyMDE1IDE1OjM1OjAwICswMDAwIiwic3RyZWFt\ncyI6eyIyNjU4ODYyZjRiNzgwNDgyZmVmOThjOWRhMTczNzgzMyI6eyJsaWNl\nbnNlcyI6eyJmYWNlYm9va19wYWdlIjoyNiwiZ2VuZGVyIjoxOCwiaW50ZXJh\nY3Rpb24iOjI2LCJsYW5ndWFnZSI6MjYsInNhbGllbmNlLnNlbnRpbWVudCI6\nMTl9LCJzZWNvbmRzIjozNjAwfSwiZWUxMmQwMGY2M2NmYmM3ODFmMzhjYjY1\nNjgwMzE1NGIiOnsibGljZW5zZXMiOnsiZ2VuZGVyIjozMSwiaW50ZXJhY3Rp\nb24iOjY3LCJrbG91dC5zY29yZSI6NjcsImxhbmd1YWdlIjo2Miwic2FsaWVu\nY2Uuc2VudGltZW50Ijo1NSwidHdpdHRlciI6NjcsInR3aXR0ZXJfZ25pcCI6\nNjd9LCJzZWNvbmRzIjozNjAwfSwiZmZmZWExYTUyYjM4ZTRlZTM1YTg3NTQ2\nZGFjZmM5NmYiOnsibGljZW5zZXMiOnsiZmFjZWJvb2tfcGFnZSI6MjEwMCwi\nZ2VuZGVyIjoxNzIwLCJpbnRlcmFjdGlvbiI6MjA5OSwibGFuZ3VhZ2UiOjIw\nOTksInNhbGllbmNlLnNlbnRpbWVudCI6MTl9LCJzZWNvbmRzIjozNjAwfX19\n"},"http_version":null},"recorded_at":"Wed, 01 Jul 2015 15:36:12 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file +{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/usage","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.5.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["17"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 12 Nov 2015 10:59:30 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9829"],"X-Ratelimit-Cost":["25"],"X-Ratelimit-Reset":["1447329263"],"X-Ratelimit-Reset-Ttl":["3293"],"X-Cache-Control":["max-age=300, must-revalidate"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"Access-Control-Allow-Methods":["GET,POST,PUT,DELETE"],"X-Served-By":["ded2584"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJzdGFydCI6IlRodSwgMTIgTm92IDIwMTUgMDk6NTU6MDAgKzAwMDAiLCJl\nbmQiOiJUaHUsIDEyIE5vdiAyMDE1IDEwOjU1OjAwICswMDAwIiwic3RyZWFt\ncyI6eyIxM2U5MzQ3ZTdkYTMyZjE5ZmNkYjA4ZTI5NzAxOWQyZSI6eyJsaWNl\nbnNlcyI6eyJibG9nIjoyNzcsImRpc3F1cyI6MTYwLCJmb2N1cyI6ODA2NCwi\nZ2VuZGVyIjo5MjQsImludGVyYWN0aW9uIjoxMTQwMywia2xvdXQuc2NvcmUi\nOjI1NywibGFuZ3VhZ2UiOjExMzc5LCJsZXhpc25leGlzIjoxMDgsImxpbmtz\nIjoxNTEwLCJuZXdzY3JlZCI6MTA4MywidHVtYmxyIjo4MTgxLCJ0d2l0dGVy\nIjoyNjEsIndpa2lwZWRpYSI6MTQsIndvcmRwcmVzcyI6MTMxOX0sInNlY29u\nZHMiOjM2MDB9LCJiYzJkYWVmNmE4ZWJlMmYyZjUzZGQzN2Q1ZGQxMjBhMyI6\neyJsaWNlbnNlcyI6W10sInNlY29uZHMiOjM2MDB9LCJmZmZlYTFhNTJiMzhl\nNGVlMzVhODc1NDZkYWNmYzk2ZiI6eyJsaWNlbnNlcyI6W10sInNlY29uZHMi\nOjM2MDB9fX0=\n"},"http_version":null},"recorded_at":"Thu, 12 Nov 2015 10:59:30 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/core/validate_invalid_hash.json b/test/fixtures/cassettes/core/validate_invalid_hash.json index 1b46618..125e929 100644 --- a/test/fixtures/cassettes/core/validate_invalid_hash.json +++ b/test/fixtures/cassettes/core/validate_invalid_hash.json @@ -1 +1 @@ -{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/validate","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["44"]}},"response":{"status":{"code":400,"message":"Bad Request"},"headers":{"Server":["nginx"],"Date":["Wed, 01 Jul 2015 15:36:11 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9702"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1435765382"],"X-Ratelimit-Reset-Ttl":["411"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6IldlIGFyZSB1bmFibGUgdG8gcGFyc2UgdGhpcyBzdHJlYW0u\nIEF0IGxpbmUgMSBwb3NpdGlvbiAyMSB3ZSB3ZXJlIGV4cGVjdGluZyBvbmUg\nb2Y6IGFuIG9wZXJhdG9yIHRoYXQgY2FuIGFjdCBvbiBzdHJpbmdzLCBpbnRl\nZ2VycyBvciBmbG9hdCB0eXBlcyAoPT0sICE9LCA8LCA+LCA+PSwgPD0pLCBm\nb2xsb3dlZCBieSBhIHRleHQgdmFsdWU7XG4gb3IgdGhlIFwic3Vic3RyaW5n\nXCIgb3BlcmF0b3IsIGZvbGxvd2VkIGJ5IGEgdGV4dCB2YWx1ZTtcbiBvciA8\ncHJlZGljYXRlLmNvbnRhaW5zX3BhcmFtZXRlcnM+LCBmb2xsb3dlZCBieSBh\nIGxpc3Qgb2YgY29tbWEgc2VwYXJhdGVkIHN0cmluZ3M7XG4gb3IgdGhlIFwi\naW5cIiBvcGVyYXRvciBmb3Igc3RyaW5ncywgZm9sbG93ZWQgYnkgYSBsaXN0\nIG9mIGNvbW1hIHNlcGFyYXRlZCBzdHJpbmdzO1xuIG9yIDxwcmVkaWNhdGUu\nY29udGFpbnNfcGFyYW1ldGVycz4sIGZvbGxvd2VkIGJ5IGEgcXVvdGUgKFwi\nKSwgZm9sbG93ZWQgYnkgYSBsaXN0IG9mIGNvbW1hIHNlcGFyYXRlZCBpdGVt\ncyBpbiBhIGNvbnRhaW5zIG5lYXIgb3BlcmF0b3IncyB2YWx1ZSwgZm9sbG93\nZWQgYnkgYSBjb2xvbiAoOiksIGZvbGxvd2VkIGJ5IHRoZSBudW1iZXIgb2Yg\nd29yZHMgc2VwYXJhdGlvbiBhcmd1bWVudCBpbiB0aGUgY29udGFpbnMgbmVh\nciBvcGVyYXRvcidzIHZhbHVlLCBmb2xsb3dlZCBieSBhIHF1b3RlIChcIik7\nXG4gb3IgPHByZWRpY2F0ZS5jb250YWluc19wYXJhbWV0ZXJzPiwgZm9sbG93\nZWQgYnkgYSB0ZXh0IHZhbHVlO1xuIG9yIHRoZSBcImluXCIgb3BlcmF0b3Ig\nZm9yIGR5bmFtaWMgbGlzdHMsIGZvbGxvd2VkIGJ5IGEgZHluYW1pYyBsaXN0\nIGtleTtcbiBvciA8cHJlZGljYXRlLmNvbnRhaW5zX3BhcmFtZXRlcnM+LCBm\nb2xsb3dlZCBieSBhIGR5bmFtaWMgbGlzdCBrZXkuIn0=\n"},"http_version":null},"recorded_at":"Wed, 01 Jul 2015 15:36:13 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file +{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/validate","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.5.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["44"]}},"response":{"status":{"code":400,"message":"Bad Request"},"headers":{"Server":["nginx"],"Date":["Thu, 12 Nov 2015 10:59:30 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9859"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1447329263"],"X-Ratelimit-Reset-Ttl":["3293"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"Access-Control-Allow-Methods":["GET,POST,PUT,DELETE"]},"body":{"encoding":"UTF-8","base64_string":"eyJlcnJvciI6IldlIGFyZSB1bmFibGUgdG8gcGFyc2UgdGhpcyBzdHJlYW0u\nIEF0IGxpbmUgMSBwb3NpdGlvbiAyMSB3ZSB3ZXJlIGV4cGVjdGluZyBvbmUg\nb2Y6IGFuIG9wZXJhdG9yIHRoYXQgY2FuIGFjdCBvbiBzdHJpbmdzLCBpbnRl\nZ2VycyBvciBmbG9hdCB0eXBlcyAoPT0sICE9LCA8LCA+LCA+PSwgPD0pLCBm\nb2xsb3dlZCBieSBhIHRleHQgdmFsdWU7XG4gb3IgdGhlIFwic3Vic3RyaW5n\nXCIgb3BlcmF0b3IsIGZvbGxvd2VkIGJ5IGEgdGV4dCB2YWx1ZTtcbiBvciA8\ncHJlZGljYXRlLmNvbnRhaW5zX3BhcmFtZXRlcnM+LCBmb2xsb3dlZCBieSBh\nIGxpc3Qgb2YgY29tbWEgc2VwYXJhdGVkIHN0cmluZ3M7XG4gb3IgdGhlIFwi\naW5cIiBvcGVyYXRvciBmb3Igc3RyaW5ncywgZm9sbG93ZWQgYnkgYSBsaXN0\nIG9mIGNvbW1hIHNlcGFyYXRlZCBzdHJpbmdzO1xuIG9yIDxwcmVkaWNhdGUu\nY29udGFpbnNfcGFyYW1ldGVycz4sIGZvbGxvd2VkIGJ5IGEgcXVvdGUgKFwi\nKSwgZm9sbG93ZWQgYnkgYSBsaXN0IG9mIGNvbW1hIHNlcGFyYXRlZCBpdGVt\ncyBpbiBhIGNvbnRhaW5zIG5lYXIgb3BlcmF0b3IncyB2YWx1ZSwgZm9sbG93\nZWQgYnkgYSBjb2xvbiAoOiksIGZvbGxvd2VkIGJ5IHRoZSBudW1iZXIgb2Yg\nd29yZHMgc2VwYXJhdGlvbiBhcmd1bWVudCBpbiB0aGUgY29udGFpbnMgbmVh\nciBvcGVyYXRvcidzIHZhbHVlLCBmb2xsb3dlZCBieSBhIHF1b3RlIChcIik7\nXG4gb3IgPHByZWRpY2F0ZS5jb250YWluc19wYXJhbWV0ZXJzPiwgZm9sbG93\nZWQgYnkgYSB0ZXh0IHZhbHVlO1xuIG9yIHRoZSBcImluXCIgb3BlcmF0b3Ig\nZm9yIGR5bmFtaWMgbGlzdHMsIGZvbGxvd2VkIGJ5IGEgZHluYW1pYyBsaXN0\nIGtleTtcbiBvciA8cHJlZGljYXRlLmNvbnRhaW5zX3BhcmFtZXRlcnM+LCBm\nb2xsb3dlZCBieSBhIGR5bmFtaWMgbGlzdCBrZXkuIn0=\n"},"http_version":null},"recorded_at":"Thu, 12 Nov 2015 10:59:30 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/core/validate_success_bool.json b/test/fixtures/cassettes/core/validate_success_bool.json index 68d97d5..71c7b9e 100644 --- a/test/fixtures/cassettes/core/validate_success_bool.json +++ b/test/fixtures/cassettes/core/validate_success_bool.json @@ -1 +1 @@ -{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/validate","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["48"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Wed, 01 Jul 2015 15:36:12 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9692"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1435765382"],"X-Ratelimit-Reset-Ttl":["410"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2584"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJjcmVhdGVkX2F0IjoiMjAxNS0wNy0wMSAxNTozNjoxMiIsImRwdSI6IjAu\nMSJ9\n"},"http_version":null},"recorded_at":"Wed, 01 Jul 2015 15:36:13 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file +{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/validate","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.5.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["48"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 12 Nov 2015 10:59:30 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9864"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1447329263"],"X-Ratelimit-Reset-Ttl":["3294"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"Access-Control-Allow-Methods":["GET,POST,PUT,DELETE"],"X-Served-By":["ded2587"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJjcmVhdGVkX2F0IjoiMjAxNS0xMS0xMiAxMDo1OTozMCIsImRwdSI6IjAu\nMSJ9\n"},"http_version":null},"recorded_at":"Thu, 12 Nov 2015 10:59:30 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/core/validate_success_hash.json b/test/fixtures/cassettes/core/validate_success_hash.json index 294be6c..747ae7f 100644 --- a/test/fixtures/cassettes/core/validate_success_hash.json +++ b/test/fixtures/cassettes/core/validate_success_hash.json @@ -1 +1 @@ -{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/validate","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["48"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Wed, 01 Jul 2015 15:36:12 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9697"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1435765382"],"X-Ratelimit-Reset-Ttl":["411"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2584"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJjcmVhdGVkX2F0IjoiMjAxNS0wNy0wMSAxNTozNjoxMiIsImRwdSI6IjAu\nMSJ9\n"},"http_version":null},"recorded_at":"Wed, 01 Jul 2015 15:36:13 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file +{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/validate","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.5.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["48"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 12 Nov 2015 10:59:30 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9854"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1447329263"],"X-Ratelimit-Reset-Ttl":["3293"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"Access-Control-Allow-Methods":["GET,POST,PUT,DELETE"],"X-Served-By":["ded2584"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJjcmVhdGVkX2F0IjoiMjAxNS0xMS0xMiAxMDo1OTozMCIsImRwdSI6IjAu\nMSJ9\n"},"http_version":null},"recorded_at":"Thu, 12 Nov 2015 10:59:30 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/odp/batch/after_upload.json b/test/fixtures/cassettes/odp/batch/after_upload.json index 4dd2782..f188e36 100644 --- a/test/fixtures/cassettes/odp/batch/after_upload.json +++ b/test/fixtures/cassettes/odp/batch/after_upload.json @@ -1 +1 @@ -{"http_interactions":[{"request":{"method":"delete","uri":"https://api.datasift.com/v1.2/source/delete?id=3446d92fd7274adeaf8b27f4e99f3b60","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.4.0"],"Authorization":[""],"Content-Type":["application/x-www-form-urlencoded"]}},"response":{"status":{"code":204,"message":"No Content"},"headers":{"Server":["nginx"],"Date":["Fri, 14 Aug 2015 19:27:56 GMT"],"Content-Type":["text/html"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9816"],"X-Ratelimit-Cost":["25"],"X-Ratelimit-Reset":["1439582455"],"X-Ratelimit-Reset-Ttl":["1979"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2584"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":""},"http_version":null},"recorded_at":"Fri, 14 Aug 2015 19:27:56 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file +{"http_interactions":[{"request":{"method":"delete","uri":"https://api.datasift.com/v1.2/source/delete?id=390ad395404742bdbd962e818bc0767a","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.5.0"],"Authorization":[""]}},"response":{"status":{"code":204,"message":"No Content"},"headers":{"Server":["nginx"],"Date":["Thu, 12 Nov 2015 11:02:07 GMT"],"Content-Type":["text/html"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9503"],"X-Ratelimit-Cost":["25"],"X-Ratelimit-Reset":["1447329263"],"X-Ratelimit-Reset-Ttl":["3136"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"Access-Control-Allow-Methods":["GET,POST,PUT,DELETE"],"X-Served-By":["ded2587"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":""},"http_version":null},"recorded_at":"Thu, 12 Nov 2015 11:02:07 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/odp/batch/before_upload.json b/test/fixtures/cassettes/odp/batch/before_upload.json index 1accdca..b842344 100644 --- a/test/fixtures/cassettes/odp/batch/before_upload.json +++ b/test/fixtures/cassettes/odp/batch/before_upload.json @@ -1 +1 @@ -{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/source/create","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.4.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["110"]}},"response":{"status":{"code":201,"message":"Created"},"headers":{"Server":["nginx"],"Date":["Fri, 14 Aug 2015 19:27:36 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9842"],"X-Ratelimit-Cost":["25"],"X-Ratelimit-Reset":["1439582455"],"X-Ratelimit-Reset-Ttl":["2000"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2587"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJpZCI6IjM0NDZkOTJmZDcyNzRhZGVhZjhiMjdmNGU5OWYzYjYwIiwic3Rh\ndHVzIjoic3RvcHBlZCIsInNvdXJjZV90eXBlIjoidHdpdHRlcl9nbmlwIiwi\nbmFtZSI6IlJ1YnkgT0RQIEFQSSIsImF1dGgiOltdLCJyZXNvdXJjZXMiOlt7\nInJlc291cmNlX2lkIjoiMjUyM2FhMDUzNWIzNGYzNmFmMzlhYmEzZTJkY2Rj\nYmIiLCJwYXJhbWV0ZXJzIjp7InVuaXF1ZV9pZF9sb2NhdGlvbiI6ImlkIiwi\naW50ZXJhY3Rpb25fdHlwZSI6InR3aXR0ZXJfZ25pcCIsImF1Z21lbnRhdGlv\nbnMiOlsiZ2VuZGVyIiwia2xvdXQiLCJsYW5ndWFnZWRldGVjdGlvbiIsInNh\nbGllbmNlX2NvbnRlbnQiLCJzYWxpZW5jZV90aXRsZSIsInRyZW5kcyIsInpl\nbnlhX2NvbnRlbnQiLCJ6ZW55YV90aXRsZSJdLCJpZG1sIjoiIyBNYXBzIHRo\nZSBHbmlwIEFjdGl2aXR5U3RyZWFtIGZvcm1hdCB0byBhIFR3aXR0ZXIgb2Jq\nZWN0XG5bbWFpbl1cbnR3aXR0ZXIgPSAoYXBwbHkoXCJjcmVhdGVfcG9zdFwi\nKSBbIHJvb3QudmVyYiA9PSBcInBvc3RcIiBdIHxcbiAgICAgICAgICAgYXBw\nbHkoXCJjcmVhdGVfc2hhcmVcIikgWyByb290LnZlcmIgPT0gXCJzaGFyZVwi\nXSB8XG4gICAgICAgICAgIGFwcGx5KFwiY3JlYXRlX2RlbGV0ZVwiKSBbIHJv\nb3QudmVyYiA9PSBcImRlbGV0ZVwiIF0gfFxuICAgICAgICAgICBhcHBseShc\nImNyZWF0ZV9zdGF0dXNfd2l0aGhlbGRcIikgWyByb290LnZlcmIgPT0gXCJz\ndGF0dXNfd2l0aGhlbGRcIiBdIHxcbiAgICAgICAgICAgYXBwbHkoXCJjcmVh\ndGVfc2NydWJfZ2VvXCIpIFsgcm9vdC52ZXJiID09IFwic2NydWJfZ2VvXCIg\nXSB8XG4gICAgICAgICAgIGFwcGx5KFwiY3JlYXRlX290aGVyX2NvbXBsaWFu\nY2VcIilcbiAgICAgICAgICApXG5cbiMgZGVsZXRlcyBoYXZlIGFuIGV4dHJh\nIHRvcC1sZXZlbCBmaWVsZFxuZGVsZXRlZCA9IHRydWUgW3Jvb3QudmVyYiA9\nPSBcImRlbGV0ZVwiXVxuXG5bY3JlYXRlX2RlbGV0ZV1cbmlkICAgICAgICAg\nID0gb2JqZWN0LmlkLnNwbGl0KFwiOlwiKVsyXVxuY3JlYXRlZF9hdCAgPSB0\naW1lc3RhbXBNcy5kYXRlKClcbnVzZXIgICAgICAgID0gYWN0b3IuYXBwbHko\nXCJjcmVhdGVfYWN0b3JcIilcblxuW2NyZWF0ZV9zdGF0dXNfd2l0aGhlbGRd\nXG5jcmVhdGVkX2F0ICAgICAgICAgPSB0aW1lc3RhbXBNcy5kYXRlKClcbnN0\nYXR1cyAgICAgICAgICAgICA9IHZlcmJcbndpdGhoZWxkLmNvdW50cmllcyA9\nIG9iamVjdC53aXRoaGVsZF9pbl9jb3VudHJpZXNcblxuIyB0aGUgb2JqZWN0\nIHJlZmVycyB0byB0aGUgc3RhdHVzIG1lc3NhZ2UgYW5kIHRoZXJlJ3MgYSB1\nc2VyX2lkIGZpZWxkIGluc3RlYWQgb2YgYW4gYWN0b3JcbmlkICAgICAgICAg\nID0gb2JqZWN0LmlkLm1hdGNoKFwiLio/KFxcXFxkKylcIilbMF1cbnVzZXIu\naWQgICAgID0gb2JqZWN0LnVzZXJfaWQubWF0Y2goXCIuKj8oXFxcXGQrKVwi\nKVswXS5pbnQoKVxudXNlci5pZF9zdHIgPSBvYmplY3QudXNlcl9pZC5tYXRj\naChcIi4qPyhcXFxcZCspXCIpWzBdXG5cbltjcmVhdGVfc2NydWJfZ2VvXVxu\nY3JlYXRlZF9hdCAgPSB0aW1lc3RhbXBNcy5kYXRlKClcbnN0YXR1cyAgICAg\nID0gdmVyYlxudXNlciAgICAgICAgPSBhY3Rvci5hcHBseShcImNyZWF0ZV9h\nY3RvclwiKVxuc2NydWJfZ2VvLnVwX3RvX3N0YXR1c19pZCA9IHRhcmdldC51\ncF90b19pZC5tYXRjaChcIi4qPyhcXFxcZCspXCIpWzBdXG5cbltjcmVhdGVf\nb3RoZXJfY29tcGxpYW5jZV1cbmNyZWF0ZWRfYXQgID0gdGltZXN0YW1wTXMu\nZGF0ZSgpXG5zdGF0dXMgICAgICA9IHZlcmJcbnVzZXIgICAgICAgID0gb2Jq\nZWN0LmFwcGx5KFwiY3JlYXRlX2FjdG9yXCIpXG53aXRoaGVsZC5jb3VudHJp\nZXMgPSB3aXRoaGVsZF9pbl9jb3VudHJpZXNcblxuW2NyZWF0ZV9nZW9fZnJv\nbV9wb2x5XVxubGF0aXR1ZGUgICAgPSBnZW8uY29vcmRpbmF0ZXNbMF0uZXh0\ncmFjdCh0aGlzWzFdKS5hdmVyYWdlKClcbmxvbmdpdHVkZSAgID0gZ2VvLmNv\nb3JkaW5hdGVzWzBdLmV4dHJhY3QodGhpc1swXSkuYXZlcmFnZSgpXG5cbltj\ncmVhdGVfZ2VvX2Zyb21fcG9pbnRdXG5sYXRpdHVkZSAgICA9IGdlby5jb29y\nZGluYXRlc1swXVxubG9uZ2l0dWRlICAgPSBnZW8uY29vcmRpbmF0ZXNbMV1c\nblxuW2NyZWF0ZV9sb2NfZ2VvX2Zyb21fcG9seV1cbmxhdGl0dWRlICAgID0g\nbG9jYXRpb24uZ2VvLmNvb3JkaW5hdGVzWzBdLmV4dHJhY3QodGhpc1sxXSku\nYXZlcmFnZSgpXG5sb25naXR1ZGUgICA9IGxvY2F0aW9uLmdlby5jb29yZGlu\nYXRlc1swXS5leHRyYWN0KHRoaXNbMF0pLmF2ZXJhZ2UoKVxuXG5bY3JlYXRl\nX2xvY19nZW9fZnJvbV9wb2ludF1cbmxhdGl0dWRlICAgID0gbG9jYXRpb24u\nZ2VvLmNvb3JkaW5hdGVzWzBdXG5sb25naXR1ZGUgICA9IGxvY2F0aW9uLmdl\nby5jb29yZGluYXRlc1sxXVxuXG5bY3JlYXRlX3Bvc3RdXG5pZCAgICAgICAg\nICAgICAgPSBpZC5zcGxpdChcIjpcIilbMl1cbmxpbmsgICAgICAgICAgICA9\nIGxpbmtcbnVzZXIgICAgICAgICAgICA9IGFjdG9yLmFwcGx5KFwiY3JlYXRl\nX2FjdG9yXCIpXG5sYW5nICAgICAgICAgICAgPSB0d2l0dGVyX2xhbmdcbnRl\neHQgICAgICAgICAgICA9IGJvZHkuc2l6ZSgxMDAwKVxuY3JlYXRlZF9hdCAg\nICAgID0gcG9zdGVkVGltZS5kYXRlKClcbmZpbHRlcl9sZXZlbCAgICA9IHR3\naXR0ZXJfZmlsdGVyX2xldmVsXG5zb3VyY2UgICAgICAgICAgPSBnZW5lcmF0\nb3IuZGlzcGxheU5hbWVcbmhhc2h0YWdzICAgICAgICA9IHR3aXR0ZXJfZW50\naXRpZXMuaGFzaHRhZ3MgWyB0cnVuY2F0ZWQgIT0gdHJ1ZSBdIC5leHRyYWN0\nKHRleHQpXG5tZW50aW9ucyAgICAgICAgPSB0d2l0dGVyX2VudGl0aWVzLnVz\nZXJfbWVudGlvbnMuZXh0cmFjdChzY3JlZW5fbmFtZSlcbm1lbnRpb25faWRz\nICAgICA9IHR3aXR0ZXJfZW50aXRpZXMudXNlcl9tZW50aW9ucy5leHRyYWN0\nKGlkKVxubWVkaWEgICAgICAgICAgID0gdHdpdHRlcl9lbnRpdGllcy5tZWRp\nYS5leHRyYWN0KGJsYWNrbGlzdChcImluZGljZXNcIikpXG5wbGFjZSAgICAg\nICAgICAgPSBsb2NhdGlvbi5hcHBseShcImNyZWF0ZV9wbGFjZVwiKVxuc3lt\nYm9scyAgICAgICAgID0gc3ltYm9scy5leHRyYWN0KHRleHQpXG5nZW8gICAg\nICAgICAgICAgPSAoYXBwbHkoXCJjcmVhdGVfZ2VvX2Zyb21fcG9pbnRcIikg\nICAgIFsgcm9vdC5nZW8udHlwZSA9PSBcIlBvaW50XCIgXSAgICAgICAgICAg\nfCAjIHRyeSB0aGUgYWNjdXJhdGUgcG9pbnRcbiAgICAgICAgICAgICAgICAg\nICAgICAgYXBwbHkoXCJjcmVhdGVfZ2VvX2Zyb21fcG9seVwiKSAgICAgIFsg\ncm9vdC5nZW8udHlwZSA9PSBcIlBvbHlnb25cIiBdICAgICAgICAgfCAjIHRy\neSBhbiBhY2N1cmF0ZSBwb2x5XG4gICAgICAgICAgICAgICAgICAgICAgICAg\nICAgICAgICAgICAgICBhcHBseShcImNyZWF0ZV9sb2NfZ2VvX2Zyb21fcG9p\nbnRcIikgWyByb290LmxvY2F0aW9uLmdlby50eXBlID09IFwiUG9pbnRcIiBd\nICB8ICMgdHJ5IHRoZSBsb2NhdGlvbiBwb2ludFxuICAgICAgICAgICAgICAg\nICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFwcGx5\nKFwiY3JlYXRlX2xvY19nZW9fZnJvbV9wb2x5XCIpICBbIHJvb3QubG9jYXRp\nb24uZ2VvLnR5cGUgPT0gXCJQb2x5Z29uXCIgXSkgIyB0cnkgdGhlIGxvY2F0\naW9uIHBvbHlcblxuIyBzcGxpdCBsaW5rcyBsaWtlIGh0dHA6XC9cL3R3aXR0\nZXIuY29tXC9zY3JlZW5fbmFtZVwvc3RhdHVzZXNcL3N0YXR1c19pZFxuaW5f\ncmVwbHlfdG9fc2NyZWVuX25hbWUgICA9IGluUmVwbHlUby5saW5rLnNwbGl0\nKFwiXFxcL1wiKSBbM11cbmluX3JlcGx5X3RvX3N0YXR1c19pZCAgICAgPSBp\nblJlcGx5VG8ubGluay5zcGxpdChcIlxcXC9cIikgWzVdXG5cbiMgZXh0cmFj\ndCBsaW5rcyBmcm9tIHR3aXR0ZXIgZW50aXRpZXNcbmxpbmtzICAgICAgICAg\nICA9IHR3aXR0ZXJfZW50aXRpZXMudXJscy5leHRyYWN0KChleHBhbmRlZF91\ncmwgfCB1cmwpKVswOjVdXG5kb21haW5zICAgICAgICAgPSB0d2l0dGVyX2Vu\ndGl0aWVzLnVybHMuZXh0cmFjdCgoZXhwYW5kZWRfdXJsLnVybCgpLmhvc3Qg\nfCB1cmwudXJsKCkuaG9zdCkpWzA6NV1cbmRpc3BsYXlfdXJscyAgICA9IHR3\naXR0ZXJfZW50aXRpZXMudXJscy5leHRyYWN0KGRpc3BsYXlfdXJsKVswOjVd\nXG5cbltjcmVhdGVfc2hhcmVdXG5yZXR3ZWV0ICAgICA9IGFwcGx5KFwiY3Jl\nYXRlX3Bvc3RcIilcbnJldHdlZXRlZCAgID0gb2JqZWN0LmFwcGx5KFwiY3Jl\nYXRlX3Bvc3RcIilcbmlkICAgICAgICAgID0gaWQuc3BsaXQoXCI6XCIpWzJd\nXG5cbiMgd2UgY2FuIGdldCB0aGUgb3JkZXIgdGhlIHJldHdlZXQgd2FzIG1h\nZGUgaW4gYnkgZ2V0dGluZyB0aGUgb3JpZ2luYWwgdHdlZXRzIHJldHdlZXQg\nY291bnRcbnJldHdlZXQuY291bnQgPSByZXR3ZWV0Q291bnQuaW50KCkuZGVm\nYXVsdCgwKVxuXG4jIHRoZSByZXR3ZWV0IGlzIG9mdGVuIHRydW5jYXRlZCBi\neSB0d2l0dGVyLiBsZXQncyBmb3JtYXQgaXQgb3Vyc2VsZlxucmV0d2VldC50\nZXh0ID0gXCJSVCBAJXM6ICVzXCIuZm9ybWF0KG9iamVjdC5hY3Rvci5wcmVm\nZXJyZWRVc2VybmFtZSwgb2JqZWN0LmJvZHkpXG5cbiMgd2UgZG9uJ3QgbWFw\nIHRoZSBmYXZvcml0ZXMgY291bnQgb2YgYSBuZXcgdHdlZXQgc2luY2UgaXQn\nbGwgbGlrZWx5IGJlIHplcm9cbnJldHdlZXRlZC5mYXZvdXJpdGVzX2NvdW50\nID0gb2JqZWN0LmZhdm9yaXRlc0NvdW50XG5cbiMgcHJlcGVuZCB0aGUgcmV0\nd2VldGVkIHVzZXIgc2NyZWVuIG5hbWUgYW5kIGlkIHRvIHRoZSBtZW50aW9u\ncyBsaXN0XG5yZXR3ZWV0Lm1lbnRpb25zID0gQHJldHdlZXQubWVudGlvbnMu\ncHJlcGVuZChAcmV0d2VldGVkLnVzZXIuc2NyZWVuX25hbWUpXG5yZXR3ZWV0\nLm1lbnRpb25faWRzID0gQHJldHdlZXQubWVudGlvbl9pZHMucHJlcGVuZChA\ncmV0d2VldGVkLnVzZXIuaWQpXG5cbltjcmVhdGVfcGxhY2VdXG5jb3VudHJ5\nICAgICAgICAgPSBjb3VudHJ5X2NvZGVcbmNvdW50cnlfY29kZSAgICA9IHR3\naXR0ZXJfY291bnRyeV9jb2RlXG5mdWxsX25hbWUgICAgICAgPSBkaXNwbGF5\nTmFtZVxubmFtZSAgICAgICAgICAgID0gbmFtZVxucGxhY2VfdHlwZSAgICAg\nID0gdHdpdHRlcl9wbGFjZV90eXBlXG51cmwgICAgICAgICAgICAgPSBsaW5r\nXG5cbltjcmVhdGVfYWN0b3JdXG5pZCAgICAgICAgICAgICAgICAgICAgICA9\nIGlkLm1hdGNoKFwiLio/KFxcXFxkKylcIilbMF0uaW50KClcbmlkX3N0ciAg\nICAgICAgICAgICAgICAgID0gaWQubWF0Y2goXCIuKj8oXFxcXGQrKVwiKVsw\nXVxudXJsICAgICAgICAgICAgICAgICAgICAgPSBsaW5rXG5uYW1lICAgICAg\nICAgICAgICAgICAgICA9IGRpc3BsYXlOYW1lXG5wcm9maWxlX2ltYWdlX3Vy\nbCAgICAgICA9IGltYWdlXG5wcm9maWxlX2ltYWdlX3VybF9odHRwcyA9IGlt\nYWdlXG5kZXNjcmlwdGlvbiAgICAgICAgICAgICA9IHN1bW1hcnlcbmNyZWF0\nZWRfYXQgICAgICAgICAgICAgID0gcG9zdGVkVGltZS5kYXRlKClcbmxvY2F0\naW9uICAgICAgICAgICAgICAgID0gbG9jYXRpb24uZGlzcGxheU5hbWVcbnV0\nY19vZmZzZXQgICAgICAgICAgICAgID0gdXRjT2Zmc2V0LmludCgpXG5zY3Jl\nZW5fbmFtZSAgICAgICAgICAgICA9IHByZWZlcnJlZFVzZXJuYW1lXG5sYW5n\nICAgICAgICAgICAgICAgICAgICA9IGxhbmd1YWdlc1swXVxudGltZV96b25l\nICAgICAgICAgICAgICAgPSB0d2l0dGVyVGltZVpvbmVcbmZyaWVuZHNfY291\nbnQgICAgICAgICAgID0gZnJpZW5kc0NvdW50XG5mb2xsb3dlcnNfY291bnQg\nICAgICAgICA9IGZvbGxvd2Vyc0NvdW50XG5saXN0ZWRfY291bnQgICAgICAg\nICAgICA9IGxpc3RlZENvdW50XG5zdGF0dXNlc19jb3VudCAgICAgICAgICA9\nIHN0YXR1c2VzQ291bnRcbnZlcmlmaWVkICAgICAgICAgICAgICAgID0gdmVy\naWZpZWRcbmZhdm91cml0ZXNfY291bnQgICAgICAgID0gZmF2b3JpdGVzQ291\nbnQiLCJjYXRlZ29yeSI6InR3aXR0ZXJjYXRlZ29yeV8xIn19XSwicGFyYW1l\ndGVycyI6W10sImNyZWF0ZWRfYXQiOjE0Mzk1ODA0NTZ9\n"},"http_version":null},"recorded_at":"Fri, 14 Aug 2015 19:27:36 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file +{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/source/create","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.5.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["110"]}},"response":{"status":{"code":201,"message":"Created"},"headers":{"Server":["nginx"],"Date":["Thu, 12 Nov 2015 11:02:07 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9528"],"X-Ratelimit-Cost":["25"],"X-Ratelimit-Reset":["1447329263"],"X-Ratelimit-Reset-Ttl":["3136"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"Access-Control-Allow-Methods":["GET,POST,PUT,DELETE"],"X-Served-By":["ded2587"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJpZCI6IjM5MGFkMzk1NDA0NzQyYmRiZDk2MmU4MThiYzA3NjdhIiwic3Rh\ndHVzIjoic3RvcHBlZCIsInNvdXJjZV90eXBlIjoidHdpdHRlcl9nbmlwIiwi\nbmFtZSI6IlJ1YnkgT0RQIEFQSSIsImF1dGgiOltdLCJyZXNvdXJjZXMiOlt7\nInJlc291cmNlX2lkIjoiOGZhZjY1OGNjZDlkNDRjNzllZGI2NGU2ZGVhYjI1\nNzYiLCJwYXJhbWV0ZXJzIjp7InVuaXF1ZV9pZF9sb2NhdGlvbiI6ImlkIiwi\naW50ZXJhY3Rpb25fdHlwZSI6InR3aXR0ZXJfZ25pcCIsImF1Z21lbnRhdGlv\nbnMiOlsiZ2VuZGVyIiwia2xvdXQiLCJsYW5ndWFnZWRldGVjdGlvbiIsInNh\nbGllbmNlX2NvbnRlbnQiLCJzYWxpZW5jZV90aXRsZSIsInRyZW5kcyIsInpl\nbnlhX2NvbnRlbnQiLCJ6ZW55YV90aXRsZSJdLCJpZG1sIjoiIyBNYXBzIHRo\nZSBHbmlwIEFjdGl2aXR5U3RyZWFtIGZvcm1hdCB0byBhIFR3aXR0ZXIgb2Jq\nZWN0XG5bbWFpbl1cbnR3aXR0ZXIgPSAoYXBwbHkoXCJjcmVhdGVfcG9zdFwi\nKSBbIHJvb3QudmVyYiA9PSBcInBvc3RcIiBdIHxcbiAgICAgICAgICAgYXBw\nbHkoXCJjcmVhdGVfc2hhcmVcIikgWyByb290LnZlcmIgPT0gXCJzaGFyZVwi\nXSB8XG4gICAgICAgICAgIGFwcGx5KFwiY3JlYXRlX2RlbGV0ZVwiKSBbIHJv\nb3QudmVyYiA9PSBcImRlbGV0ZVwiIF0gfFxuICAgICAgICAgICBhcHBseShc\nImNyZWF0ZV9zdGF0dXNfd2l0aGhlbGRcIikgWyByb290LnZlcmIgPT0gXCJz\ndGF0dXNfd2l0aGhlbGRcIiBdIHxcbiAgICAgICAgICAgYXBwbHkoXCJjcmVh\ndGVfc2NydWJfZ2VvXCIpIFsgcm9vdC52ZXJiID09IFwic2NydWJfZ2VvXCIg\nXSB8XG4gICAgICAgICAgIGFwcGx5KFwiY3JlYXRlX290aGVyX2NvbXBsaWFu\nY2VcIilcbiAgICAgICAgICApXG5cbiMgZGVsZXRlcyBoYXZlIGFuIGV4dHJh\nIHRvcC1sZXZlbCBmaWVsZFxuZGVsZXRlZCA9IHRydWUgW3Jvb3QudmVyYiA9\nPSBcImRlbGV0ZVwiXVxuXG5bY3JlYXRlX2RlbGV0ZV1cbmlkICAgICAgICAg\nID0gb2JqZWN0LmlkLnNwbGl0KFwiOlwiKVsyXVxuY3JlYXRlZF9hdCAgPSB0\naW1lc3RhbXBNcy5kYXRlKClcbnVzZXIgICAgICAgID0gYWN0b3IuYXBwbHko\nXCJjcmVhdGVfYWN0b3JcIilcblxuW2NyZWF0ZV9zdGF0dXNfd2l0aGhlbGRd\nXG5jcmVhdGVkX2F0ICAgICAgICAgPSB0aW1lc3RhbXBNcy5kYXRlKClcbnN0\nYXR1cyAgICAgICAgICAgICA9IHZlcmJcbndpdGhoZWxkLmNvdW50cmllcyA9\nIG9iamVjdC53aXRoaGVsZF9pbl9jb3VudHJpZXNcblxuIyB0aGUgb2JqZWN0\nIHJlZmVycyB0byB0aGUgc3RhdHVzIG1lc3NhZ2UgYW5kIHRoZXJlJ3MgYSB1\nc2VyX2lkIGZpZWxkIGluc3RlYWQgb2YgYW4gYWN0b3JcbmlkICAgICAgICAg\nID0gb2JqZWN0LmlkLm1hdGNoKFwiLio/KFxcXFxkKylcIilbMF1cbnVzZXIu\naWQgICAgID0gb2JqZWN0LnVzZXJfaWQubWF0Y2goXCIuKj8oXFxcXGQrKVwi\nKVswXS5pbnQoKVxudXNlci5pZF9zdHIgPSBvYmplY3QudXNlcl9pZC5tYXRj\naChcIi4qPyhcXFxcZCspXCIpWzBdXG5cbltjcmVhdGVfc2NydWJfZ2VvXVxu\nY3JlYXRlZF9hdCAgPSB0aW1lc3RhbXBNcy5kYXRlKClcbnN0YXR1cyAgICAg\nID0gdmVyYlxudXNlciAgICAgICAgPSBhY3Rvci5hcHBseShcImNyZWF0ZV9h\nY3RvclwiKVxuc2NydWJfZ2VvLnVwX3RvX3N0YXR1c19pZCA9IHRhcmdldC51\ncF90b19pZC5tYXRjaChcIi4qPyhcXFxcZCspXCIpWzBdXG5cbltjcmVhdGVf\nb3RoZXJfY29tcGxpYW5jZV1cbmNyZWF0ZWRfYXQgID0gdGltZXN0YW1wTXMu\nZGF0ZSgpXG5zdGF0dXMgICAgICA9IHZlcmJcbnVzZXIgICAgICAgID0gb2Jq\nZWN0LmFwcGx5KFwiY3JlYXRlX2FjdG9yXCIpXG53aXRoaGVsZC5jb3VudHJp\nZXMgPSB3aXRoaGVsZF9pbl9jb3VudHJpZXNcblxuW2NyZWF0ZV9nZW9fZnJv\nbV9wb2x5XVxubGF0aXR1ZGUgICAgPSBnZW8uY29vcmRpbmF0ZXNbMF0uZXh0\ncmFjdCh0aGlzWzFdKS5hdmVyYWdlKClcbmxvbmdpdHVkZSAgID0gZ2VvLmNv\nb3JkaW5hdGVzWzBdLmV4dHJhY3QodGhpc1swXSkuYXZlcmFnZSgpXG5cbltj\ncmVhdGVfZ2VvX2Zyb21fcG9pbnRdXG5sYXRpdHVkZSAgICA9IGdlby5jb29y\nZGluYXRlc1swXVxubG9uZ2l0dWRlICAgPSBnZW8uY29vcmRpbmF0ZXNbMV1c\nblxuW2NyZWF0ZV9sb2NfZ2VvX2Zyb21fcG9seV1cbmxhdGl0dWRlICAgID0g\nbG9jYXRpb24uZ2VvLmNvb3JkaW5hdGVzWzBdLmV4dHJhY3QodGhpc1sxXSku\nYXZlcmFnZSgpXG5sb25naXR1ZGUgICA9IGxvY2F0aW9uLmdlby5jb29yZGlu\nYXRlc1swXS5leHRyYWN0KHRoaXNbMF0pLmF2ZXJhZ2UoKVxuXG5bY3JlYXRl\nX2xvY19nZW9fZnJvbV9wb2ludF1cbmxhdGl0dWRlICAgID0gbG9jYXRpb24u\nZ2VvLmNvb3JkaW5hdGVzWzBdXG5sb25naXR1ZGUgICA9IGxvY2F0aW9uLmdl\nby5jb29yZGluYXRlc1sxXVxuXG5bY3JlYXRlX3Bvc3RdXG5pZCAgICAgICAg\nICAgICAgPSBpZC5zcGxpdChcIjpcIilbMl1cbmxpbmsgICAgICAgICAgICA9\nIGxpbmtcbnVzZXIgICAgICAgICAgICA9IGFjdG9yLmFwcGx5KFwiY3JlYXRl\nX2FjdG9yXCIpXG5sYW5nICAgICAgICAgICAgPSB0d2l0dGVyX2xhbmdcbnRl\neHQgICAgICAgICAgICA9IGJvZHkuc2l6ZSgxMDAwKVxuY3JlYXRlZF9hdCAg\nICAgID0gcG9zdGVkVGltZS5kYXRlKClcbmZpbHRlcl9sZXZlbCAgICA9IHR3\naXR0ZXJfZmlsdGVyX2xldmVsXG5zb3VyY2UgICAgICAgICAgPSBnZW5lcmF0\nb3IuZGlzcGxheU5hbWVcbmhhc2h0YWdzICAgICAgICA9IHR3aXR0ZXJfZW50\naXRpZXMuaGFzaHRhZ3MgWyB0cnVuY2F0ZWQgIT0gdHJ1ZSBdIC5leHRyYWN0\nKHRleHQpXG5tZW50aW9ucyAgICAgICAgPSB0d2l0dGVyX2VudGl0aWVzLnVz\nZXJfbWVudGlvbnMuZXh0cmFjdChzY3JlZW5fbmFtZSlcbm1lbnRpb25faWRz\nICAgICA9IHR3aXR0ZXJfZW50aXRpZXMudXNlcl9tZW50aW9ucy5leHRyYWN0\nKGlkKVxubWVkaWEgICAgICAgICAgID0gdHdpdHRlcl9lbnRpdGllcy5tZWRp\nYS5leHRyYWN0KGJsYWNrbGlzdChcImluZGljZXNcIikpXG5wbGFjZSAgICAg\nICAgICAgPSBsb2NhdGlvbi5hcHBseShcImNyZWF0ZV9wbGFjZVwiKVxuc3lt\nYm9scyAgICAgICAgID0gc3ltYm9scy5leHRyYWN0KHRleHQpXG5nZW8gICAg\nICAgICAgICAgPSAoYXBwbHkoXCJjcmVhdGVfZ2VvX2Zyb21fcG9pbnRcIikg\nICAgIFsgcm9vdC5nZW8udHlwZSA9PSBcIlBvaW50XCIgXSAgICAgICAgICAg\nfCAjIHRyeSB0aGUgYWNjdXJhdGUgcG9pbnRcbiAgICAgICAgICAgICAgICAg\nICAgICAgYXBwbHkoXCJjcmVhdGVfZ2VvX2Zyb21fcG9seVwiKSAgICAgIFsg\ncm9vdC5nZW8udHlwZSA9PSBcIlBvbHlnb25cIiBdICAgICAgICAgfCAjIHRy\neSBhbiBhY2N1cmF0ZSBwb2x5XG4gICAgICAgICAgICAgICAgICAgICAgICAg\nICAgICAgICAgICAgICBhcHBseShcImNyZWF0ZV9sb2NfZ2VvX2Zyb21fcG9p\nbnRcIikgWyByb290LmxvY2F0aW9uLmdlby50eXBlID09IFwiUG9pbnRcIiBd\nICB8ICMgdHJ5IHRoZSBsb2NhdGlvbiBwb2ludFxuICAgICAgICAgICAgICAg\nICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFwcGx5\nKFwiY3JlYXRlX2xvY19nZW9fZnJvbV9wb2x5XCIpICBbIHJvb3QubG9jYXRp\nb24uZ2VvLnR5cGUgPT0gXCJQb2x5Z29uXCIgXSkgIyB0cnkgdGhlIGxvY2F0\naW9uIHBvbHlcblxuIyBzcGxpdCBsaW5rcyBsaWtlIGh0dHA6XC9cL3R3aXR0\nZXIuY29tXC9zY3JlZW5fbmFtZVwvc3RhdHVzZXNcL3N0YXR1c19pZFxuaW5f\ncmVwbHlfdG9fc2NyZWVuX25hbWUgICA9IGluUmVwbHlUby5saW5rLnNwbGl0\nKFwiXFxcL1wiKSBbM11cbmluX3JlcGx5X3RvX3N0YXR1c19pZCAgICAgPSBp\nblJlcGx5VG8ubGluay5zcGxpdChcIlxcXC9cIikgWzVdXG5cbiMgZXh0cmFj\ndCBsaW5rcyBmcm9tIHR3aXR0ZXIgZW50aXRpZXNcbmxpbmtzICAgICAgICAg\nICA9IHR3aXR0ZXJfZW50aXRpZXMudXJscy5leHRyYWN0KChleHBhbmRlZF91\ncmwgfCB1cmwpKVswOjVdXG5kb21haW5zICAgICAgICAgPSB0d2l0dGVyX2Vu\ndGl0aWVzLnVybHMuZXh0cmFjdCgoZXhwYW5kZWRfdXJsLnVybCgpLmhvc3Qg\nfCB1cmwudXJsKCkuaG9zdCkpWzA6NV1cbmRpc3BsYXlfdXJscyAgICA9IHR3\naXR0ZXJfZW50aXRpZXMudXJscy5leHRyYWN0KGRpc3BsYXlfdXJsKVswOjVd\nXG5cbltjcmVhdGVfc2hhcmVdXG5yZXR3ZWV0ICAgICA9IGFwcGx5KFwiY3Jl\nYXRlX3Bvc3RcIilcbnJldHdlZXRlZCAgID0gb2JqZWN0LmFwcGx5KFwiY3Jl\nYXRlX3Bvc3RcIilcbmlkICAgICAgICAgID0gaWQuc3BsaXQoXCI6XCIpWzJd\nXG5cbiMgd2UgY2FuIGdldCB0aGUgb3JkZXIgdGhlIHJldHdlZXQgd2FzIG1h\nZGUgaW4gYnkgZ2V0dGluZyB0aGUgb3JpZ2luYWwgdHdlZXRzIHJldHdlZXQg\nY291bnRcbnJldHdlZXQuY291bnQgPSByZXR3ZWV0Q291bnQuaW50KCkuZGVm\nYXVsdCgwKVxuXG4jIHRoZSByZXR3ZWV0IGlzIG9mdGVuIHRydW5jYXRlZCBi\neSB0d2l0dGVyLiBsZXQncyBmb3JtYXQgaXQgb3Vyc2VsZlxucmV0d2VldC50\nZXh0ID0gXCJSVCBAJXM6ICVzXCIuZm9ybWF0KG9iamVjdC5hY3Rvci5wcmVm\nZXJyZWRVc2VybmFtZSwgb2JqZWN0LmJvZHkpXG5cbiMgd2UgZG9uJ3QgbWFw\nIHRoZSBmYXZvcml0ZXMgY291bnQgb2YgYSBuZXcgdHdlZXQgc2luY2UgaXQn\nbGwgbGlrZWx5IGJlIHplcm9cbnJldHdlZXRlZC5mYXZvdXJpdGVzX2NvdW50\nID0gb2JqZWN0LmZhdm9yaXRlc0NvdW50XG5cbiMgcHJlcGVuZCB0aGUgcmV0\nd2VldGVkIHVzZXIgc2NyZWVuIG5hbWUgYW5kIGlkIHRvIHRoZSBtZW50aW9u\ncyBsaXN0XG5yZXR3ZWV0Lm1lbnRpb25zID0gQHJldHdlZXQubWVudGlvbnMu\ncHJlcGVuZChAcmV0d2VldGVkLnVzZXIuc2NyZWVuX25hbWUpXG5yZXR3ZWV0\nLm1lbnRpb25faWRzID0gQHJldHdlZXQubWVudGlvbl9pZHMucHJlcGVuZChA\ncmV0d2VldGVkLnVzZXIuaWQpXG5cbltjcmVhdGVfcGxhY2VdXG5jb3VudHJ5\nICAgICAgICAgPSBjb3VudHJ5X2NvZGVcbmNvdW50cnlfY29kZSAgICA9IHR3\naXR0ZXJfY291bnRyeV9jb2RlXG5mdWxsX25hbWUgICAgICAgPSBkaXNwbGF5\nTmFtZVxubmFtZSAgICAgICAgICAgID0gbmFtZVxucGxhY2VfdHlwZSAgICAg\nID0gdHdpdHRlcl9wbGFjZV90eXBlXG51cmwgICAgICAgICAgICAgPSBsaW5r\nXG5cbltjcmVhdGVfYWN0b3JdXG5pZCAgICAgICAgICAgICAgICAgICAgICA9\nIGlkLm1hdGNoKFwiLio/KFxcXFxkKylcIilbMF0uaW50KClcbmlkX3N0ciAg\nICAgICAgICAgICAgICAgID0gaWQubWF0Y2goXCIuKj8oXFxcXGQrKVwiKVsw\nXVxudXJsICAgICAgICAgICAgICAgICAgICAgPSBsaW5rXG5uYW1lICAgICAg\nICAgICAgICAgICAgICA9IGRpc3BsYXlOYW1lXG5wcm9maWxlX2ltYWdlX3Vy\nbCAgICAgICA9IGltYWdlXG5wcm9maWxlX2ltYWdlX3VybF9odHRwcyA9IGlt\nYWdlXG5kZXNjcmlwdGlvbiAgICAgICAgICAgICA9IHN1bW1hcnlcbmNyZWF0\nZWRfYXQgICAgICAgICAgICAgID0gcG9zdGVkVGltZS5kYXRlKClcbmxvY2F0\naW9uICAgICAgICAgICAgICAgID0gbG9jYXRpb24uZGlzcGxheU5hbWVcbnV0\nY19vZmZzZXQgICAgICAgICAgICAgID0gdXRjT2Zmc2V0LmludCgpXG5zY3Jl\nZW5fbmFtZSAgICAgICAgICAgICA9IHByZWZlcnJlZFVzZXJuYW1lXG5sYW5n\nICAgICAgICAgICAgICAgICAgICA9IGxhbmd1YWdlc1swXVxudGltZV96b25l\nICAgICAgICAgICAgICAgPSB0d2l0dGVyVGltZVpvbmVcbmZyaWVuZHNfY291\nbnQgICAgICAgICAgID0gZnJpZW5kc0NvdW50XG5mb2xsb3dlcnNfY291bnQg\nICAgICAgICA9IGZvbGxvd2Vyc0NvdW50XG5saXN0ZWRfY291bnQgICAgICAg\nICAgICA9IGxpc3RlZENvdW50XG5zdGF0dXNlc19jb3VudCAgICAgICAgICA9\nIHN0YXR1c2VzQ291bnRcbnZlcmlmaWVkICAgICAgICAgICAgICAgID0gdmVy\naWZpZWRcbmZhdm91cml0ZXNfY291bnQgICAgICAgID0gZmF2b3JpdGVzQ291\nbnQiLCJjYXRlZ29yeSI6InR3aXR0ZXJjYXRlZ29yeV8xIn19XSwicGFyYW1l\ndGVycyI6W10sImNyZWF0ZWRfYXQiOjE0NDczMjYxMjd9\n"},"http_version":null},"recorded_at":"Thu, 12 Nov 2015 11:02:07 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/odp/batch/upload_failure_no_source.json b/test/fixtures/cassettes/odp/batch/upload_failure_no_source.json index 0521cf2..8486dab 100644 --- a/test/fixtures/cassettes/odp/batch/upload_failure_no_source.json +++ b/test/fixtures/cassettes/odp/batch/upload_failure_no_source.json @@ -1 +1 @@ -{"http_interactions":[{"request":{"method":"post","uri":"https://in.datasift.com/invalid_source_id","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/ Ruby/v3.4.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["27255"]}},"response":{"status":{"code":404,"message":"Not Found"},"headers":{"Cache-Control":["private"],"Content-Type":["application/json"],"Server":["DataSift Ingestion/1.0"],"X-Ingestion-Data-Ratelimit-Reset":["0"],"X-Ingestion-Request-Ratelimit-Limit":["10000"],"X-Ingestion-Request-Ratelimit-Reset":["60"],"X-Ingestion-Data-Ratelimit-Remaining":["36864000"],"X-Ingestion-Request-Ratelimit-Reset-Ttl":["1439580312"],"X-Ingestion-Data-Ratelimit-Reset-Ttl":["1439580252"],"X-Ingestion-Data-Ratelimit-Limit":["36864000"],"X-Ingestion-Request-Ratelimit-Remaining":["9999"],"Transfer-Encoding":["chunked"],"Strict-Transport-Security":["max-age=31536000"]},"body":{"encoding":"ASCII-8BIT","base64_string":"eyJlcnJvciI6IlVua25vd24gdXNlciBzb3VyY2UifQ==\n"},"http_version":null},"recorded_at":"Fri, 14 Aug 2015 19:24:12 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file +{"http_interactions":[{"request":{"method":"post","uri":"https://in.datasift.com/invalid_source_id","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/ Ruby/v3.5.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["27255"]}},"response":{"status":{"code":404,"message":"Not Found"},"headers":{"Cache-Control":["private"],"Content-Type":["application/json"],"Server":["DataSift Ingestion/1.0"],"X-Ingestion-Data-Ratelimit-Reset":["60"],"X-Ingestion-Request-Ratelimit-Limit":["10000"],"X-Ingestion-Request-Ratelimit-Reset":["3"],"X-Ingestion-Data-Ratelimit-Remaining":["9972754"],"X-Ingestion-Request-Ratelimit-Reset-Ttl":["1447326130"],"X-Ingestion-Data-Ratelimit-Reset-Ttl":["1447326187"],"X-Ingestion-Data-Ratelimit-Limit":["10000000"],"X-Ingestion-Request-Ratelimit-Remaining":["9997"],"Transfer-Encoding":["chunked"],"Strict-Transport-Security":["max-age=31536000"]},"body":{"encoding":"ASCII-8BIT","base64_string":"eyJlcnJvciI6IlVua25vd24gdXNlciBzb3VyY2UifQ==\n"},"http_version":null},"recorded_at":"Thu, 12 Nov 2015 11:02:07 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/odp/batch/upload_success.json b/test/fixtures/cassettes/odp/batch/upload_success.json index 41cdd28..12da1d5 100644 --- a/test/fixtures/cassettes/odp/batch/upload_success.json +++ b/test/fixtures/cassettes/odp/batch/upload_success.json @@ -1 +1 @@ -{"http_interactions":[{"request":{"method":"post","uri":"https://in.datasift.com/3446d92fd7274adeaf8b27f4e99f3b60","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/ Ruby/v3.4.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["27255"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Cache-Control":["private"],"Content-Type":["application/json"],"Server":["DataSift Ingestion/1.0"],"X-Ingestion-Data-Ratelimit-Reset":["60"],"X-Ingestion-Request-Ratelimit-Limit":["10000"],"X-Ingestion-Request-Ratelimit-Reset":["60"],"X-Ingestion-Data-Ratelimit-Remaining":["36836754"],"X-Ingestion-Request-Ratelimit-Reset-Ttl":["1439580536"],"X-Ingestion-Data-Ratelimit-Reset-Ttl":["1439580536"],"X-Ingestion-Data-Ratelimit-Limit":["36864000"],"X-Ingestion-Request-Ratelimit-Remaining":["9999"],"Transfer-Encoding":["chunked"],"Strict-Transport-Security":["max-age=31536000"]},"body":{"encoding":"ASCII-8BIT","base64_string":"eyJhY2NlcHRlZCI6MTAsInRvdGFsX21lc3NhZ2VfYnl0ZXMiOjI3MjQ2fQ==\n"},"http_version":null},"recorded_at":"Fri, 14 Aug 2015 19:27:56 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file +{"http_interactions":[{"request":{"method":"post","uri":"https://in.datasift.com/390ad395404742bdbd962e818bc0767a","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/ Ruby/v3.5.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["27255"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Cache-Control":["private"],"Content-Type":["application/json"],"Server":["DataSift Ingestion/1.0"],"X-Ingestion-Data-Ratelimit-Reset":["60"],"X-Ingestion-Request-Ratelimit-Limit":["10000"],"X-Ingestion-Request-Ratelimit-Reset":["3"],"X-Ingestion-Data-Ratelimit-Remaining":["9972754"],"X-Ingestion-Request-Ratelimit-Reset-Ttl":["1447326130"],"X-Ingestion-Data-Ratelimit-Reset-Ttl":["1447326187"],"X-Ingestion-Data-Ratelimit-Limit":["10000000"],"X-Ingestion-Request-Ratelimit-Remaining":["9998"],"Transfer-Encoding":["chunked"],"Strict-Transport-Security":["max-age=31536000"]},"body":{"encoding":"ASCII-8BIT","base64_string":"eyJhY2NlcHRlZCI6MTAsInRvdGFsX21lc3NhZ2VfYnl0ZXMiOjI3MjQ2fQ==\n"},"http_version":null},"recorded_at":"Thu, 12 Nov 2015 11:02:07 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/preview/before_preview_create.json b/test/fixtures/cassettes/preview/before_preview_create.json index fd09b59..e7e898b 100644 --- a/test/fixtures/cassettes/preview/before_preview_create.json +++ b/test/fixtures/cassettes/preview/before_preview_create.json @@ -1 +1 @@ -{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.1/compile","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["48"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 14 May 2015 15:05:34 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["8988"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1431617916"],"X-Ratelimit-Reset-Ttl":["1982"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2587"]},"body":{"encoding":"UTF-8","base64_string":"eyJoYXNoIjoiZTJhMDczZGE3NGEwMWNjZjViYTk3Y2FlMTQ4ZTY0NTciLCJj\ncmVhdGVkX2F0IjoiMjAxNS0wNS0xNCAxNTowNTozNCIsImRwdSI6IjAuMSJ9\n"},"http_version":null},"recorded_at":"Thu, 14 May 2015 15:05:35 GMT"},{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/compile","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["48"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Wed, 01 Jul 2015 15:36:57 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9547"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1435765382"],"X-Ratelimit-Reset-Ttl":["365"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2584"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJoYXNoIjoiZTJhMDczZGE3NGEwMWNjZjViYTk3Y2FlMTQ4ZTY0NTciLCJj\ncmVhdGVkX2F0IjoiMjAxNS0wNy0wMSAxNTozNjo1NyIsImRwdSI6IjAuMSJ9\n"},"http_version":null},"recorded_at":"Wed, 01 Jul 2015 15:36:58 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file +{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/compile","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.5.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["48"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 12 Nov 2015 10:59:32 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9789"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1447329263"],"X-Ratelimit-Reset-Ttl":["3291"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"Access-Control-Allow-Methods":["GET,POST,PUT,DELETE"],"X-Served-By":["ded2584"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJoYXNoIjoiZTJhMDczZGE3NGEwMWNjZjViYTk3Y2FlMTQ4ZTY0NTciLCJj\ncmVhdGVkX2F0IjoiMjAxNS0xMS0xMiAxMDo1OTozMiIsImRwdSI6IjAuMSJ9\n"},"http_version":null},"recorded_at":"Thu, 12 Nov 2015 10:59:32 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/preview/before_preview_get.json b/test/fixtures/cassettes/preview/before_preview_get.json index c1b2b51..70399a7 100644 --- a/test/fixtures/cassettes/preview/before_preview_get.json +++ b/test/fixtures/cassettes/preview/before_preview_get.json @@ -1 +1 @@ -{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.1/compile","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["48"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 14 May 2015 15:05:51 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["8832"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1431617916"],"X-Ratelimit-Reset-Ttl":["1965"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2587"]},"body":{"encoding":"UTF-8","base64_string":"eyJoYXNoIjoiZTJhMDczZGE3NGEwMWNjZjViYTk3Y2FlMTQ4ZTY0NTciLCJj\ncmVhdGVkX2F0IjoiMjAxNS0wNS0xNCAxNTowNTo1MSIsImRwdSI6IjAuMSJ9\n"},"http_version":null},"recorded_at":"Thu, 14 May 2015 15:05:51 GMT"},{"request":{"method":"post","uri":"https://api.datasift.com/v1.1/preview/create","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["181"]}},"response":{"status":{"code":202,"message":"Accepted"},"headers":{"Server":["nginx"],"Date":["Thu, 14 May 2015 15:05:51 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["8807"],"X-Ratelimit-Cost":["25"],"X-Ratelimit-Reset":["1431617916"],"X-Ratelimit-Reset-Ttl":["1965"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJpZCI6ImMxOWE5ZWFiZjA4MDA4M2UxNmZkNjhmMDNjZGI0NDg5ODhmZGFj\nODUiLCJjcmVhdGVkX2F0IjoxNDMxNjE1OTUxfQ==\n"},"http_version":null},"recorded_at":"Thu, 14 May 2015 15:05:52 GMT"},{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/compile","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["48"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Wed, 01 Jul 2015 15:36:56 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9582"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1435765382"],"X-Ratelimit-Reset-Ttl":["366"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2587"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJoYXNoIjoiZTJhMDczZGE3NGEwMWNjZjViYTk3Y2FlMTQ4ZTY0NTciLCJj\ncmVhdGVkX2F0IjoiMjAxNS0wNy0wMSAxNTozNjo1NiIsImRwdSI6IjAuMSJ9\n"},"http_version":null},"recorded_at":"Wed, 01 Jul 2015 15:36:58 GMT"},{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/preview/create","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["181"]}},"response":{"status":{"code":202,"message":"Accepted"},"headers":{"Server":["nginx"],"Date":["Wed, 01 Jul 2015 15:36:57 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9557"],"X-Ratelimit-Cost":["25"],"X-Ratelimit-Reset":["1435765382"],"X-Ratelimit-Reset-Ttl":["366"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJpZCI6ImE1NjdjODM4MDgxYTJkZDEwZjJmYWY1Yzg2NjZjNzI4ODA3OGY1\nOTYiLCJjcmVhdGVkX2F0IjoxNDM1NzY1MDE3fQ==\n"},"http_version":null},"recorded_at":"Wed, 01 Jul 2015 15:36:58 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file +{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/compile","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.5.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["48"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 12 Nov 2015 10:59:31 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9824"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1447329263"],"X-Ratelimit-Reset-Ttl":["3292"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"Access-Control-Allow-Methods":["GET,POST,PUT,DELETE"],"X-Served-By":["ded2587"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJoYXNoIjoiZTJhMDczZGE3NGEwMWNjZjViYTk3Y2FlMTQ4ZTY0NTciLCJj\ncmVhdGVkX2F0IjoiMjAxNS0xMS0xMiAxMDo1OTozMSIsImRwdSI6IjAuMSJ9\n"},"http_version":null},"recorded_at":"Thu, 12 Nov 2015 10:59:31 GMT"},{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/preview/create","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.5.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["171"]}},"response":{"status":{"code":202,"message":"Accepted"},"headers":{"Server":["nginx"],"Date":["Thu, 12 Nov 2015 10:59:31 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9799"],"X-Ratelimit-Cost":["25"],"X-Ratelimit-Reset":["1447329263"],"X-Ratelimit-Reset-Ttl":["3292"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"Access-Control-Allow-Methods":["GET,POST,PUT,DELETE"]},"body":{"encoding":"UTF-8","base64_string":"eyJpZCI6IjZkNDIyMDAwODMzZjcyN2I4MjE5OWYwZTcwOTM0MGRiMjk3Y2Y3\nNzgiLCJjcmVhdGVkX2F0IjoxNDQ3MzI1OTcyfQ==\n"},"http_version":null},"recorded_at":"Thu, 12 Nov 2015 10:59:31 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/preview/preview_create_success.json b/test/fixtures/cassettes/preview/preview_create_success.json index c9e2a6a..4a55db5 100644 --- a/test/fixtures/cassettes/preview/preview_create_success.json +++ b/test/fixtures/cassettes/preview/preview_create_success.json @@ -1 +1 @@ -{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.1/preview/create","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["181"]}},"response":{"status":{"code":202,"message":"Accepted"},"headers":{"Server":["nginx"],"Date":["Thu, 14 May 2015 15:05:34 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["8963"],"X-Ratelimit-Cost":["25"],"X-Ratelimit-Reset":["1431617916"],"X-Ratelimit-Reset-Ttl":["1982"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJpZCI6ImIwMzExZGQ3NTQzMDMwZWMzYjkyODcyOWU2MjYwYWY1MTEyZDJj\nOWUiLCJjcmVhdGVkX2F0IjoxNDMxNjE1OTM0fQ==\n"},"http_version":null},"recorded_at":"Thu, 14 May 2015 15:05:35 GMT"},{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/preview/create","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["181"]}},"response":{"status":{"code":202,"message":"Accepted"},"headers":{"Server":["nginx"],"Date":["Wed, 01 Jul 2015 15:36:57 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9522"],"X-Ratelimit-Cost":["25"],"X-Ratelimit-Reset":["1435765382"],"X-Ratelimit-Reset-Ttl":["365"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJpZCI6Ijc0ODM1YjAyNzE0OWM0MTI2M2VhMDUxMWU4ZTBkZDc5ZmE0NjZi\nOTUiLCJjcmVhdGVkX2F0IjoxNDM1NzY1MDE4fQ==\n"},"http_version":null},"recorded_at":"Wed, 01 Jul 2015 15:36:58 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file +{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/preview/create","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.5.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["171"]}},"response":{"status":{"code":202,"message":"Accepted"},"headers":{"Server":["nginx"],"Date":["Thu, 12 Nov 2015 10:59:32 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9764"],"X-Ratelimit-Cost":["25"],"X-Ratelimit-Reset":["1447329263"],"X-Ratelimit-Reset-Ttl":["3291"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"Access-Control-Allow-Methods":["GET,POST,PUT,DELETE"]},"body":{"encoding":"UTF-8","base64_string":"eyJpZCI6IjU4NWE3ZWIxYTJmZTg3MTViMGExZGI3MWM5MWVhZWE4NTMxNGU1\nMDIiLCJjcmVhdGVkX2F0IjoxNDQ3MzI1OTcyfQ==\n"},"http_version":null},"recorded_at":"Thu, 12 Nov 2015 10:59:32 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/preview/preview_get_success.json b/test/fixtures/cassettes/preview/preview_get_success.json index b7ddaa2..2257df5 100644 --- a/test/fixtures/cassettes/preview/preview_get_success.json +++ b/test/fixtures/cassettes/preview/preview_get_success.json @@ -1 +1 @@ -{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.1/preview/get","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["49"]}},"response":{"status":{"code":202,"message":"Accepted"},"headers":{"Server":["nginx"],"Date":["Thu, 14 May 2015 15:05:51 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["8802"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1431617916"],"X-Ratelimit-Reset-Ttl":["1965"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJpZCI6ImMxOWE5ZWFiZjA4MDA4M2UxNmZkNjhmMDNjZGI0NDg5ODhmZGFj\nODUiLCJuYW1lIjoicHJldmlldyIsInByb2dyZXNzIjowLCJzdGF0dXMiOiJx\ndWV1ZWQiLCJmZWVkcyI6ImZhY2Vib29rLHR3aXR0ZXIiLCJzYW1wbGUiOjEs\nImVuZCI6MTM5ODk4NTIwMCwiY3JlYXRlZF9hdCI6MTQzMTYxNTk1MSwic3Rh\ncnQiOjEzOTg4OTg4MDAsInVzZXIiOiIzMDQ5IiwicGFyYW1ldGVycyI6Imxh\nbmd1YWdlLnRhZyxmcmVxRGlzdCw1O2ludGVyYWN0aW9uLmlkLHRhcmdldFZv\nbCxob3VyIiwiaGFzaCI6ImUyYTA3M2RhNzRhMDFjY2Y1YmE5N2NhZTE0OGU2\nNDU3In0=\n"},"http_version":null},"recorded_at":"Thu, 14 May 2015 15:05:52 GMT"},{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/preview/get","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["49"]}},"response":{"status":{"code":202,"message":"Accepted"},"headers":{"Server":["nginx"],"Date":["Wed, 01 Jul 2015 15:36:57 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9552"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1435765382"],"X-Ratelimit-Reset-Ttl":["365"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"]},"body":{"encoding":"UTF-8","base64_string":"eyJpZCI6ImE1NjdjODM4MDgxYTJkZDEwZjJmYWY1Yzg2NjZjNzI4ODA3OGY1\nOTYiLCJuYW1lIjoicHJldmlldyIsInByb2dyZXNzIjowLCJzdGF0dXMiOiJx\ndWV1ZWQiLCJmZWVkcyI6ImZhY2Vib29rLHR3aXR0ZXIiLCJzYW1wbGUiOjEs\nImVuZCI6MTM5ODk4NTIwMCwiY3JlYXRlZF9hdCI6MTQzNTc2NTAxNywic3Rh\ncnQiOjEzOTg4OTg4MDAsInVzZXIiOiIzMDQ5IiwicGFyYW1ldGVycyI6Imxh\nbmd1YWdlLnRhZyxmcmVxRGlzdCw1O2ludGVyYWN0aW9uLmlkLHRhcmdldFZv\nbCxob3VyIiwiaGFzaCI6ImUyYTA3M2RhNzRhMDFjY2Y1YmE5N2NhZTE0OGU2\nNDU3In0=\n"},"http_version":null},"recorded_at":"Wed, 01 Jul 2015 15:36:58 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file +{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/preview/get","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.5.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["49"]}},"response":{"status":{"code":202,"message":"Accepted"},"headers":{"Server":["nginx"],"Date":["Thu, 12 Nov 2015 10:59:32 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9794"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1447329263"],"X-Ratelimit-Reset-Ttl":["3291"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"Access-Control-Allow-Methods":["GET,POST,PUT,DELETE"]},"body":{"encoding":"UTF-8","base64_string":"eyJpZCI6IjZkNDIyMDAwODMzZjcyN2I4MjE5OWYwZTcwOTM0MGRiMjk3Y2Y3\nNzgiLCJuYW1lIjoicHJldmlldyIsInByb2dyZXNzIjowLCJzdGF0dXMiOiJx\ndWV1ZWQiLCJmZWVkcyI6InR1bWJsciIsInNhbXBsZSI6MSwiZW5kIjoxMzk4\nOTg1MjAwLCJjcmVhdGVkX2F0IjoxNDQ3MzI1OTcyLCJzdGFydCI6MTM5ODg5\nODgwMCwidXNlciI6IjMwNDkiLCJwYXJhbWV0ZXJzIjoibGFuZ3VhZ2UudGFn\nLGZyZXFEaXN0LDU7aW50ZXJhY3Rpb24uaWQsdGFyZ2V0Vm9sLGhvdXIiLCJo\nYXNoIjoiZTJhMDczZGE3NGEwMWNjZjViYTk3Y2FlMTQ4ZTY0NTcifQ==\n"},"http_version":null},"recorded_at":"Thu, 12 Nov 2015 10:59:32 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/push/after_push_create.json b/test/fixtures/cassettes/push/after_push_create.json index 6d7f295..6de2df8 100644 --- a/test/fixtures/cassettes/push/after_push_create.json +++ b/test/fixtures/cassettes/push/after_push_create.json @@ -1 +1 @@ -{"http_interactions":[{"request":{"method":"delete","uri":"https://api.datasift.com/v1.1/push/delete?id=ddc8c157f616aee3aaa1cfe7066bceff","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/x-www-form-urlencoded"]}},"response":{"status":{"code":204,"message":"No Content"},"headers":{"Server":["nginx"],"Date":["Thu, 14 May 2015 15:05:38 GMT"],"Content-Type":["text/html"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["8939"],"X-Ratelimit-Cost":["1"],"X-Ratelimit-Reset":["1431617916"],"X-Ratelimit-Reset-Ttl":["1978"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2587"]},"body":{"encoding":"UTF-8","base64_string":""},"http_version":null},"recorded_at":"Thu, 14 May 2015 15:05:39 GMT"},{"request":{"method":"delete","uri":"https://api.datasift.com/v1.2/push/delete?id=73a3ecf2129d5e490812b6b58b12b6f7","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/x-www-form-urlencoded"]}},"response":{"status":{"code":204,"message":"No Content"},"headers":{"Server":["nginx"],"Date":["Wed, 01 Jul 2015 15:37:15 GMT"],"Content-Type":["text/html"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9478"],"X-Ratelimit-Cost":["1"],"X-Ratelimit-Reset":["1435765382"],"X-Ratelimit-Reset-Ttl":["347"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2587"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":""},"http_version":null},"recorded_at":"Wed, 01 Jul 2015 15:37:16 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file +{"http_interactions":[{"request":{"method":"delete","uri":"https://api.datasift.com/v1.2/push/delete?id=4dadd0aa1244a54f8081b2e189254a62","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.5.0"],"Authorization":[""]}},"response":{"status":{"code":204,"message":"No Content"},"headers":{"Server":["nginx"],"Date":["Thu, 12 Nov 2015 11:04:45 GMT"],"Content-Type":["text/html"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9365"],"X-Ratelimit-Cost":["1"],"X-Ratelimit-Reset":["1447329263"],"X-Ratelimit-Reset-Ttl":["2978"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"Access-Control-Allow-Methods":["GET,POST,PUT,DELETE"],"X-Served-By":["ded2587"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":""},"http_version":null},"recorded_at":"Thu, 12 Nov 2015 11:04:45 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/push/after_push_get.json b/test/fixtures/cassettes/push/after_push_get.json index 57fc6a5..f18b45d 100644 --- a/test/fixtures/cassettes/push/after_push_get.json +++ b/test/fixtures/cassettes/push/after_push_get.json @@ -1 +1 @@ -{"http_interactions":[{"request":{"method":"delete","uri":"https://api.datasift.com/v1.1/push/delete?id=1fbbf328c86bc80bcf1f8a84e2b805e3","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/x-www-form-urlencoded"]}},"response":{"status":{"code":204,"message":"No Content"},"headers":{"Server":["nginx"],"Date":["Thu, 14 May 2015 15:05:36 GMT"],"Content-Type":["text/html"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["8950"],"X-Ratelimit-Cost":["1"],"X-Ratelimit-Reset":["1431617916"],"X-Ratelimit-Reset-Ttl":["1980"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2587"]},"body":{"encoding":"UTF-8","base64_string":""},"http_version":null},"recorded_at":"Thu, 14 May 2015 15:05:37 GMT"},{"request":{"method":"delete","uri":"https://api.datasift.com/v1.2/push/delete?id=f4b59a9f60ae5a53d901dc6e08291754","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/x-www-form-urlencoded"]}},"response":{"status":{"code":204,"message":"No Content"},"headers":{"Server":["nginx"],"Date":["Wed, 01 Jul 2015 15:37:12 GMT"],"Content-Type":["text/html"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9500"],"X-Ratelimit-Cost":["1"],"X-Ratelimit-Reset":["1435765382"],"X-Ratelimit-Reset-Ttl":["350"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2584"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":""},"http_version":null},"recorded_at":"Wed, 01 Jul 2015 15:37:14 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file +{"http_interactions":[{"request":{"method":"delete","uri":"https://api.datasift.com/v1.2/push/delete?id=a2eabbaae6f8a8f116aa08f1f74b58ea","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.5.0"],"Authorization":[""]}},"response":{"status":{"code":204,"message":"No Content"},"headers":{"Server":["nginx"],"Date":["Thu, 12 Nov 2015 11:04:51 GMT"],"Content-Type":["text/html"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9307"],"X-Ratelimit-Cost":["1"],"X-Ratelimit-Reset":["1447329263"],"X-Ratelimit-Reset-Ttl":["2972"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"Access-Control-Allow-Methods":["GET,POST,PUT,DELETE"],"X-Served-By":["ded2587"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":""},"http_version":null},"recorded_at":"Thu, 12 Nov 2015 11:04:51 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/push/after_push_log.json b/test/fixtures/cassettes/push/after_push_log.json index f91d506..f700150 100644 --- a/test/fixtures/cassettes/push/after_push_log.json +++ b/test/fixtures/cassettes/push/after_push_log.json @@ -1 +1 @@ -{"http_interactions":[{"request":{"method":"delete","uri":"https://api.datasift.com/v1.1/push/delete?id=f34551a6d685f8f356af010a09a833e3","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/x-www-form-urlencoded"]}},"response":{"status":{"code":204,"message":"No Content"},"headers":{"Server":["nginx"],"Date":["Thu, 14 May 2015 15:05:51 GMT"],"Content-Type":["text/html"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["8837"],"X-Ratelimit-Cost":["1"],"X-Ratelimit-Reset":["1431617916"],"X-Ratelimit-Reset-Ttl":["1966"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2584"]},"body":{"encoding":"UTF-8","base64_string":""},"http_version":null},"recorded_at":"Thu, 14 May 2015 15:05:51 GMT"},{"request":{"method":"delete","uri":"https://api.datasift.com/v1.2/push/delete?id=a60cfa6cf10af7dcb9a091f4bec6f779","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/x-www-form-urlencoded"]}},"response":{"status":{"code":204,"message":"No Content"},"headers":{"Server":["nginx"],"Date":["Wed, 01 Jul 2015 15:37:20 GMT"],"Content-Type":["text/html"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9437"],"X-Ratelimit-Cost":["1"],"X-Ratelimit-Reset":["1435765382"],"X-Ratelimit-Reset-Ttl":["342"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2584"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":""},"http_version":null},"recorded_at":"Wed, 01 Jul 2015 15:37:21 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file +{"http_interactions":[{"request":{"method":"delete","uri":"https://api.datasift.com/v1.2/push/delete?id=06e34d5fb2159de8571f409de50e2978","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.5.0"],"Authorization":[""]}},"response":{"status":{"code":204,"message":"No Content"},"headers":{"Server":["nginx"],"Date":["Thu, 12 Nov 2015 11:04:48 GMT"],"Content-Type":["text/html"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9343"],"X-Ratelimit-Cost":["1"],"X-Ratelimit-Reset":["1447329263"],"X-Ratelimit-Reset-Ttl":["2975"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"Access-Control-Allow-Methods":["GET,POST,PUT,DELETE"],"X-Served-By":["ded2584"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":""},"http_version":null},"recorded_at":"Thu, 12 Nov 2015 11:04:48 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/push/after_push_pause.json b/test/fixtures/cassettes/push/after_push_pause.json index 81988df..e7b6dc1 100644 --- a/test/fixtures/cassettes/push/after_push_pause.json +++ b/test/fixtures/cassettes/push/after_push_pause.json @@ -1 +1 @@ -{"http_interactions":[{"request":{"method":"delete","uri":"https://api.datasift.com/v1.1/push/delete?id=a83072cf024ceab52344d99805f1cb36","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/x-www-form-urlencoded"]}},"response":{"status":{"code":204,"message":"No Content"},"headers":{"Server":["nginx"],"Date":["Thu, 14 May 2015 15:05:43 GMT"],"Content-Type":["text/html"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["8927"],"X-Ratelimit-Cost":["1"],"X-Ratelimit-Reset":["1431617916"],"X-Ratelimit-Reset-Ttl":["1975"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2584"]},"body":{"encoding":"UTF-8","base64_string":""},"http_version":null},"recorded_at":"Thu, 14 May 2015 15:05:44 GMT"},{"request":{"method":"delete","uri":"https://api.datasift.com/v1.2/push/delete?id=3d0fbe41102c39deae6e38023a71d202","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/x-www-form-urlencoded"]}},"response":{"status":{"code":204,"message":"No Content"},"headers":{"Server":["nginx"],"Date":["Wed, 01 Jul 2015 15:37:21 GMT"],"Content-Type":["text/html"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9425"],"X-Ratelimit-Cost":["1"],"X-Ratelimit-Reset":["1435765382"],"X-Ratelimit-Reset-Ttl":["341"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2587"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":""},"http_version":null},"recorded_at":"Wed, 01 Jul 2015 15:37:22 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file +{"http_interactions":[{"request":{"method":"delete","uri":"https://api.datasift.com/v1.2/push/delete?id=433433282180ad86168e87fc499c06d4","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.5.0"],"Authorization":[""]}},"response":{"status":{"code":204,"message":"No Content"},"headers":{"Server":["nginx"],"Date":["Thu, 12 Nov 2015 11:04:54 GMT"],"Content-Type":["text/html"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9283"],"X-Ratelimit-Cost":["1"],"X-Ratelimit-Reset":["1447329263"],"X-Ratelimit-Reset-Ttl":["2969"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"Access-Control-Allow-Methods":["GET,POST,PUT,DELETE"],"X-Served-By":["ded2584"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":""},"http_version":null},"recorded_at":"Thu, 12 Nov 2015 11:04:54 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/push/after_push_resume.json b/test/fixtures/cassettes/push/after_push_resume.json index 0d61831..a2d5318 100644 --- a/test/fixtures/cassettes/push/after_push_resume.json +++ b/test/fixtures/cassettes/push/after_push_resume.json @@ -1 +1 @@ -{"http_interactions":[{"request":{"method":"delete","uri":"https://api.datasift.com/v1.1/push/delete?id=fcd5bebb85d76db84eb42e8fc625626e","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/x-www-form-urlencoded"]}},"response":{"status":{"code":204,"message":"No Content"},"headers":{"Server":["nginx"],"Date":["Thu, 14 May 2015 15:05:31 GMT"],"Content-Type":["text/html"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9024"],"X-Ratelimit-Cost":["1"],"X-Ratelimit-Reset":["1431617916"],"X-Ratelimit-Reset-Ttl":["1985"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2584"]},"body":{"encoding":"UTF-8","base64_string":""},"http_version":null},"recorded_at":"Thu, 14 May 2015 15:05:32 GMT"},{"request":{"method":"delete","uri":"https://api.datasift.com/v1.2/push/delete?id=937edd7c668b9b31521413aa71298cfd","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/x-www-form-urlencoded"]}},"response":{"status":{"code":204,"message":"No Content"},"headers":{"Server":["nginx"],"Date":["Wed, 01 Jul 2015 15:37:19 GMT"],"Content-Type":["text/html"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9449"],"X-Ratelimit-Cost":["1"],"X-Ratelimit-Reset":["1435765382"],"X-Ratelimit-Reset-Ttl":["344"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2587"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":""},"http_version":null},"recorded_at":"Wed, 01 Jul 2015 15:37:20 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file +{"http_interactions":[{"request":{"method":"delete","uri":"https://api.datasift.com/v1.2/push/delete?id=87c3e211bc5106ff430ffcd3fbc8a2b7","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.5.0"],"Authorization":[""]}},"response":{"status":{"code":204,"message":"No Content"},"headers":{"Server":["nginx"],"Date":["Thu, 12 Nov 2015 11:04:50 GMT"],"Content-Type":["text/html"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9319"],"X-Ratelimit-Cost":["1"],"X-Ratelimit-Reset":["1447329263"],"X-Ratelimit-Reset-Ttl":["2973"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"Access-Control-Allow-Methods":["GET,POST,PUT,DELETE"],"X-Served-By":["ded2584"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":""},"http_version":null},"recorded_at":"Thu, 12 Nov 2015 11:04:50 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/push/after_push_stop.json b/test/fixtures/cassettes/push/after_push_stop.json index 4e37e91..a1199fd 100644 --- a/test/fixtures/cassettes/push/after_push_stop.json +++ b/test/fixtures/cassettes/push/after_push_stop.json @@ -1 +1 @@ -{"http_interactions":[{"request":{"method":"delete","uri":"https://api.datasift.com/v1.1/push/delete?id=b6ee7c5a00f1f8c49acabac4dde320dd","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/x-www-form-urlencoded"]}},"response":{"status":{"code":204,"message":"No Content"},"headers":{"Server":["nginx"],"Date":["Thu, 14 May 2015 15:05:46 GMT"],"Content-Type":["text/html"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["8900"],"X-Ratelimit-Cost":["1"],"X-Ratelimit-Reset":["1431617916"],"X-Ratelimit-Reset-Ttl":["1971"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2584"]},"body":{"encoding":"UTF-8","base64_string":""},"http_version":null},"recorded_at":"Thu, 14 May 2015 15:05:47 GMT"},{"request":{"method":"delete","uri":"https://api.datasift.com/v1.2/push/delete?id=814be4b0af12123647df907807c0f75f","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/x-www-form-urlencoded"]}},"response":{"status":{"code":204,"message":"No Content"},"headers":{"Server":["nginx"],"Date":["Wed, 01 Jul 2015 15:37:23 GMT"],"Content-Type":["text/html"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9413"],"X-Ratelimit-Cost":["1"],"X-Ratelimit-Reset":["1435765382"],"X-Ratelimit-Reset-Ttl":["340"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2587"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":""},"http_version":null},"recorded_at":"Wed, 01 Jul 2015 15:37:24 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file +{"http_interactions":[{"request":{"method":"delete","uri":"https://api.datasift.com/v1.2/push/delete?id=92cf1291c467d6f8f146023e0f43ce1a","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.5.0"],"Authorization":[""]}},"response":{"status":{"code":204,"message":"No Content"},"headers":{"Server":["nginx"],"Date":["Thu, 12 Nov 2015 11:04:53 GMT"],"Content-Type":["text/html"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9295"],"X-Ratelimit-Cost":["1"],"X-Ratelimit-Reset":["1447329263"],"X-Ratelimit-Reset-Ttl":["2970"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"Access-Control-Allow-Methods":["GET,POST,PUT,DELETE"],"X-Served-By":["ded2584"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":""},"http_version":null},"recorded_at":"Thu, 12 Nov 2015 11:04:53 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/push/after_push_update.json b/test/fixtures/cassettes/push/after_push_update.json index 4e19efa..9950cd7 100644 --- a/test/fixtures/cassettes/push/after_push_update.json +++ b/test/fixtures/cassettes/push/after_push_update.json @@ -1 +1 @@ -{"http_interactions":[{"request":{"method":"delete","uri":"https://api.datasift.com/v1.1/push/delete?id=2fe7eb95ff26ce994dc27c99c8c4fad8","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/x-www-form-urlencoded"]}},"response":{"status":{"code":204,"message":"No Content"},"headers":{"Server":["nginx"],"Date":["Thu, 14 May 2015 15:05:33 GMT"],"Content-Type":["text/html"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9008"],"X-Ratelimit-Cost":["1"],"X-Ratelimit-Reset":["1431617916"],"X-Ratelimit-Reset-Ttl":["1983"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2584"]},"body":{"encoding":"UTF-8","base64_string":""},"http_version":null},"recorded_at":"Thu, 14 May 2015 15:05:34 GMT"},{"request":{"method":"delete","uri":"https://api.datasift.com/v1.2/push/delete?id=e8173852644b9acc4e96a2bd91e3fa0d","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/x-www-form-urlencoded"]}},"response":{"status":{"code":204,"message":"No Content"},"headers":{"Server":["nginx"],"Date":["Wed, 01 Jul 2015 15:37:17 GMT"],"Content-Type":["text/html"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9462"],"X-Ratelimit-Cost":["1"],"X-Ratelimit-Reset":["1435765382"],"X-Ratelimit-Reset-Ttl":["345"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2587"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":""},"http_version":null},"recorded_at":"Wed, 01 Jul 2015 15:37:18 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file +{"http_interactions":[{"request":{"method":"delete","uri":"https://api.datasift.com/v1.2/push/delete?id=1403418d9f75cd4610fb6115e9272750","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.5.0"],"Authorization":[""]}},"response":{"status":{"code":204,"message":"No Content"},"headers":{"Server":["nginx"],"Date":["Thu, 12 Nov 2015 11:04:44 GMT"],"Content-Type":["text/html"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9376"],"X-Ratelimit-Cost":["1"],"X-Ratelimit-Reset":["1447329263"],"X-Ratelimit-Reset-Ttl":["2979"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"Access-Control-Allow-Methods":["GET,POST,PUT,DELETE"],"X-Served-By":["ded2584"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":""},"http_version":null},"recorded_at":"Thu, 12 Nov 2015 11:04:44 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/push/before_push_create.json b/test/fixtures/cassettes/push/before_push_create.json index 229a060..830268d 100644 --- a/test/fixtures/cassettes/push/before_push_create.json +++ b/test/fixtures/cassettes/push/before_push_create.json @@ -1 +1 @@ -{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.1/compile","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["48"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 14 May 2015 15:05:37 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["8945"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1431617916"],"X-Ratelimit-Reset-Ttl":["1979"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2584"]},"body":{"encoding":"UTF-8","base64_string":"eyJoYXNoIjoiMTQ1ZWEyNGE0ZDgzYTE0ZWNiOTA3N2I4MzFmMTQ4MDkiLCJj\ncmVhdGVkX2F0IjoiMjAxNS0wNS0xNCAxNTowNTozNyIsImRwdSI6IjAuMSJ9\n"},"http_version":null},"recorded_at":"Thu, 14 May 2015 15:05:37 GMT"},{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/compile","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["48"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Wed, 01 Jul 2015 15:37:14 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9484"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1435765382"],"X-Ratelimit-Reset-Ttl":["348"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2584"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJoYXNoIjoiMTQ1ZWEyNGE0ZDgzYTE0ZWNiOTA3N2I4MzFmMTQ4MDkiLCJj\ncmVhdGVkX2F0IjoiMjAxNS0wNy0wMSAxNTozNzoxNCIsImRwdSI6IjAuMSJ9\n"},"http_version":null},"recorded_at":"Wed, 01 Jul 2015 15:37:15 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file +{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/compile","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.5.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["48"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 12 Nov 2015 11:04:44 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9371"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1447329263"],"X-Ratelimit-Reset-Ttl":["2979"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"Access-Control-Allow-Methods":["GET,POST,PUT,DELETE"],"X-Served-By":["ded2584"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJoYXNoIjoiMTQ1ZWEyNGE0ZDgzYTE0ZWNiOTA3N2I4MzFmMTQ4MDkiLCJj\ncmVhdGVkX2F0IjoiMjAxNS0xMS0xMiAxMTowNDo0NCIsImRwdSI6IjAuMSJ9\n"},"http_version":null},"recorded_at":"Thu, 12 Nov 2015 11:04:44 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/push/before_push_delete.json b/test/fixtures/cassettes/push/before_push_delete.json index a8e14ad..db076c0 100644 --- a/test/fixtures/cassettes/push/before_push_delete.json +++ b/test/fixtures/cassettes/push/before_push_delete.json @@ -1 +1 @@ -{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.1/compile","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["48"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 14 May 2015 15:05:47 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["8870"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1431617916"],"X-Ratelimit-Reset-Ttl":["1969"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2587"]},"body":{"encoding":"UTF-8","base64_string":"eyJoYXNoIjoiMTQ1ZWEyNGE0ZDgzYTE0ZWNiOTA3N2I4MzFmMTQ4MDkiLCJj\ncmVhdGVkX2F0IjoiMjAxNS0wNS0xNCAxNTowNTo0NyIsImRwdSI6IjAuMSJ9\n"},"http_version":null},"recorded_at":"Thu, 14 May 2015 15:05:47 GMT"},{"request":{"method":"post","uri":"https://api.datasift.com/v1.1/push/create","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["340"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 14 May 2015 15:05:47 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["8865"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1431617916"],"X-Ratelimit-Reset-Ttl":["1969"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2584"]},"body":{"encoding":"UTF-8","base64_string":"eyJpZCI6ImY0MjkxYzc1OThkNGJiMzc4NzdmMGE3MDkwMDliNmNhIiwib3V0\ncHV0X3R5cGUiOiJzMyIsIm5hbWUiOiJSdWJ5IFB1c2ggRXhhbXBsZSIsImNy\nZWF0ZWRfYXQiOjE0MzE2MTU5NDcsInVzZXJfaWQiOjMwNDksImhhc2giOiIx\nNDVlYTI0YTRkODNhMTRlY2I5MDc3YjgzMWYxNDgwOSIsImhhc2hfdHlwZSI6\nInN0cmVhbSIsIm91dHB1dF9wYXJhbXMiOnsiYnVja2V0IjoiY29tZGF0YXNp\nZnRqYXNvbiIsImRpcmVjdG9yeSI6InJ1YnkiLCJhY2wiOiJwcml2YXRlIiwi\nZGVsaXZlcnlfZnJlcXVlbmN5IjowLCJtYXhfc2l6ZSI6MTA0ODU3NjAwLCJm\naWxlX3ByZWZpeCI6IkRhdGFTaWZ0In0sInN0YXR1cyI6ImFjdGl2ZSIsImxh\nc3RfcmVxdWVzdCI6bnVsbCwibGFzdF9zdWNjZXNzIjpudWxsLCJyZW1haW5p\nbmdfYnl0ZXMiOm51bGwsImxvc3RfZGF0YSI6ZmFsc2UsInN0YXJ0IjoxNDMx\nNjE1OTQ3LCJlbmQiOjB9\n"},"http_version":null},"recorded_at":"Thu, 14 May 2015 15:05:48 GMT"},{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/compile","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["48"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Wed, 01 Jul 2015 15:37:13 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9495"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1435765382"],"X-Ratelimit-Reset-Ttl":["350"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2584"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJoYXNoIjoiMTQ1ZWEyNGE0ZDgzYTE0ZWNiOTA3N2I4MzFmMTQ4MDkiLCJj\ncmVhdGVkX2F0IjoiMjAxNS0wNy0wMSAxNTozNzoxMyIsImRwdSI6IjAuMSJ9\n"},"http_version":null},"recorded_at":"Wed, 01 Jul 2015 15:37:14 GMT"},{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/push/create","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["340"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Wed, 01 Jul 2015 15:37:13 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9490"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1435765382"],"X-Ratelimit-Reset-Ttl":["349"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2584"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJpZCI6ImU3OWNiZGI4NDYxMmNkNGFkMWUxMWZkZmQ5ZjQwZGFjIiwib3V0\ncHV0X3R5cGUiOiJzMyIsIm5hbWUiOiJSdWJ5IFB1c2ggRXhhbXBsZSIsImNy\nZWF0ZWRfYXQiOjE0MzU3NjUwMzMsInVzZXJfaWQiOjMwNDksImhhc2giOiIx\nNDVlYTI0YTRkODNhMTRlY2I5MDc3YjgzMWYxNDgwOSIsImhhc2hfdHlwZSI6\nInN0cmVhbSIsIm91dHB1dF9wYXJhbXMiOnsiYnVja2V0IjoiY29tZGF0YXNp\nZnRqYXNvbiIsImRpcmVjdG9yeSI6InJ1YnkiLCJhY2wiOiJwcml2YXRlIiwi\nZGVsaXZlcnlfZnJlcXVlbmN5IjowLCJtYXhfc2l6ZSI6MTA0ODU3NjAwLCJm\naWxlX3ByZWZpeCI6IkRhdGFTaWZ0In0sInN0YXR1cyI6ImFjdGl2ZSIsImxh\nc3RfcmVxdWVzdCI6bnVsbCwibGFzdF9zdWNjZXNzIjpudWxsLCJyZW1haW5p\nbmdfYnl0ZXMiOm51bGwsImxvc3RfZGF0YSI6ZmFsc2UsInN0YXJ0IjoxNDM1\nNzY1MDMzLCJlbmQiOjB9\n"},"http_version":null},"recorded_at":"Wed, 01 Jul 2015 15:37:14 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file +{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/compile","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.5.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["48"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 12 Nov 2015 11:04:48 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9338"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1447329263"],"X-Ratelimit-Reset-Ttl":["2975"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"Access-Control-Allow-Methods":["GET,POST,PUT,DELETE"],"X-Served-By":["ded2584"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJoYXNoIjoiMTQ1ZWEyNGE0ZDgzYTE0ZWNiOTA3N2I4MzFmMTQ4MDkiLCJj\ncmVhdGVkX2F0IjoiMjAxNS0xMS0xMiAxMTowNDo0OCIsImRwdSI6IjAuMSJ9\n"},"http_version":null},"recorded_at":"Thu, 12 Nov 2015 11:04:48 GMT"},{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/push/create","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.5.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["340"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 12 Nov 2015 11:04:49 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9333"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1447329263"],"X-Ratelimit-Reset-Ttl":["2975"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"Access-Control-Allow-Methods":["GET,POST,PUT,DELETE"],"X-Served-By":["ded2587"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJpZCI6IjQwNjIxY2EwYTgzYjdiYzFiNzBmOTdhOWJmODEyZGVlIiwib3V0\ncHV0X3R5cGUiOiJzMyIsIm5hbWUiOiJSdWJ5IFB1c2ggRXhhbXBsZSIsImNy\nZWF0ZWRfYXQiOjE0NDczMjYyODksInVzZXJfaWQiOjMwNDksImhhc2giOiIx\nNDVlYTI0YTRkODNhMTRlY2I5MDc3YjgzMWYxNDgwOSIsImhhc2hfdHlwZSI6\nInN0cmVhbSIsIm91dHB1dF9wYXJhbXMiOnsiYnVja2V0IjoiY29tZGF0YXNp\nZnRqYXNvbiIsImRpcmVjdG9yeSI6InJ1YnkiLCJhY2wiOiJwcml2YXRlIiwi\nZGVsaXZlcnlfZnJlcXVlbmN5IjowLCJtYXhfc2l6ZSI6MTA0ODU3NjAwLCJm\naWxlX3ByZWZpeCI6IkRhdGFTaWZ0In0sInN0YXR1cyI6ImFjdGl2ZSIsImxh\nc3RfcmVxdWVzdCI6bnVsbCwibGFzdF9zdWNjZXNzIjpudWxsLCJyZW1haW5p\nbmdfYnl0ZXMiOm51bGwsImxvc3RfZGF0YSI6ZmFsc2UsInN0YXJ0IjoxNDQ3\nMzI2Mjg5LCJlbmQiOjB9\n"},"http_version":null},"recorded_at":"Thu, 12 Nov 2015 11:04:49 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/push/before_push_get.json b/test/fixtures/cassettes/push/before_push_get.json index ab0469c..1ad2db5 100644 --- a/test/fixtures/cassettes/push/before_push_get.json +++ b/test/fixtures/cassettes/push/before_push_get.json @@ -1 +1 @@ -{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.1/compile","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["48"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 14 May 2015 15:05:34 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["8958"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1431617916"],"X-Ratelimit-Reset-Ttl":["1982"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2587"]},"body":{"encoding":"UTF-8","base64_string":"eyJoYXNoIjoiMTQ1ZWEyNGE0ZDgzYTE0ZWNiOTA3N2I4MzFmMTQ4MDkiLCJj\ncmVhdGVkX2F0IjoiMjAxNS0wNS0xNCAxNTowNTozNCIsImRwdSI6IjAuMSJ9\n"},"http_version":null},"recorded_at":"Thu, 14 May 2015 15:05:35 GMT"},{"request":{"method":"post","uri":"https://api.datasift.com/v1.1/push/create","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["340"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 14 May 2015 15:05:35 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["8953"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1431617916"],"X-Ratelimit-Reset-Ttl":["1982"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2587"]},"body":{"encoding":"UTF-8","base64_string":"eyJpZCI6IjFmYmJmMzI4Yzg2YmM4MGJjZjFmOGE4NGUyYjgwNWUzIiwib3V0\ncHV0X3R5cGUiOiJzMyIsIm5hbWUiOiJSdWJ5IFB1c2ggRXhhbXBsZSIsImNy\nZWF0ZWRfYXQiOjE0MzE2MTU5MzUsInVzZXJfaWQiOjMwNDksImhhc2giOiIx\nNDVlYTI0YTRkODNhMTRlY2I5MDc3YjgzMWYxNDgwOSIsImhhc2hfdHlwZSI6\nInN0cmVhbSIsIm91dHB1dF9wYXJhbXMiOnsiYnVja2V0IjoiY29tZGF0YXNp\nZnRqYXNvbiIsImRpcmVjdG9yeSI6InJ1YnkiLCJhY2wiOiJwcml2YXRlIiwi\nZGVsaXZlcnlfZnJlcXVlbmN5IjowLCJtYXhfc2l6ZSI6MTA0ODU3NjAwLCJm\naWxlX3ByZWZpeCI6IkRhdGFTaWZ0In0sInN0YXR1cyI6ImFjdGl2ZSIsImxh\nc3RfcmVxdWVzdCI6bnVsbCwibGFzdF9zdWNjZXNzIjpudWxsLCJyZW1haW5p\nbmdfYnl0ZXMiOm51bGwsImxvc3RfZGF0YSI6ZmFsc2UsInN0YXJ0IjoxNDMx\nNjE1OTM1LCJlbmQiOjB9\n"},"http_version":null},"recorded_at":"Thu, 14 May 2015 15:05:35 GMT"},{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/compile","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["48"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Wed, 01 Jul 2015 15:37:10 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9507"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1435765382"],"X-Ratelimit-Reset-Ttl":["352"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2587"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJoYXNoIjoiMTQ1ZWEyNGE0ZDgzYTE0ZWNiOTA3N2I4MzFmMTQ4MDkiLCJj\ncmVhdGVkX2F0IjoiMjAxNS0wNy0wMSAxNTozNzoxMCIsImRwdSI6IjAuMSJ9\n"},"http_version":null},"recorded_at":"Wed, 01 Jul 2015 15:37:11 GMT"},{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/push/create","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["340"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Wed, 01 Jul 2015 15:37:11 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9502"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1435765382"],"X-Ratelimit-Reset-Ttl":["352"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2587"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJpZCI6ImY0YjU5YTlmNjBhZTVhNTNkOTAxZGM2ZTA4MjkxNzU0Iiwib3V0\ncHV0X3R5cGUiOiJzMyIsIm5hbWUiOiJSdWJ5IFB1c2ggRXhhbXBsZSIsImNy\nZWF0ZWRfYXQiOjE0MzU3NjUwMzEsInVzZXJfaWQiOjMwNDksImhhc2giOiIx\nNDVlYTI0YTRkODNhMTRlY2I5MDc3YjgzMWYxNDgwOSIsImhhc2hfdHlwZSI6\nInN0cmVhbSIsIm91dHB1dF9wYXJhbXMiOnsiYnVja2V0IjoiY29tZGF0YXNp\nZnRqYXNvbiIsImRpcmVjdG9yeSI6InJ1YnkiLCJhY2wiOiJwcml2YXRlIiwi\nZGVsaXZlcnlfZnJlcXVlbmN5IjowLCJtYXhfc2l6ZSI6MTA0ODU3NjAwLCJm\naWxlX3ByZWZpeCI6IkRhdGFTaWZ0In0sInN0YXR1cyI6ImFjdGl2ZSIsImxh\nc3RfcmVxdWVzdCI6bnVsbCwibGFzdF9zdWNjZXNzIjpudWxsLCJyZW1haW5p\nbmdfYnl0ZXMiOm51bGwsImxvc3RfZGF0YSI6ZmFsc2UsInN0YXJ0IjoxNDM1\nNzY1MDMxLCJlbmQiOjB9\n"},"http_version":null},"recorded_at":"Wed, 01 Jul 2015 15:37:12 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file +{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/compile","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.5.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["48"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 12 Nov 2015 11:04:50 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9314"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1447329263"],"X-Ratelimit-Reset-Ttl":["2973"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"Access-Control-Allow-Methods":["GET,POST,PUT,DELETE"],"X-Served-By":["ded2587"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJoYXNoIjoiMTQ1ZWEyNGE0ZDgzYTE0ZWNiOTA3N2I4MzFmMTQ4MDkiLCJj\ncmVhdGVkX2F0IjoiMjAxNS0xMS0xMiAxMTowNDo1MCIsImRwdSI6IjAuMSJ9\n"},"http_version":null},"recorded_at":"Thu, 12 Nov 2015 11:04:50 GMT"},{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/push/create","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.5.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["340"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 12 Nov 2015 11:04:51 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9309"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1447329263"],"X-Ratelimit-Reset-Ttl":["2973"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"Access-Control-Allow-Methods":["GET,POST,PUT,DELETE"],"X-Served-By":["ded2584"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJpZCI6ImEyZWFiYmFhZTZmOGE4ZjExNmFhMDhmMWY3NGI1OGVhIiwib3V0\ncHV0X3R5cGUiOiJzMyIsIm5hbWUiOiJSdWJ5IFB1c2ggRXhhbXBsZSIsImNy\nZWF0ZWRfYXQiOjE0NDczMjYyOTEsInVzZXJfaWQiOjMwNDksImhhc2giOiIx\nNDVlYTI0YTRkODNhMTRlY2I5MDc3YjgzMWYxNDgwOSIsImhhc2hfdHlwZSI6\nInN0cmVhbSIsIm91dHB1dF9wYXJhbXMiOnsiYnVja2V0IjoiY29tZGF0YXNp\nZnRqYXNvbiIsImRpcmVjdG9yeSI6InJ1YnkiLCJhY2wiOiJwcml2YXRlIiwi\nZGVsaXZlcnlfZnJlcXVlbmN5IjowLCJtYXhfc2l6ZSI6MTA0ODU3NjAwLCJm\naWxlX3ByZWZpeCI6IkRhdGFTaWZ0In0sInN0YXR1cyI6ImFjdGl2ZSIsImxh\nc3RfcmVxdWVzdCI6bnVsbCwibGFzdF9zdWNjZXNzIjpudWxsLCJyZW1haW5p\nbmdfYnl0ZXMiOm51bGwsImxvc3RfZGF0YSI6ZmFsc2UsInN0YXJ0IjoxNDQ3\nMzI2MjkxLCJlbmQiOjB9\n"},"http_version":null},"recorded_at":"Thu, 12 Nov 2015 11:04:51 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/push/before_push_log.json b/test/fixtures/cassettes/push/before_push_log.json index c7c776a..5bbe095 100644 --- a/test/fixtures/cassettes/push/before_push_log.json +++ b/test/fixtures/cassettes/push/before_push_log.json @@ -1 +1 @@ -{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.1/compile","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["48"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 14 May 2015 15:05:49 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["8844"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1431617916"],"X-Ratelimit-Reset-Ttl":["1967"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2587"]},"body":{"encoding":"UTF-8","base64_string":"eyJoYXNoIjoiMTQ1ZWEyNGE0ZDgzYTE0ZWNiOTA3N2I4MzFmMTQ4MDkiLCJj\ncmVhdGVkX2F0IjoiMjAxNS0wNS0xNCAxNTowNTo0OSIsImRwdSI6IjAuMSJ9\n"},"http_version":null},"recorded_at":"Thu, 14 May 2015 15:05:50 GMT"},{"request":{"method":"post","uri":"https://api.datasift.com/v1.1/push/create","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["340"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 14 May 2015 15:05:50 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["8839"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1431617916"],"X-Ratelimit-Reset-Ttl":["1967"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2587"]},"body":{"encoding":"UTF-8","base64_string":"eyJpZCI6ImYzNDU1MWE2ZDY4NWY4ZjM1NmFmMDEwYTA5YTgzM2UzIiwib3V0\ncHV0X3R5cGUiOiJzMyIsIm5hbWUiOiJSdWJ5IFB1c2ggRXhhbXBsZSIsImNy\nZWF0ZWRfYXQiOjE0MzE2MTU5NTAsInVzZXJfaWQiOjMwNDksImhhc2giOiIx\nNDVlYTI0YTRkODNhMTRlY2I5MDc3YjgzMWYxNDgwOSIsImhhc2hfdHlwZSI6\nInN0cmVhbSIsIm91dHB1dF9wYXJhbXMiOnsiYnVja2V0IjoiY29tZGF0YXNp\nZnRqYXNvbiIsImRpcmVjdG9yeSI6InJ1YnkiLCJhY2wiOiJwcml2YXRlIiwi\nZGVsaXZlcnlfZnJlcXVlbmN5IjowLCJtYXhfc2l6ZSI6MTA0ODU3NjAwLCJm\naWxlX3ByZWZpeCI6IkRhdGFTaWZ0In0sInN0YXR1cyI6ImFjdGl2ZSIsImxh\nc3RfcmVxdWVzdCI6bnVsbCwibGFzdF9zdWNjZXNzIjpudWxsLCJyZW1haW5p\nbmdfYnl0ZXMiOm51bGwsImxvc3RfZGF0YSI6ZmFsc2UsInN0YXJ0IjoxNDMx\nNjE1OTUwLCJlbmQiOjB9\n"},"http_version":null},"recorded_at":"Thu, 14 May 2015 15:05:51 GMT"},{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/compile","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["48"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Wed, 01 Jul 2015 15:37:19 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9444"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1435765382"],"X-Ratelimit-Reset-Ttl":["343"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2584"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJoYXNoIjoiMTQ1ZWEyNGE0ZDgzYTE0ZWNiOTA3N2I4MzFmMTQ4MDkiLCJj\ncmVhdGVkX2F0IjoiMjAxNS0wNy0wMSAxNTozNzoxOSIsImRwdSI6IjAuMSJ9\n"},"http_version":null},"recorded_at":"Wed, 01 Jul 2015 15:37:20 GMT"},{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/push/create","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["340"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Wed, 01 Jul 2015 15:37:19 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9439"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1435765382"],"X-Ratelimit-Reset-Ttl":["343"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2584"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJpZCI6ImE2MGNmYTZjZjEwYWY3ZGNiOWEwOTFmNGJlYzZmNzc5Iiwib3V0\ncHV0X3R5cGUiOiJzMyIsIm5hbWUiOiJSdWJ5IFB1c2ggRXhhbXBsZSIsImNy\nZWF0ZWRfYXQiOjE0MzU3NjUwMzksInVzZXJfaWQiOjMwNDksImhhc2giOiIx\nNDVlYTI0YTRkODNhMTRlY2I5MDc3YjgzMWYxNDgwOSIsImhhc2hfdHlwZSI6\nInN0cmVhbSIsIm91dHB1dF9wYXJhbXMiOnsiYnVja2V0IjoiY29tZGF0YXNp\nZnRqYXNvbiIsImRpcmVjdG9yeSI6InJ1YnkiLCJhY2wiOiJwcml2YXRlIiwi\nZGVsaXZlcnlfZnJlcXVlbmN5IjowLCJtYXhfc2l6ZSI6MTA0ODU3NjAwLCJm\naWxlX3ByZWZpeCI6IkRhdGFTaWZ0In0sInN0YXR1cyI6ImFjdGl2ZSIsImxh\nc3RfcmVxdWVzdCI6bnVsbCwibGFzdF9zdWNjZXNzIjpudWxsLCJyZW1haW5p\nbmdfYnl0ZXMiOm51bGwsImxvc3RfZGF0YSI6ZmFsc2UsInN0YXJ0IjoxNDM1\nNzY1MDM5LCJlbmQiOjB9\n"},"http_version":null},"recorded_at":"Wed, 01 Jul 2015 15:37:21 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file +{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/compile","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.5.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["48"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 12 Nov 2015 11:04:46 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9350"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1447329263"],"X-Ratelimit-Reset-Ttl":["2977"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"Access-Control-Allow-Methods":["GET,POST,PUT,DELETE"],"X-Served-By":["ded2587"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJoYXNoIjoiMTQ1ZWEyNGE0ZDgzYTE0ZWNiOTA3N2I4MzFmMTQ4MDkiLCJj\ncmVhdGVkX2F0IjoiMjAxNS0xMS0xMiAxMTowNDo0NiIsImRwdSI6IjAuMSJ9\n"},"http_version":null},"recorded_at":"Thu, 12 Nov 2015 11:04:46 GMT"},{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/push/create","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.5.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["340"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 12 Nov 2015 11:04:47 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9345"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1447329263"],"X-Ratelimit-Reset-Ttl":["2976"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"Access-Control-Allow-Methods":["GET,POST,PUT,DELETE"],"X-Served-By":["ded2587"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJpZCI6IjA2ZTM0ZDVmYjIxNTlkZTg1NzFmNDA5ZGU1MGUyOTc4Iiwib3V0\ncHV0X3R5cGUiOiJzMyIsIm5hbWUiOiJSdWJ5IFB1c2ggRXhhbXBsZSIsImNy\nZWF0ZWRfYXQiOjE0NDczMjYyODcsInVzZXJfaWQiOjMwNDksImhhc2giOiIx\nNDVlYTI0YTRkODNhMTRlY2I5MDc3YjgzMWYxNDgwOSIsImhhc2hfdHlwZSI6\nInN0cmVhbSIsIm91dHB1dF9wYXJhbXMiOnsiYnVja2V0IjoiY29tZGF0YXNp\nZnRqYXNvbiIsImRpcmVjdG9yeSI6InJ1YnkiLCJhY2wiOiJwcml2YXRlIiwi\nZGVsaXZlcnlfZnJlcXVlbmN5IjowLCJtYXhfc2l6ZSI6MTA0ODU3NjAwLCJm\naWxlX3ByZWZpeCI6IkRhdGFTaWZ0In0sInN0YXR1cyI6ImFjdGl2ZSIsImxh\nc3RfcmVxdWVzdCI6bnVsbCwibGFzdF9zdWNjZXNzIjpudWxsLCJyZW1haW5p\nbmdfYnl0ZXMiOm51bGwsImxvc3RfZGF0YSI6ZmFsc2UsInN0YXJ0IjoxNDQ3\nMzI2Mjg3LCJlbmQiOjB9\n"},"http_version":null},"recorded_at":"Thu, 12 Nov 2015 11:04:47 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/push/before_push_pause.json b/test/fixtures/cassettes/push/before_push_pause.json index 6eae480..2350e92 100644 --- a/test/fixtures/cassettes/push/before_push_pause.json +++ b/test/fixtures/cassettes/push/before_push_pause.json @@ -1 +1 @@ -{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.1/compile","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["48"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 14 May 2015 15:05:39 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["8934"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1431617916"],"X-Ratelimit-Reset-Ttl":["1978"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2587"]},"body":{"encoding":"UTF-8","base64_string":"eyJoYXNoIjoiMTQ1ZWEyNGE0ZDgzYTE0ZWNiOTA3N2I4MzFmMTQ4MDkiLCJj\ncmVhdGVkX2F0IjoiMjAxNS0wNS0xNCAxNTowNTozOSIsImRwdSI6IjAuMSJ9\n"},"http_version":null},"recorded_at":"Thu, 14 May 2015 15:05:39 GMT"},{"request":{"method":"post","uri":"https://api.datasift.com/v1.1/push/create","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["340"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 14 May 2015 15:05:39 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["8929"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1431617916"],"X-Ratelimit-Reset-Ttl":["1977"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2587"]},"body":{"encoding":"UTF-8","base64_string":"eyJpZCI6ImE4MzA3MmNmMDI0Y2VhYjUyMzQ0ZDk5ODA1ZjFjYjM2Iiwib3V0\ncHV0X3R5cGUiOiJzMyIsIm5hbWUiOiJSdWJ5IFB1c2ggRXhhbXBsZSIsImNy\nZWF0ZWRfYXQiOjE0MzE2MTU5MzksInVzZXJfaWQiOjMwNDksImhhc2giOiIx\nNDVlYTI0YTRkODNhMTRlY2I5MDc3YjgzMWYxNDgwOSIsImhhc2hfdHlwZSI6\nInN0cmVhbSIsIm91dHB1dF9wYXJhbXMiOnsiYnVja2V0IjoiY29tZGF0YXNp\nZnRqYXNvbiIsImRpcmVjdG9yeSI6InJ1YnkiLCJhY2wiOiJwcml2YXRlIiwi\nZGVsaXZlcnlfZnJlcXVlbmN5IjowLCJtYXhfc2l6ZSI6MTA0ODU3NjAwLCJm\naWxlX3ByZWZpeCI6IkRhdGFTaWZ0In0sInN0YXR1cyI6ImFjdGl2ZSIsImxh\nc3RfcmVxdWVzdCI6bnVsbCwibGFzdF9zdWNjZXNzIjpudWxsLCJyZW1haW5p\nbmdfYnl0ZXMiOm51bGwsImxvc3RfZGF0YSI6ZmFsc2UsInN0YXJ0IjoxNDMx\nNjE1OTM5LCJlbmQiOjB9\n"},"http_version":null},"recorded_at":"Thu, 14 May 2015 15:05:40 GMT"},{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/compile","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["48"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Wed, 01 Jul 2015 15:37:20 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9432"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1435765382"],"X-Ratelimit-Reset-Ttl":["342"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2584"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJoYXNoIjoiMTQ1ZWEyNGE0ZDgzYTE0ZWNiOTA3N2I4MzFmMTQ4MDkiLCJj\ncmVhdGVkX2F0IjoiMjAxNS0wNy0wMSAxNTozNzoyMCIsImRwdSI6IjAuMSJ9\n"},"http_version":null},"recorded_at":"Wed, 01 Jul 2015 15:37:21 GMT"},{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/push/create","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["340"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Wed, 01 Jul 2015 15:37:21 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9427"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1435765382"],"X-Ratelimit-Reset-Ttl":["342"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2584"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJpZCI6IjNkMGZiZTQxMTAyYzM5ZGVhZTZlMzgwMjNhNzFkMjAyIiwib3V0\ncHV0X3R5cGUiOiJzMyIsIm5hbWUiOiJSdWJ5IFB1c2ggRXhhbXBsZSIsImNy\nZWF0ZWRfYXQiOjE0MzU3NjUwNDEsInVzZXJfaWQiOjMwNDksImhhc2giOiIx\nNDVlYTI0YTRkODNhMTRlY2I5MDc3YjgzMWYxNDgwOSIsImhhc2hfdHlwZSI6\nInN0cmVhbSIsIm91dHB1dF9wYXJhbXMiOnsiYnVja2V0IjoiY29tZGF0YXNp\nZnRqYXNvbiIsImRpcmVjdG9yeSI6InJ1YnkiLCJhY2wiOiJwcml2YXRlIiwi\nZGVsaXZlcnlfZnJlcXVlbmN5IjowLCJtYXhfc2l6ZSI6MTA0ODU3NjAwLCJm\naWxlX3ByZWZpeCI6IkRhdGFTaWZ0In0sInN0YXR1cyI6ImFjdGl2ZSIsImxh\nc3RfcmVxdWVzdCI6bnVsbCwibGFzdF9zdWNjZXNzIjpudWxsLCJyZW1haW5p\nbmdfYnl0ZXMiOm51bGwsImxvc3RfZGF0YSI6ZmFsc2UsInN0YXJ0IjoxNDM1\nNzY1MDQxLCJlbmQiOjB9\n"},"http_version":null},"recorded_at":"Wed, 01 Jul 2015 15:37:22 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file +{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/compile","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.5.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["48"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 12 Nov 2015 11:04:53 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9290"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1447329263"],"X-Ratelimit-Reset-Ttl":["2970"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"Access-Control-Allow-Methods":["GET,POST,PUT,DELETE"],"X-Served-By":["ded2584"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJoYXNoIjoiMTQ1ZWEyNGE0ZDgzYTE0ZWNiOTA3N2I4MzFmMTQ4MDkiLCJj\ncmVhdGVkX2F0IjoiMjAxNS0xMS0xMiAxMTowNDo1MyIsImRwdSI6IjAuMSJ9\n"},"http_version":null},"recorded_at":"Thu, 12 Nov 2015 11:04:53 GMT"},{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/push/create","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.5.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["340"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 12 Nov 2015 11:04:53 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9285"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1447329263"],"X-Ratelimit-Reset-Ttl":["2970"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"Access-Control-Allow-Methods":["GET,POST,PUT,DELETE"],"X-Served-By":["ded2584"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJpZCI6IjQzMzQzMzI4MjE4MGFkODYxNjhlODdmYzQ5OWMwNmQ0Iiwib3V0\ncHV0X3R5cGUiOiJzMyIsIm5hbWUiOiJSdWJ5IFB1c2ggRXhhbXBsZSIsImNy\nZWF0ZWRfYXQiOjE0NDczMjYyOTMsInVzZXJfaWQiOjMwNDksImhhc2giOiIx\nNDVlYTI0YTRkODNhMTRlY2I5MDc3YjgzMWYxNDgwOSIsImhhc2hfdHlwZSI6\nInN0cmVhbSIsIm91dHB1dF9wYXJhbXMiOnsiYnVja2V0IjoiY29tZGF0YXNp\nZnRqYXNvbiIsImRpcmVjdG9yeSI6InJ1YnkiLCJhY2wiOiJwcml2YXRlIiwi\nZGVsaXZlcnlfZnJlcXVlbmN5IjowLCJtYXhfc2l6ZSI6MTA0ODU3NjAwLCJm\naWxlX3ByZWZpeCI6IkRhdGFTaWZ0In0sInN0YXR1cyI6ImFjdGl2ZSIsImxh\nc3RfcmVxdWVzdCI6bnVsbCwibGFzdF9zdWNjZXNzIjpudWxsLCJyZW1haW5p\nbmdfYnl0ZXMiOm51bGwsImxvc3RfZGF0YSI6ZmFsc2UsInN0YXJ0IjoxNDQ3\nMzI2MjkzLCJlbmQiOjB9\n"},"http_version":null},"recorded_at":"Thu, 12 Nov 2015 11:04:53 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/push/before_push_resume.json b/test/fixtures/cassettes/push/before_push_resume.json index 797c723..bed6388 100644 --- a/test/fixtures/cassettes/push/before_push_resume.json +++ b/test/fixtures/cassettes/push/before_push_resume.json @@ -1 +1 @@ -{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.1/compile","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["48"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 14 May 2015 15:05:30 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9032"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1431617916"],"X-Ratelimit-Reset-Ttl":["1986"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2584"]},"body":{"encoding":"UTF-8","base64_string":"eyJoYXNoIjoiMTQ1ZWEyNGE0ZDgzYTE0ZWNiOTA3N2I4MzFmMTQ4MDkiLCJj\ncmVhdGVkX2F0IjoiMjAxNS0wNS0xNCAxNTowNTozMCIsImRwdSI6IjAuMSJ9\n"},"http_version":null},"recorded_at":"Thu, 14 May 2015 15:05:30 GMT"},{"request":{"method":"post","uri":"https://api.datasift.com/v1.1/push/create","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["340"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 14 May 2015 15:05:31 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9027"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1431617916"],"X-Ratelimit-Reset-Ttl":["1986"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2584"]},"body":{"encoding":"UTF-8","base64_string":"eyJpZCI6ImZjZDViZWJiODVkNzZkYjg0ZWI0MmU4ZmM2MjU2MjZlIiwib3V0\ncHV0X3R5cGUiOiJzMyIsIm5hbWUiOiJSdWJ5IFB1c2ggRXhhbXBsZSIsImNy\nZWF0ZWRfYXQiOjE0MzE2MTU5MzAsInVzZXJfaWQiOjMwNDksImhhc2giOiIx\nNDVlYTI0YTRkODNhMTRlY2I5MDc3YjgzMWYxNDgwOSIsImhhc2hfdHlwZSI6\nInN0cmVhbSIsIm91dHB1dF9wYXJhbXMiOnsiYnVja2V0IjoiY29tZGF0YXNp\nZnRqYXNvbiIsImRpcmVjdG9yeSI6InJ1YnkiLCJhY2wiOiJwcml2YXRlIiwi\nZGVsaXZlcnlfZnJlcXVlbmN5IjowLCJtYXhfc2l6ZSI6MTA0ODU3NjAwLCJm\naWxlX3ByZWZpeCI6IkRhdGFTaWZ0In0sInN0YXR1cyI6ImFjdGl2ZSIsImxh\nc3RfcmVxdWVzdCI6bnVsbCwibGFzdF9zdWNjZXNzIjpudWxsLCJyZW1haW5p\nbmdfYnl0ZXMiOm51bGwsImxvc3RfZGF0YSI6ZmFsc2UsInN0YXJ0IjoxNDMx\nNjE1OTMwLCJlbmQiOjB9\n"},"http_version":null},"recorded_at":"Thu, 14 May 2015 15:05:31 GMT"},{"request":{"method":"put","uri":"https://api.datasift.com/v1.1/push/pause","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["41"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 14 May 2015 15:05:31 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9026"],"X-Ratelimit-Cost":["1"],"X-Ratelimit-Reset":["1431617916"],"X-Ratelimit-Reset-Ttl":["1985"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2584"]},"body":{"encoding":"UTF-8","base64_string":"eyJpZCI6ImZjZDViZWJiODVkNzZkYjg0ZWI0MmU4ZmM2MjU2MjZlIiwib3V0\ncHV0X3R5cGUiOiJzMyIsIm5hbWUiOiJSdWJ5IFB1c2ggRXhhbXBsZSIsImNy\nZWF0ZWRfYXQiOjE0MzE2MTU5MzAsInVzZXJfaWQiOjMwNDksImhhc2giOiIx\nNDVlYTI0YTRkODNhMTRlY2I5MDc3YjgzMWYxNDgwOSIsImhhc2hfdHlwZSI6\nInN0cmVhbSIsIm91dHB1dF9wYXJhbXMiOnsiYnVja2V0IjoiY29tZGF0YXNp\nZnRqYXNvbiIsImRpcmVjdG9yeSI6InJ1YnkiLCJhY2wiOiJwcml2YXRlIiwi\nZGVsaXZlcnlfZnJlcXVlbmN5IjowLCJtYXhfc2l6ZSI6MTA0ODU3NjAwLCJm\naWxlX3ByZWZpeCI6IkRhdGFTaWZ0In0sInN0YXR1cyI6InBhdXNlZCIsImxh\nc3RfcmVxdWVzdCI6bnVsbCwibGFzdF9zdWNjZXNzIjpudWxsLCJyZW1haW5p\nbmdfYnl0ZXMiOm51bGwsImxvc3RfZGF0YSI6ZmFsc2UsInN0YXJ0IjoxNDMx\nNjE1OTMwLCJlbmQiOm51bGx9\n"},"http_version":null},"recorded_at":"Thu, 14 May 2015 15:05:31 GMT"},{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/compile","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["48"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Wed, 01 Jul 2015 15:37:17 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9457"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1435765382"],"X-Ratelimit-Reset-Ttl":["345"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2587"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJoYXNoIjoiMTQ1ZWEyNGE0ZDgzYTE0ZWNiOTA3N2I4MzFmMTQ4MDkiLCJj\ncmVhdGVkX2F0IjoiMjAxNS0wNy0wMSAxNTozNzoxNyIsImRwdSI6IjAuMSJ9\n"},"http_version":null},"recorded_at":"Wed, 01 Jul 2015 15:37:18 GMT"},{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/push/create","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["340"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Wed, 01 Jul 2015 15:37:18 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9452"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1435765382"],"X-Ratelimit-Reset-Ttl":["345"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2587"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJpZCI6IjkzN2VkZDdjNjY4YjliMzE1MjE0MTNhYTcxMjk4Y2ZkIiwib3V0\ncHV0X3R5cGUiOiJzMyIsIm5hbWUiOiJSdWJ5IFB1c2ggRXhhbXBsZSIsImNy\nZWF0ZWRfYXQiOjE0MzU3NjUwMzgsInVzZXJfaWQiOjMwNDksImhhc2giOiIx\nNDVlYTI0YTRkODNhMTRlY2I5MDc3YjgzMWYxNDgwOSIsImhhc2hfdHlwZSI6\nInN0cmVhbSIsIm91dHB1dF9wYXJhbXMiOnsiYnVja2V0IjoiY29tZGF0YXNp\nZnRqYXNvbiIsImRpcmVjdG9yeSI6InJ1YnkiLCJhY2wiOiJwcml2YXRlIiwi\nZGVsaXZlcnlfZnJlcXVlbmN5IjowLCJtYXhfc2l6ZSI6MTA0ODU3NjAwLCJm\naWxlX3ByZWZpeCI6IkRhdGFTaWZ0In0sInN0YXR1cyI6ImFjdGl2ZSIsImxh\nc3RfcmVxdWVzdCI6bnVsbCwibGFzdF9zdWNjZXNzIjpudWxsLCJyZW1haW5p\nbmdfYnl0ZXMiOm51bGwsImxvc3RfZGF0YSI6ZmFsc2UsInN0YXJ0IjoxNDM1\nNzY1MDM4LCJlbmQiOjB9\n"},"http_version":null},"recorded_at":"Wed, 01 Jul 2015 15:37:19 GMT"},{"request":{"method":"put","uri":"https://api.datasift.com/v1.2/push/pause","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["41"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Wed, 01 Jul 2015 15:37:18 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9451"],"X-Ratelimit-Cost":["1"],"X-Ratelimit-Reset":["1435765382"],"X-Ratelimit-Reset-Ttl":["344"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2587"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJpZCI6IjkzN2VkZDdjNjY4YjliMzE1MjE0MTNhYTcxMjk4Y2ZkIiwib3V0\ncHV0X3R5cGUiOiJzMyIsIm5hbWUiOiJSdWJ5IFB1c2ggRXhhbXBsZSIsImNy\nZWF0ZWRfYXQiOjE0MzU3NjUwMzgsInVzZXJfaWQiOjMwNDksImhhc2giOiIx\nNDVlYTI0YTRkODNhMTRlY2I5MDc3YjgzMWYxNDgwOSIsImhhc2hfdHlwZSI6\nInN0cmVhbSIsIm91dHB1dF9wYXJhbXMiOnsiYnVja2V0IjoiY29tZGF0YXNp\nZnRqYXNvbiIsImRpcmVjdG9yeSI6InJ1YnkiLCJhY2wiOiJwcml2YXRlIiwi\nZGVsaXZlcnlfZnJlcXVlbmN5IjowLCJtYXhfc2l6ZSI6MTA0ODU3NjAwLCJm\naWxlX3ByZWZpeCI6IkRhdGFTaWZ0In0sInN0YXR1cyI6InBhdXNlZCIsImxh\nc3RfcmVxdWVzdCI6bnVsbCwibGFzdF9zdWNjZXNzIjpudWxsLCJyZW1haW5p\nbmdfYnl0ZXMiOm51bGwsImxvc3RfZGF0YSI6ZmFsc2UsInN0YXJ0IjoxNDM1\nNzY1MDM4LCJlbmQiOm51bGx9\n"},"http_version":null},"recorded_at":"Wed, 01 Jul 2015 15:37:19 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file +{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/compile","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.5.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["48"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 12 Nov 2015 11:04:49 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9327"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1447329263"],"X-Ratelimit-Reset-Ttl":["2974"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"Access-Control-Allow-Methods":["GET,POST,PUT,DELETE"],"X-Served-By":["ded2587"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJoYXNoIjoiMTQ1ZWEyNGE0ZDgzYTE0ZWNiOTA3N2I4MzFmMTQ4MDkiLCJj\ncmVhdGVkX2F0IjoiMjAxNS0xMS0xMiAxMTowNDo0OSIsImRwdSI6IjAuMSJ9\n"},"http_version":null},"recorded_at":"Thu, 12 Nov 2015 11:04:49 GMT"},{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/push/create","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.5.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["340"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 12 Nov 2015 11:04:50 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9322"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1447329263"],"X-Ratelimit-Reset-Ttl":["2974"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"Access-Control-Allow-Methods":["GET,POST,PUT,DELETE"],"X-Served-By":["ded2587"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJpZCI6Ijg3YzNlMjExYmM1MTA2ZmY0MzBmZmNkM2ZiYzhhMmI3Iiwib3V0\ncHV0X3R5cGUiOiJzMyIsIm5hbWUiOiJSdWJ5IFB1c2ggRXhhbXBsZSIsImNy\nZWF0ZWRfYXQiOjE0NDczMjYyOTAsInVzZXJfaWQiOjMwNDksImhhc2giOiIx\nNDVlYTI0YTRkODNhMTRlY2I5MDc3YjgzMWYxNDgwOSIsImhhc2hfdHlwZSI6\nInN0cmVhbSIsIm91dHB1dF9wYXJhbXMiOnsiYnVja2V0IjoiY29tZGF0YXNp\nZnRqYXNvbiIsImRpcmVjdG9yeSI6InJ1YnkiLCJhY2wiOiJwcml2YXRlIiwi\nZGVsaXZlcnlfZnJlcXVlbmN5IjowLCJtYXhfc2l6ZSI6MTA0ODU3NjAwLCJm\naWxlX3ByZWZpeCI6IkRhdGFTaWZ0In0sInN0YXR1cyI6ImFjdGl2ZSIsImxh\nc3RfcmVxdWVzdCI6bnVsbCwibGFzdF9zdWNjZXNzIjpudWxsLCJyZW1haW5p\nbmdfYnl0ZXMiOm51bGwsImxvc3RfZGF0YSI6ZmFsc2UsInN0YXJ0IjoxNDQ3\nMzI2MjkwLCJlbmQiOjB9\n"},"http_version":null},"recorded_at":"Thu, 12 Nov 2015 11:04:50 GMT"},{"request":{"method":"put","uri":"https://api.datasift.com/v1.2/push/pause","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.5.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["41"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 12 Nov 2015 11:04:50 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9321"],"X-Ratelimit-Cost":["1"],"X-Ratelimit-Reset":["1447329263"],"X-Ratelimit-Reset-Ttl":["2973"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"Access-Control-Allow-Methods":["GET,POST,PUT,DELETE"],"X-Served-By":["ded2584"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJpZCI6Ijg3YzNlMjExYmM1MTA2ZmY0MzBmZmNkM2ZiYzhhMmI3Iiwib3V0\ncHV0X3R5cGUiOiJzMyIsIm5hbWUiOiJSdWJ5IFB1c2ggRXhhbXBsZSIsImNy\nZWF0ZWRfYXQiOjE0NDczMjYyOTAsInVzZXJfaWQiOjMwNDksImhhc2giOiIx\nNDVlYTI0YTRkODNhMTRlY2I5MDc3YjgzMWYxNDgwOSIsImhhc2hfdHlwZSI6\nInN0cmVhbSIsIm91dHB1dF9wYXJhbXMiOnsiYnVja2V0IjoiY29tZGF0YXNp\nZnRqYXNvbiIsImRpcmVjdG9yeSI6InJ1YnkiLCJhY2wiOiJwcml2YXRlIiwi\nZGVsaXZlcnlfZnJlcXVlbmN5IjowLCJtYXhfc2l6ZSI6MTA0ODU3NjAwLCJm\naWxlX3ByZWZpeCI6IkRhdGFTaWZ0In0sInN0YXR1cyI6InBhdXNlZCIsImxh\nc3RfcmVxdWVzdCI6bnVsbCwibGFzdF9zdWNjZXNzIjpudWxsLCJyZW1haW5p\nbmdfYnl0ZXMiOm51bGwsImxvc3RfZGF0YSI6ZmFsc2UsInN0YXJ0IjoxNDQ3\nMzI2MjkwLCJlbmQiOm51bGx9\n"},"http_version":null},"recorded_at":"Thu, 12 Nov 2015 11:04:50 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/push/before_push_stop.json b/test/fixtures/cassettes/push/before_push_stop.json index 09c863e..759cae2 100644 --- a/test/fixtures/cassettes/push/before_push_stop.json +++ b/test/fixtures/cassettes/push/before_push_stop.json @@ -1 +1 @@ -{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.1/compile","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["48"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 14 May 2015 15:05:44 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["8907"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1431617916"],"X-Ratelimit-Reset-Ttl":["1972"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2584"]},"body":{"encoding":"UTF-8","base64_string":"eyJoYXNoIjoiMTQ1ZWEyNGE0ZDgzYTE0ZWNiOTA3N2I4MzFmMTQ4MDkiLCJj\ncmVhdGVkX2F0IjoiMjAxNS0wNS0xNCAxNTowNTo0NCIsImRwdSI6IjAuMSJ9\n"},"http_version":null},"recorded_at":"Thu, 14 May 2015 15:05:44 GMT"},{"request":{"method":"post","uri":"https://api.datasift.com/v1.1/push/create","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["340"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 14 May 2015 15:05:44 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["8902"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1431617916"],"X-Ratelimit-Reset-Ttl":["1972"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2584"]},"body":{"encoding":"UTF-8","base64_string":"eyJpZCI6ImI2ZWU3YzVhMDBmMWY4YzQ5YWNhYmFjNGRkZTMyMGRkIiwib3V0\ncHV0X3R5cGUiOiJzMyIsIm5hbWUiOiJSdWJ5IFB1c2ggRXhhbXBsZSIsImNy\nZWF0ZWRfYXQiOjE0MzE2MTU5NDQsInVzZXJfaWQiOjMwNDksImhhc2giOiIx\nNDVlYTI0YTRkODNhMTRlY2I5MDc3YjgzMWYxNDgwOSIsImhhc2hfdHlwZSI6\nInN0cmVhbSIsIm91dHB1dF9wYXJhbXMiOnsiYnVja2V0IjoiY29tZGF0YXNp\nZnRqYXNvbiIsImRpcmVjdG9yeSI6InJ1YnkiLCJhY2wiOiJwcml2YXRlIiwi\nZGVsaXZlcnlfZnJlcXVlbmN5IjowLCJtYXhfc2l6ZSI6MTA0ODU3NjAwLCJm\naWxlX3ByZWZpeCI6IkRhdGFTaWZ0In0sInN0YXR1cyI6ImFjdGl2ZSIsImxh\nc3RfcmVxdWVzdCI6bnVsbCwibGFzdF9zdWNjZXNzIjpudWxsLCJyZW1haW5p\nbmdfYnl0ZXMiOm51bGwsImxvc3RfZGF0YSI6ZmFsc2UsInN0YXJ0IjoxNDMx\nNjE1OTQ0LCJlbmQiOjB9\n"},"http_version":null},"recorded_at":"Thu, 14 May 2015 15:05:45 GMT"},{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/compile","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["48"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Wed, 01 Jul 2015 15:37:21 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9420"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1435765382"],"X-Ratelimit-Reset-Ttl":["341"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2584"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJoYXNoIjoiMTQ1ZWEyNGE0ZDgzYTE0ZWNiOTA3N2I4MzFmMTQ4MDkiLCJj\ncmVhdGVkX2F0IjoiMjAxNS0wNy0wMSAxNTozNzoyMSIsImRwdSI6IjAuMSJ9\n"},"http_version":null},"recorded_at":"Wed, 01 Jul 2015 15:37:22 GMT"},{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/push/create","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["340"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Wed, 01 Jul 2015 15:37:22 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9415"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1435765382"],"X-Ratelimit-Reset-Ttl":["341"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2584"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJpZCI6IjgxNGJlNGIwYWYxMjEyMzY0N2RmOTA3ODA3YzBmNzVmIiwib3V0\ncHV0X3R5cGUiOiJzMyIsIm5hbWUiOiJSdWJ5IFB1c2ggRXhhbXBsZSIsImNy\nZWF0ZWRfYXQiOjE0MzU3NjUwNDIsInVzZXJfaWQiOjMwNDksImhhc2giOiIx\nNDVlYTI0YTRkODNhMTRlY2I5MDc3YjgzMWYxNDgwOSIsImhhc2hfdHlwZSI6\nInN0cmVhbSIsIm91dHB1dF9wYXJhbXMiOnsiYnVja2V0IjoiY29tZGF0YXNp\nZnRqYXNvbiIsImRpcmVjdG9yeSI6InJ1YnkiLCJhY2wiOiJwcml2YXRlIiwi\nZGVsaXZlcnlfZnJlcXVlbmN5IjowLCJtYXhfc2l6ZSI6MTA0ODU3NjAwLCJm\naWxlX3ByZWZpeCI6IkRhdGFTaWZ0In0sInN0YXR1cyI6ImFjdGl2ZSIsImxh\nc3RfcmVxdWVzdCI6bnVsbCwibGFzdF9zdWNjZXNzIjpudWxsLCJyZW1haW5p\nbmdfYnl0ZXMiOm51bGwsImxvc3RfZGF0YSI6ZmFsc2UsInN0YXJ0IjoxNDM1\nNzY1MDQyLCJlbmQiOjB9\n"},"http_version":null},"recorded_at":"Wed, 01 Jul 2015 15:37:23 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file +{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/compile","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.5.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["48"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 12 Nov 2015 11:04:51 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9302"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1447329263"],"X-Ratelimit-Reset-Ttl":["2972"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"Access-Control-Allow-Methods":["GET,POST,PUT,DELETE"],"X-Served-By":["ded2584"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJoYXNoIjoiMTQ1ZWEyNGE0ZDgzYTE0ZWNiOTA3N2I4MzFmMTQ4MDkiLCJj\ncmVhdGVkX2F0IjoiMjAxNS0xMS0xMiAxMTowNDo1MSIsImRwdSI6IjAuMSJ9\n"},"http_version":null},"recorded_at":"Thu, 12 Nov 2015 11:04:51 GMT"},{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/push/create","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.5.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["340"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 12 Nov 2015 11:04:52 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9297"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1447329263"],"X-Ratelimit-Reset-Ttl":["2971"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"Access-Control-Allow-Methods":["GET,POST,PUT,DELETE"],"X-Served-By":["ded2587"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJpZCI6IjkyY2YxMjkxYzQ2N2Q2ZjhmMTQ2MDIzZTBmNDNjZTFhIiwib3V0\ncHV0X3R5cGUiOiJzMyIsIm5hbWUiOiJSdWJ5IFB1c2ggRXhhbXBsZSIsImNy\nZWF0ZWRfYXQiOjE0NDczMjYyOTIsInVzZXJfaWQiOjMwNDksImhhc2giOiIx\nNDVlYTI0YTRkODNhMTRlY2I5MDc3YjgzMWYxNDgwOSIsImhhc2hfdHlwZSI6\nInN0cmVhbSIsIm91dHB1dF9wYXJhbXMiOnsiYnVja2V0IjoiY29tZGF0YXNp\nZnRqYXNvbiIsImRpcmVjdG9yeSI6InJ1YnkiLCJhY2wiOiJwcml2YXRlIiwi\nZGVsaXZlcnlfZnJlcXVlbmN5IjowLCJtYXhfc2l6ZSI6MTA0ODU3NjAwLCJm\naWxlX3ByZWZpeCI6IkRhdGFTaWZ0In0sInN0YXR1cyI6ImFjdGl2ZSIsImxh\nc3RfcmVxdWVzdCI6bnVsbCwibGFzdF9zdWNjZXNzIjpudWxsLCJyZW1haW5p\nbmdfYnl0ZXMiOm51bGwsImxvc3RfZGF0YSI6ZmFsc2UsInN0YXJ0IjoxNDQ3\nMzI2MjkyLCJlbmQiOjB9\n"},"http_version":null},"recorded_at":"Thu, 12 Nov 2015 11:04:52 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/push/before_push_update.json b/test/fixtures/cassettes/push/before_push_update.json index 8d74a69..34e7bd0 100644 --- a/test/fixtures/cassettes/push/before_push_update.json +++ b/test/fixtures/cassettes/push/before_push_update.json @@ -1 +1 @@ -{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.1/compile","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["48"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 14 May 2015 15:05:31 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9019"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1431617916"],"X-Ratelimit-Reset-Ttl":["1985"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2587"]},"body":{"encoding":"UTF-8","base64_string":"eyJoYXNoIjoiMTQ1ZWEyNGE0ZDgzYTE0ZWNiOTA3N2I4MzFmMTQ4MDkiLCJj\ncmVhdGVkX2F0IjoiMjAxNS0wNS0xNCAxNTowNTozMSIsImRwdSI6IjAuMSJ9\n"},"http_version":null},"recorded_at":"Thu, 14 May 2015 15:05:32 GMT"},{"request":{"method":"post","uri":"https://api.datasift.com/v1.1/push/create","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["340"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 14 May 2015 15:05:32 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9014"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1431617916"],"X-Ratelimit-Reset-Ttl":["1985"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2584"]},"body":{"encoding":"UTF-8","base64_string":"eyJpZCI6IjJmZTdlYjk1ZmYyNmNlOTk0ZGMyN2M5OWM4YzRmYWQ4Iiwib3V0\ncHV0X3R5cGUiOiJzMyIsIm5hbWUiOiJSdWJ5IFB1c2ggRXhhbXBsZSIsImNy\nZWF0ZWRfYXQiOjE0MzE2MTU5MzIsInVzZXJfaWQiOjMwNDksImhhc2giOiIx\nNDVlYTI0YTRkODNhMTRlY2I5MDc3YjgzMWYxNDgwOSIsImhhc2hfdHlwZSI6\nInN0cmVhbSIsIm91dHB1dF9wYXJhbXMiOnsiYnVja2V0IjoiY29tZGF0YXNp\nZnRqYXNvbiIsImRpcmVjdG9yeSI6InJ1YnkiLCJhY2wiOiJwcml2YXRlIiwi\nZGVsaXZlcnlfZnJlcXVlbmN5IjowLCJtYXhfc2l6ZSI6MTA0ODU3NjAwLCJm\naWxlX3ByZWZpeCI6IkRhdGFTaWZ0In0sInN0YXR1cyI6ImFjdGl2ZSIsImxh\nc3RfcmVxdWVzdCI6bnVsbCwibGFzdF9zdWNjZXNzIjpudWxsLCJyZW1haW5p\nbmdfYnl0ZXMiOm51bGwsImxvc3RfZGF0YSI6ZmFsc2UsInN0YXJ0IjoxNDMx\nNjE1OTMyLCJlbmQiOjB9\n"},"http_version":null},"recorded_at":"Thu, 14 May 2015 15:05:33 GMT"},{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/compile","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["48"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Wed, 01 Jul 2015 15:37:15 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9473"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1435765382"],"X-Ratelimit-Reset-Ttl":["347"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2584"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJoYXNoIjoiMTQ1ZWEyNGE0ZDgzYTE0ZWNiOTA3N2I4MzFmMTQ4MDkiLCJj\ncmVhdGVkX2F0IjoiMjAxNS0wNy0wMSAxNTozNzoxNSIsImRwdSI6IjAuMSJ9\n"},"http_version":null},"recorded_at":"Wed, 01 Jul 2015 15:37:16 GMT"},{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/push/create","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["340"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Wed, 01 Jul 2015 15:37:16 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9468"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1435765382"],"X-Ratelimit-Reset-Ttl":["347"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2587"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJpZCI6ImU4MTczODUyNjQ0YjlhY2M0ZTk2YTJiZDkxZTNmYTBkIiwib3V0\ncHV0X3R5cGUiOiJzMyIsIm5hbWUiOiJSdWJ5IFB1c2ggRXhhbXBsZSIsImNy\nZWF0ZWRfYXQiOjE0MzU3NjUwMzYsInVzZXJfaWQiOjMwNDksImhhc2giOiIx\nNDVlYTI0YTRkODNhMTRlY2I5MDc3YjgzMWYxNDgwOSIsImhhc2hfdHlwZSI6\nInN0cmVhbSIsIm91dHB1dF9wYXJhbXMiOnsiYnVja2V0IjoiY29tZGF0YXNp\nZnRqYXNvbiIsImRpcmVjdG9yeSI6InJ1YnkiLCJhY2wiOiJwcml2YXRlIiwi\nZGVsaXZlcnlfZnJlcXVlbmN5IjowLCJtYXhfc2l6ZSI6MTA0ODU3NjAwLCJm\naWxlX3ByZWZpeCI6IkRhdGFTaWZ0In0sInN0YXR1cyI6ImFjdGl2ZSIsImxh\nc3RfcmVxdWVzdCI6bnVsbCwibGFzdF9zdWNjZXNzIjpudWxsLCJyZW1haW5p\nbmdfYnl0ZXMiOm51bGwsImxvc3RfZGF0YSI6ZmFsc2UsInN0YXJ0IjoxNDM1\nNzY1MDM2LCJlbmQiOjB9\n"},"http_version":null},"recorded_at":"Wed, 01 Jul 2015 15:37:17 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file +{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/compile","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.5.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["48"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 12 Nov 2015 11:04:42 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9387"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1447329263"],"X-Ratelimit-Reset-Ttl":["2981"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"Access-Control-Allow-Methods":["GET,POST,PUT,DELETE"],"X-Served-By":["ded2584"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJoYXNoIjoiMTQ1ZWEyNGE0ZDgzYTE0ZWNiOTA3N2I4MzFmMTQ4MDkiLCJj\ncmVhdGVkX2F0IjoiMjAxNS0xMS0xMiAxMTowNDo0MiIsImRwdSI6IjAuMSJ9\n"},"http_version":null},"recorded_at":"Thu, 12 Nov 2015 11:04:42 GMT"},{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/push/create","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.5.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["340"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 12 Nov 2015 11:04:43 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9382"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1447329263"],"X-Ratelimit-Reset-Ttl":["2981"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"Access-Control-Allow-Methods":["GET,POST,PUT,DELETE"],"X-Served-By":["ded2584"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJpZCI6IjE0MDM0MThkOWY3NWNkNDYxMGZiNjExNWU5MjcyNzUwIiwib3V0\ncHV0X3R5cGUiOiJzMyIsIm5hbWUiOiJSdWJ5IFB1c2ggRXhhbXBsZSIsImNy\nZWF0ZWRfYXQiOjE0NDczMjYyODMsInVzZXJfaWQiOjMwNDksImhhc2giOiIx\nNDVlYTI0YTRkODNhMTRlY2I5MDc3YjgzMWYxNDgwOSIsImhhc2hfdHlwZSI6\nInN0cmVhbSIsIm91dHB1dF9wYXJhbXMiOnsiYnVja2V0IjoiY29tZGF0YXNp\nZnRqYXNvbiIsImRpcmVjdG9yeSI6InJ1YnkiLCJhY2wiOiJwcml2YXRlIiwi\nZGVsaXZlcnlfZnJlcXVlbmN5IjowLCJtYXhfc2l6ZSI6MTA0ODU3NjAwLCJm\naWxlX3ByZWZpeCI6IkRhdGFTaWZ0In0sInN0YXR1cyI6ImFjdGl2ZSIsImxh\nc3RfcmVxdWVzdCI6bnVsbCwibGFzdF9zdWNjZXNzIjpudWxsLCJyZW1haW5p\nbmdfYnl0ZXMiOm51bGwsImxvc3RfZGF0YSI6ZmFsc2UsInN0YXJ0IjoxNDQ3\nMzI2MjgzLCJlbmQiOjB9\n"},"http_version":null},"recorded_at":"Thu, 12 Nov 2015 11:04:43 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/push/push_create.json b/test/fixtures/cassettes/push/push_create.json index 62f1515..442adad 100644 --- a/test/fixtures/cassettes/push/push_create.json +++ b/test/fixtures/cassettes/push/push_create.json @@ -1 +1 @@ -{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.1/push/create","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["340"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 14 May 2015 15:05:37 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["8940"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1431617916"],"X-Ratelimit-Reset-Ttl":["1979"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2587"]},"body":{"encoding":"UTF-8","base64_string":"eyJpZCI6ImRkYzhjMTU3ZjYxNmFlZTNhYWExY2ZlNzA2NmJjZWZmIiwib3V0\ncHV0X3R5cGUiOiJzMyIsIm5hbWUiOiJSdWJ5IFB1c2ggRXhhbXBsZSIsImNy\nZWF0ZWRfYXQiOjE0MzE2MTU5MzcsInVzZXJfaWQiOjMwNDksImhhc2giOiIx\nNDVlYTI0YTRkODNhMTRlY2I5MDc3YjgzMWYxNDgwOSIsImhhc2hfdHlwZSI6\nInN0cmVhbSIsIm91dHB1dF9wYXJhbXMiOnsiYnVja2V0IjoiY29tZGF0YXNp\nZnRqYXNvbiIsImRpcmVjdG9yeSI6InJ1YnkiLCJhY2wiOiJwcml2YXRlIiwi\nZGVsaXZlcnlfZnJlcXVlbmN5IjowLCJtYXhfc2l6ZSI6MTA0ODU3NjAwLCJm\naWxlX3ByZWZpeCI6IkRhdGFTaWZ0In0sInN0YXR1cyI6ImFjdGl2ZSIsImxh\nc3RfcmVxdWVzdCI6bnVsbCwibGFzdF9zdWNjZXNzIjpudWxsLCJyZW1haW5p\nbmdfYnl0ZXMiOm51bGwsImxvc3RfZGF0YSI6ZmFsc2UsInN0YXJ0IjoxNDMx\nNjE1OTM3LCJlbmQiOjB9\n"},"http_version":null},"recorded_at":"Thu, 14 May 2015 15:05:38 GMT"},{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/push/create","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["340"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Wed, 01 Jul 2015 15:37:15 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9479"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1435765382"],"X-Ratelimit-Reset-Ttl":["348"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2587"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJpZCI6IjczYTNlY2YyMTI5ZDVlNDkwODEyYjZiNThiMTJiNmY3Iiwib3V0\ncHV0X3R5cGUiOiJzMyIsIm5hbWUiOiJSdWJ5IFB1c2ggRXhhbXBsZSIsImNy\nZWF0ZWRfYXQiOjE0MzU3NjUwMzQsInVzZXJfaWQiOjMwNDksImhhc2giOiIx\nNDVlYTI0YTRkODNhMTRlY2I5MDc3YjgzMWYxNDgwOSIsImhhc2hfdHlwZSI6\nInN0cmVhbSIsIm91dHB1dF9wYXJhbXMiOnsiYnVja2V0IjoiY29tZGF0YXNp\nZnRqYXNvbiIsImRpcmVjdG9yeSI6InJ1YnkiLCJhY2wiOiJwcml2YXRlIiwi\nZGVsaXZlcnlfZnJlcXVlbmN5IjowLCJtYXhfc2l6ZSI6MTA0ODU3NjAwLCJm\naWxlX3ByZWZpeCI6IkRhdGFTaWZ0In0sInN0YXR1cyI6ImFjdGl2ZSIsImxh\nc3RfcmVxdWVzdCI6bnVsbCwibGFzdF9zdWNjZXNzIjpudWxsLCJyZW1haW5p\nbmdfYnl0ZXMiOm51bGwsImxvc3RfZGF0YSI6ZmFsc2UsInN0YXJ0IjoxNDM1\nNzY1MDM0LCJlbmQiOjB9\n"},"http_version":null},"recorded_at":"Wed, 01 Jul 2015 15:37:16 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file +{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/push/create","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.5.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["340"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 12 Nov 2015 11:04:44 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9366"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1447329263"],"X-Ratelimit-Reset-Ttl":["2979"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"Access-Control-Allow-Methods":["GET,POST,PUT,DELETE"],"X-Served-By":["ded2584"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJpZCI6IjRkYWRkMGFhMTI0NGE1NGY4MDgxYjJlMTg5MjU0YTYyIiwib3V0\ncHV0X3R5cGUiOiJzMyIsIm5hbWUiOiJSdWJ5IFB1c2ggRXhhbXBsZSIsImNy\nZWF0ZWRfYXQiOjE0NDczMjYyODQsInVzZXJfaWQiOjMwNDksImhhc2giOiIx\nNDVlYTI0YTRkODNhMTRlY2I5MDc3YjgzMWYxNDgwOSIsImhhc2hfdHlwZSI6\nInN0cmVhbSIsIm91dHB1dF9wYXJhbXMiOnsiYnVja2V0IjoiY29tZGF0YXNp\nZnRqYXNvbiIsImRpcmVjdG9yeSI6InJ1YnkiLCJhY2wiOiJwcml2YXRlIiwi\nZGVsaXZlcnlfZnJlcXVlbmN5IjowLCJtYXhfc2l6ZSI6MTA0ODU3NjAwLCJm\naWxlX3ByZWZpeCI6IkRhdGFTaWZ0In0sInN0YXR1cyI6ImFjdGl2ZSIsImxh\nc3RfcmVxdWVzdCI6bnVsbCwibGFzdF9zdWNjZXNzIjpudWxsLCJyZW1haW5p\nbmdfYnl0ZXMiOm51bGwsImxvc3RfZGF0YSI6ZmFsc2UsInN0YXJ0IjoxNDQ3\nMzI2Mjg0LCJlbmQiOjB9\n"},"http_version":null},"recorded_at":"Thu, 12 Nov 2015 11:04:45 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/push/push_delete.json b/test/fixtures/cassettes/push/push_delete.json index c2bd4a6..a526933 100644 --- a/test/fixtures/cassettes/push/push_delete.json +++ b/test/fixtures/cassettes/push/push_delete.json @@ -1 +1 @@ -{"http_interactions":[{"request":{"method":"delete","uri":"https://api.datasift.com/v1.1/push/delete?id=f4291c7598d4bb37877f0a709009b6ca","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/x-www-form-urlencoded"]}},"response":{"status":{"code":204,"message":"No Content"},"headers":{"Server":["nginx"],"Date":["Thu, 14 May 2015 15:05:48 GMT"],"Content-Type":["text/html"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["8864"],"X-Ratelimit-Cost":["1"],"X-Ratelimit-Reset":["1431617916"],"X-Ratelimit-Reset-Ttl":["1969"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2584"]},"body":{"encoding":"UTF-8","base64_string":""},"http_version":null},"recorded_at":"Thu, 14 May 2015 15:05:48 GMT"},{"request":{"method":"delete","uri":"https://api.datasift.com/v1.2/push/delete?id=e79cbdb84612cd4ad1e11fdfd9f40dac","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/x-www-form-urlencoded"]}},"response":{"status":{"code":204,"message":"No Content"},"headers":{"Server":["nginx"],"Date":["Wed, 01 Jul 2015 15:37:14 GMT"],"Content-Type":["text/html"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9489"],"X-Ratelimit-Cost":["1"],"X-Ratelimit-Reset":["1435765382"],"X-Ratelimit-Reset-Ttl":["349"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2587"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":""},"http_version":null},"recorded_at":"Wed, 01 Jul 2015 15:37:15 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file +{"http_interactions":[{"request":{"method":"delete","uri":"https://api.datasift.com/v1.2/push/delete?id=40621ca0a83b7bc1b70f97a9bf812dee","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.5.0"],"Authorization":[""]}},"response":{"status":{"code":204,"message":"No Content"},"headers":{"Server":["nginx"],"Date":["Thu, 12 Nov 2015 11:04:49 GMT"],"Content-Type":["text/html"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9332"],"X-Ratelimit-Cost":["1"],"X-Ratelimit-Reset":["1447329263"],"X-Ratelimit-Reset-Ttl":["2974"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"Access-Control-Allow-Methods":["GET,POST,PUT,DELETE"],"X-Served-By":["ded2584"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":""},"http_version":null},"recorded_at":"Thu, 12 Nov 2015 11:04:49 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/push/push_get_by_id.json b/test/fixtures/cassettes/push/push_get_by_id.json index ecc0d59..04cffaa 100644 --- a/test/fixtures/cassettes/push/push_get_by_id.json +++ b/test/fixtures/cassettes/push/push_get_by_id.json @@ -1 +1 @@ -{"http_interactions":[{"request":{"method":"get","uri":"https://api.datasift.com/v1.1/push/get?id=1fbbf328c86bc80bcf1f8a84e2b805e3","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/x-www-form-urlencoded"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 14 May 2015 15:05:36 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["8952"],"X-Ratelimit-Cost":["1"],"X-Ratelimit-Reset":["1431617916"],"X-Ratelimit-Reset-Ttl":["1981"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2587"]},"body":{"encoding":"UTF-8","base64_string":"eyJpZCI6IjFmYmJmMzI4Yzg2YmM4MGJjZjFmOGE4NGUyYjgwNWUzIiwib3V0\ncHV0X3R5cGUiOiJzMyIsIm5hbWUiOiJSdWJ5IFB1c2ggRXhhbXBsZSIsImNy\nZWF0ZWRfYXQiOjE0MzE2MTU5MzUsInVzZXJfaWQiOjMwNDksImhhc2giOiIx\nNDVlYTI0YTRkODNhMTRlY2I5MDc3YjgzMWYxNDgwOSIsImhhc2hfdHlwZSI6\nInN0cmVhbSIsIm91dHB1dF9wYXJhbXMiOnsiYnVja2V0IjoiY29tZGF0YXNp\nZnRqYXNvbiIsImRpcmVjdG9yeSI6InJ1YnkiLCJhY2wiOiJwcml2YXRlIiwi\nZGVsaXZlcnlfZnJlcXVlbmN5IjowLCJtYXhfc2l6ZSI6MTA0ODU3NjAwLCJm\naWxlX3ByZWZpeCI6IkRhdGFTaWZ0In0sInN0YXR1cyI6ImFjdGl2ZSIsImxh\nc3RfcmVxdWVzdCI6bnVsbCwibGFzdF9zdWNjZXNzIjpudWxsLCJyZW1haW5p\nbmdfYnl0ZXMiOjAsImludGVyYWN0aW9uX2NvdW50IjowLCJsb3N0X2RhdGEi\nOmZhbHNlLCJzdGFydCI6MTQzMTYxNTkzNSwiZW5kIjpudWxsfQ==\n"},"http_version":null},"recorded_at":"Thu, 14 May 2015 15:05:37 GMT"},{"request":{"method":"get","uri":"https://api.datasift.com/v1.2/push/get?id=f4b59a9f60ae5a53d901dc6e08291754","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/x-www-form-urlencoded"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Wed, 01 Jul 2015 15:37:12 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9501"],"X-Ratelimit-Cost":["1"],"X-Ratelimit-Reset":["1435765382"],"X-Ratelimit-Reset-Ttl":["351"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2587"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJpZCI6ImY0YjU5YTlmNjBhZTVhNTNkOTAxZGM2ZTA4MjkxNzU0Iiwib3V0\ncHV0X3R5cGUiOiJzMyIsIm5hbWUiOiJSdWJ5IFB1c2ggRXhhbXBsZSIsImNy\nZWF0ZWRfYXQiOjE0MzU3NjUwMzEsInVzZXJfaWQiOjMwNDksImhhc2giOiIx\nNDVlYTI0YTRkODNhMTRlY2I5MDc3YjgzMWYxNDgwOSIsImhhc2hfdHlwZSI6\nInN0cmVhbSIsIm91dHB1dF9wYXJhbXMiOnsiYnVja2V0IjoiY29tZGF0YXNp\nZnRqYXNvbiIsImRpcmVjdG9yeSI6InJ1YnkiLCJhY2wiOiJwcml2YXRlIiwi\nZGVsaXZlcnlfZnJlcXVlbmN5IjowLCJtYXhfc2l6ZSI6MTA0ODU3NjAwLCJm\naWxlX3ByZWZpeCI6IkRhdGFTaWZ0In0sInN0YXR1cyI6ImFjdGl2ZSIsImxh\nc3RfcmVxdWVzdCI6bnVsbCwibGFzdF9zdWNjZXNzIjpudWxsLCJyZW1haW5p\nbmdfYnl0ZXMiOjAsImludGVyYWN0aW9uX2NvdW50IjowLCJsb3N0X2RhdGEi\nOmZhbHNlLCJzdGFydCI6MTQzNTc2NTAzMSwiZW5kIjpudWxsfQ==\n"},"http_version":null},"recorded_at":"Wed, 01 Jul 2015 15:37:13 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file +{"http_interactions":[{"request":{"method":"get","uri":"https://api.datasift.com/v1.2/push/get?id=a2eabbaae6f8a8f116aa08f1f74b58ea","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.5.0"],"Authorization":[""]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 12 Nov 2015 11:04:51 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9308"],"X-Ratelimit-Cost":["1"],"X-Ratelimit-Reset":["1447329263"],"X-Ratelimit-Reset-Ttl":["2972"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"Access-Control-Allow-Methods":["GET,POST,PUT,DELETE"],"X-Served-By":["ded2587"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJpZCI6ImEyZWFiYmFhZTZmOGE4ZjExNmFhMDhmMWY3NGI1OGVhIiwib3V0\ncHV0X3R5cGUiOiJzMyIsIm5hbWUiOiJSdWJ5IFB1c2ggRXhhbXBsZSIsImNy\nZWF0ZWRfYXQiOjE0NDczMjYyOTEsInVzZXJfaWQiOjMwNDksImhhc2giOiIx\nNDVlYTI0YTRkODNhMTRlY2I5MDc3YjgzMWYxNDgwOSIsImhhc2hfdHlwZSI6\nInN0cmVhbSIsIm91dHB1dF9wYXJhbXMiOnsiYnVja2V0IjoiY29tZGF0YXNp\nZnRqYXNvbiIsImRpcmVjdG9yeSI6InJ1YnkiLCJhY2wiOiJwcml2YXRlIiwi\nZGVsaXZlcnlfZnJlcXVlbmN5IjowLCJtYXhfc2l6ZSI6MTA0ODU3NjAwLCJm\naWxlX3ByZWZpeCI6IkRhdGFTaWZ0In0sInN0YXR1cyI6ImFjdGl2ZSIsImxh\nc3RfcmVxdWVzdCI6bnVsbCwibGFzdF9zdWNjZXNzIjpudWxsLCJyZW1haW5p\nbmdfYnl0ZXMiOjAsImludGVyYWN0aW9uX2NvdW50IjowLCJsb3N0X2RhdGEi\nOmZhbHNlLCJzdGFydCI6MTQ0NzMyNjI5MSwiZW5kIjpudWxsfQ==\n"},"http_version":null},"recorded_at":"Thu, 12 Nov 2015 11:04:51 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/push/push_log_with_id.json b/test/fixtures/cassettes/push/push_log_with_id.json index 8c19221..24a817d 100644 --- a/test/fixtures/cassettes/push/push_log_with_id.json +++ b/test/fixtures/cassettes/push/push_log_with_id.json @@ -1 +1 @@ -{"http_interactions":[{"request":{"method":"get","uri":"https://api.datasift.com/v1.1/push/log?id=f34551a6d685f8f356af010a09a833e3&order_by=request_time&order_dir=desc&page=1&per_page=20","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/x-www-form-urlencoded"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 14 May 2015 15:05:50 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["8838"],"X-Ratelimit-Cost":["1"],"X-Ratelimit-Reset":["1431617916"],"X-Ratelimit-Reset-Ttl":["1966"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2584"]},"body":{"encoding":"UTF-8","base64_string":"eyJzdWNjZXNzIjp0cnVlLCJjb3VudCI6MCwibG9nX2VudHJpZXMiOltdfQ==\n"},"http_version":null},"recorded_at":"Thu, 14 May 2015 15:05:51 GMT"},{"request":{"method":"get","uri":"https://api.datasift.com/v1.2/push/log?id=a60cfa6cf10af7dcb9a091f4bec6f779&order_by=request_time&order_dir=desc&page=1&per_page=20","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/x-www-form-urlencoded"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Wed, 01 Jul 2015 15:37:20 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9438"],"X-Ratelimit-Cost":["1"],"X-Ratelimit-Reset":["1435765382"],"X-Ratelimit-Reset-Ttl":["342"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2587"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJzdWNjZXNzIjp0cnVlLCJjb3VudCI6MCwibG9nX2VudHJpZXMiOltdfQ==\n"},"http_version":null},"recorded_at":"Wed, 01 Jul 2015 15:37:21 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file +{"http_interactions":[{"request":{"method":"get","uri":"https://api.datasift.com/v1.2/push/log?id=06e34d5fb2159de8571f409de50e2978&order_by=request_time&order_dir=desc&page=1&per_page=20","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.5.0"],"Authorization":[""]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 12 Nov 2015 11:04:48 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9344"],"X-Ratelimit-Cost":["1"],"X-Ratelimit-Reset":["1447329263"],"X-Ratelimit-Reset-Ttl":["2975"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"Access-Control-Allow-Methods":["GET,POST,PUT,DELETE"],"X-Served-By":["ded2587"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJzdWNjZXNzIjp0cnVlLCJjb3VudCI6MCwibG9nX2VudHJpZXMiOltdfQ==\n"},"http_version":null},"recorded_at":"Thu, 12 Nov 2015 11:04:48 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/push/push_pause.json b/test/fixtures/cassettes/push/push_pause.json index 759e9e5..c4c4855 100644 --- a/test/fixtures/cassettes/push/push_pause.json +++ b/test/fixtures/cassettes/push/push_pause.json @@ -1 +1 @@ -{"http_interactions":[{"request":{"method":"put","uri":"https://api.datasift.com/v1.1/push/pause","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["41"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 14 May 2015 15:05:41 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["8928"],"X-Ratelimit-Cost":["1"],"X-Ratelimit-Reset":["1431617916"],"X-Ratelimit-Reset-Ttl":["1977"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2584"]},"body":{"encoding":"UTF-8","base64_string":"eyJpZCI6ImE4MzA3MmNmMDI0Y2VhYjUyMzQ0ZDk5ODA1ZjFjYjM2Iiwib3V0\ncHV0X3R5cGUiOiJzMyIsIm5hbWUiOiJSdWJ5IFB1c2ggRXhhbXBsZSIsImNy\nZWF0ZWRfYXQiOjE0MzE2MTU5MzksInVzZXJfaWQiOjMwNDksImhhc2giOiIx\nNDVlYTI0YTRkODNhMTRlY2I5MDc3YjgzMWYxNDgwOSIsImhhc2hfdHlwZSI6\nInN0cmVhbSIsIm91dHB1dF9wYXJhbXMiOnsiYnVja2V0IjoiY29tZGF0YXNp\nZnRqYXNvbiIsImRpcmVjdG9yeSI6InJ1YnkiLCJhY2wiOiJwcml2YXRlIiwi\nZGVsaXZlcnlfZnJlcXVlbmN5IjowLCJtYXhfc2l6ZSI6MTA0ODU3NjAwLCJm\naWxlX3ByZWZpeCI6IkRhdGFTaWZ0In0sInN0YXR1cyI6InBhdXNlZCIsImxh\nc3RfcmVxdWVzdCI6bnVsbCwibGFzdF9zdWNjZXNzIjpudWxsLCJyZW1haW5p\nbmdfYnl0ZXMiOm51bGwsImxvc3RfZGF0YSI6ZmFsc2UsInN0YXJ0IjoxNDMx\nNjE1OTM5LCJlbmQiOm51bGx9\n"},"http_version":null},"recorded_at":"Thu, 14 May 2015 15:05:41 GMT"},{"request":{"method":"put","uri":"https://api.datasift.com/v1.2/push/pause","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["41"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Wed, 01 Jul 2015 15:37:21 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9426"],"X-Ratelimit-Cost":["1"],"X-Ratelimit-Reset":["1435765382"],"X-Ratelimit-Reset-Ttl":["341"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2584"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJpZCI6IjNkMGZiZTQxMTAyYzM5ZGVhZTZlMzgwMjNhNzFkMjAyIiwib3V0\ncHV0X3R5cGUiOiJzMyIsIm5hbWUiOiJSdWJ5IFB1c2ggRXhhbXBsZSIsImNy\nZWF0ZWRfYXQiOjE0MzU3NjUwNDEsInVzZXJfaWQiOjMwNDksImhhc2giOiIx\nNDVlYTI0YTRkODNhMTRlY2I5MDc3YjgzMWYxNDgwOSIsImhhc2hfdHlwZSI6\nInN0cmVhbSIsIm91dHB1dF9wYXJhbXMiOnsiYnVja2V0IjoiY29tZGF0YXNp\nZnRqYXNvbiIsImRpcmVjdG9yeSI6InJ1YnkiLCJhY2wiOiJwcml2YXRlIiwi\nZGVsaXZlcnlfZnJlcXVlbmN5IjowLCJtYXhfc2l6ZSI6MTA0ODU3NjAwLCJm\naWxlX3ByZWZpeCI6IkRhdGFTaWZ0In0sInN0YXR1cyI6InBhdXNlZCIsImxh\nc3RfcmVxdWVzdCI6bnVsbCwibGFzdF9zdWNjZXNzIjpudWxsLCJyZW1haW5p\nbmdfYnl0ZXMiOm51bGwsImxvc3RfZGF0YSI6ZmFsc2UsInN0YXJ0IjoxNDM1\nNzY1MDQxLCJlbmQiOm51bGx9\n"},"http_version":null},"recorded_at":"Wed, 01 Jul 2015 15:37:22 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file +{"http_interactions":[{"request":{"method":"put","uri":"https://api.datasift.com/v1.2/push/pause","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.5.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["41"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 12 Nov 2015 11:04:53 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9284"],"X-Ratelimit-Cost":["1"],"X-Ratelimit-Reset":["1447329263"],"X-Ratelimit-Reset-Ttl":["2970"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"Access-Control-Allow-Methods":["GET,POST,PUT,DELETE"],"X-Served-By":["ded2587"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJpZCI6IjQzMzQzMzI4MjE4MGFkODYxNjhlODdmYzQ5OWMwNmQ0Iiwib3V0\ncHV0X3R5cGUiOiJzMyIsIm5hbWUiOiJSdWJ5IFB1c2ggRXhhbXBsZSIsImNy\nZWF0ZWRfYXQiOjE0NDczMjYyOTMsInVzZXJfaWQiOjMwNDksImhhc2giOiIx\nNDVlYTI0YTRkODNhMTRlY2I5MDc3YjgzMWYxNDgwOSIsImhhc2hfdHlwZSI6\nInN0cmVhbSIsIm91dHB1dF9wYXJhbXMiOnsiYnVja2V0IjoiY29tZGF0YXNp\nZnRqYXNvbiIsImRpcmVjdG9yeSI6InJ1YnkiLCJhY2wiOiJwcml2YXRlIiwi\nZGVsaXZlcnlfZnJlcXVlbmN5IjowLCJtYXhfc2l6ZSI6MTA0ODU3NjAwLCJm\naWxlX3ByZWZpeCI6IkRhdGFTaWZ0In0sInN0YXR1cyI6InBhdXNlZCIsImxh\nc3RfcmVxdWVzdCI6bnVsbCwibGFzdF9zdWNjZXNzIjpudWxsLCJyZW1haW5p\nbmdfYnl0ZXMiOm51bGwsImxvc3RfZGF0YSI6ZmFsc2UsInN0YXJ0IjoxNDQ3\nMzI2MjkzLCJlbmQiOm51bGx9\n"},"http_version":null},"recorded_at":"Thu, 12 Nov 2015 11:04:53 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/push/push_resume.json b/test/fixtures/cassettes/push/push_resume.json index 227263c..91172c1 100644 --- a/test/fixtures/cassettes/push/push_resume.json +++ b/test/fixtures/cassettes/push/push_resume.json @@ -1 +1 @@ -{"http_interactions":[{"request":{"method":"put","uri":"https://api.datasift.com/v1.1/push/resume","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["41"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 14 May 2015 15:05:31 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9025"],"X-Ratelimit-Cost":["1"],"X-Ratelimit-Reset":["1431617916"],"X-Ratelimit-Reset-Ttl":["1985"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2584"]},"body":{"encoding":"UTF-8","base64_string":"eyJpZCI6ImZjZDViZWJiODVkNzZkYjg0ZWI0MmU4ZmM2MjU2MjZlIiwib3V0\ncHV0X3R5cGUiOiJzMyIsIm5hbWUiOiJSdWJ5IFB1c2ggRXhhbXBsZSIsImNy\nZWF0ZWRfYXQiOjE0MzE2MTU5MzAsInVzZXJfaWQiOjMwNDksImhhc2giOiIx\nNDVlYTI0YTRkODNhMTRlY2I5MDc3YjgzMWYxNDgwOSIsImhhc2hfdHlwZSI6\nInN0cmVhbSIsIm91dHB1dF9wYXJhbXMiOnsiYnVja2V0IjoiY29tZGF0YXNp\nZnRqYXNvbiIsImRpcmVjdG9yeSI6InJ1YnkiLCJhY2wiOiJwcml2YXRlIiwi\nZGVsaXZlcnlfZnJlcXVlbmN5IjowLCJtYXhfc2l6ZSI6MTA0ODU3NjAwLCJm\naWxlX3ByZWZpeCI6IkRhdGFTaWZ0In0sInN0YXR1cyI6ImFjdGl2ZSIsImxh\nc3RfcmVxdWVzdCI6bnVsbCwibGFzdF9zdWNjZXNzIjpudWxsLCJyZW1haW5p\nbmdfYnl0ZXMiOm51bGwsImxvc3RfZGF0YSI6ZmFsc2UsInN0YXJ0IjoxNDMx\nNjE1OTMwLCJlbmQiOm51bGx9\n"},"http_version":null},"recorded_at":"Thu, 14 May 2015 15:05:32 GMT"},{"request":{"method":"put","uri":"https://api.datasift.com/v1.2/push/resume","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["41"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Wed, 01 Jul 2015 15:37:18 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9450"],"X-Ratelimit-Cost":["1"],"X-Ratelimit-Reset":["1435765382"],"X-Ratelimit-Reset-Ttl":["344"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2587"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJpZCI6IjkzN2VkZDdjNjY4YjliMzE1MjE0MTNhYTcxMjk4Y2ZkIiwib3V0\ncHV0X3R5cGUiOiJzMyIsIm5hbWUiOiJSdWJ5IFB1c2ggRXhhbXBsZSIsImNy\nZWF0ZWRfYXQiOjE0MzU3NjUwMzgsInVzZXJfaWQiOjMwNDksImhhc2giOiIx\nNDVlYTI0YTRkODNhMTRlY2I5MDc3YjgzMWYxNDgwOSIsImhhc2hfdHlwZSI6\nInN0cmVhbSIsIm91dHB1dF9wYXJhbXMiOnsiYnVja2V0IjoiY29tZGF0YXNp\nZnRqYXNvbiIsImRpcmVjdG9yeSI6InJ1YnkiLCJhY2wiOiJwcml2YXRlIiwi\nZGVsaXZlcnlfZnJlcXVlbmN5IjowLCJtYXhfc2l6ZSI6MTA0ODU3NjAwLCJm\naWxlX3ByZWZpeCI6IkRhdGFTaWZ0In0sInN0YXR1cyI6ImFjdGl2ZSIsImxh\nc3RfcmVxdWVzdCI6bnVsbCwibGFzdF9zdWNjZXNzIjpudWxsLCJyZW1haW5p\nbmdfYnl0ZXMiOm51bGwsImxvc3RfZGF0YSI6ZmFsc2UsInN0YXJ0IjoxNDM1\nNzY1MDM4LCJlbmQiOm51bGx9\n"},"http_version":null},"recorded_at":"Wed, 01 Jul 2015 15:37:19 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file +{"http_interactions":[{"request":{"method":"put","uri":"https://api.datasift.com/v1.2/push/resume","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.5.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["41"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 12 Nov 2015 11:04:50 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9320"],"X-Ratelimit-Cost":["1"],"X-Ratelimit-Reset":["1447329263"],"X-Ratelimit-Reset-Ttl":["2973"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"Access-Control-Allow-Methods":["GET,POST,PUT,DELETE"],"X-Served-By":["ded2587"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJpZCI6Ijg3YzNlMjExYmM1MTA2ZmY0MzBmZmNkM2ZiYzhhMmI3Iiwib3V0\ncHV0X3R5cGUiOiJzMyIsIm5hbWUiOiJSdWJ5IFB1c2ggRXhhbXBsZSIsImNy\nZWF0ZWRfYXQiOjE0NDczMjYyOTAsInVzZXJfaWQiOjMwNDksImhhc2giOiIx\nNDVlYTI0YTRkODNhMTRlY2I5MDc3YjgzMWYxNDgwOSIsImhhc2hfdHlwZSI6\nInN0cmVhbSIsIm91dHB1dF9wYXJhbXMiOnsiYnVja2V0IjoiY29tZGF0YXNp\nZnRqYXNvbiIsImRpcmVjdG9yeSI6InJ1YnkiLCJhY2wiOiJwcml2YXRlIiwi\nZGVsaXZlcnlfZnJlcXVlbmN5IjowLCJtYXhfc2l6ZSI6MTA0ODU3NjAwLCJm\naWxlX3ByZWZpeCI6IkRhdGFTaWZ0In0sInN0YXR1cyI6ImFjdGl2ZSIsImxh\nc3RfcmVxdWVzdCI6bnVsbCwibGFzdF9zdWNjZXNzIjpudWxsLCJyZW1haW5p\nbmdfYnl0ZXMiOm51bGwsImxvc3RfZGF0YSI6ZmFsc2UsInN0YXJ0IjoxNDQ3\nMzI2MjkwLCJlbmQiOm51bGx9\n"},"http_version":null},"recorded_at":"Thu, 12 Nov 2015 11:04:50 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/push/push_stop.json b/test/fixtures/cassettes/push/push_stop.json index 45e5f85..4b47c53 100644 --- a/test/fixtures/cassettes/push/push_stop.json +++ b/test/fixtures/cassettes/push/push_stop.json @@ -1 +1 @@ -{"http_interactions":[{"request":{"method":"put","uri":"https://api.datasift.com/v1.1/push/stop","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["41"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 14 May 2015 15:05:45 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["8901"],"X-Ratelimit-Cost":["1"],"X-Ratelimit-Reset":["1431617916"],"X-Ratelimit-Reset-Ttl":["1972"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2584"]},"body":{"encoding":"UTF-8","base64_string":"eyJpZCI6ImI2ZWU3YzVhMDBmMWY4YzQ5YWNhYmFjNGRkZTMyMGRkIiwib3V0\ncHV0X3R5cGUiOiJzMyIsIm5hbWUiOiJSdWJ5IFB1c2ggRXhhbXBsZSIsImNy\nZWF0ZWRfYXQiOjE0MzE2MTU5NDQsInVzZXJfaWQiOjMwNDksImhhc2giOiIx\nNDVlYTI0YTRkODNhMTRlY2I5MDc3YjgzMWYxNDgwOSIsImhhc2hfdHlwZSI6\nInN0cmVhbSIsIm91dHB1dF9wYXJhbXMiOnsiYnVja2V0IjoiY29tZGF0YXNp\nZnRqYXNvbiIsImRpcmVjdG9yeSI6InJ1YnkiLCJhY2wiOiJwcml2YXRlIiwi\nZGVsaXZlcnlfZnJlcXVlbmN5IjowLCJtYXhfc2l6ZSI6MTA0ODU3NjAwLCJm\naWxlX3ByZWZpeCI6IkRhdGFTaWZ0In0sInN0YXR1cyI6ImZpbmlzaGluZyIs\nImxhc3RfcmVxdWVzdCI6bnVsbCwibGFzdF9zdWNjZXNzIjpudWxsLCJyZW1h\naW5pbmdfYnl0ZXMiOm51bGwsImxvc3RfZGF0YSI6ZmFsc2UsInN0YXJ0Ijox\nNDMxNjE1OTQ0LCJlbmQiOjE0MzE2MTU5NDV9\n"},"http_version":null},"recorded_at":"Thu, 14 May 2015 15:05:46 GMT"},{"request":{"method":"put","uri":"https://api.datasift.com/v1.2/push/stop","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["41"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Wed, 01 Jul 2015 15:37:22 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9414"],"X-Ratelimit-Cost":["1"],"X-Ratelimit-Reset":["1435765382"],"X-Ratelimit-Reset-Ttl":["340"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2584"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJpZCI6IjgxNGJlNGIwYWYxMjEyMzY0N2RmOTA3ODA3YzBmNzVmIiwib3V0\ncHV0X3R5cGUiOiJzMyIsIm5hbWUiOiJSdWJ5IFB1c2ggRXhhbXBsZSIsImNy\nZWF0ZWRfYXQiOjE0MzU3NjUwNDIsInVzZXJfaWQiOjMwNDksImhhc2giOiIx\nNDVlYTI0YTRkODNhMTRlY2I5MDc3YjgzMWYxNDgwOSIsImhhc2hfdHlwZSI6\nInN0cmVhbSIsIm91dHB1dF9wYXJhbXMiOnsiYnVja2V0IjoiY29tZGF0YXNp\nZnRqYXNvbiIsImRpcmVjdG9yeSI6InJ1YnkiLCJhY2wiOiJwcml2YXRlIiwi\nZGVsaXZlcnlfZnJlcXVlbmN5IjowLCJtYXhfc2l6ZSI6MTA0ODU3NjAwLCJm\naWxlX3ByZWZpeCI6IkRhdGFTaWZ0In0sInN0YXR1cyI6ImZpbmlzaGluZyIs\nImxhc3RfcmVxdWVzdCI6bnVsbCwibGFzdF9zdWNjZXNzIjpudWxsLCJyZW1h\naW5pbmdfYnl0ZXMiOm51bGwsImxvc3RfZGF0YSI6ZmFsc2UsInN0YXJ0Ijox\nNDM1NzY1MDQyLCJlbmQiOjE0MzU3NjUwNDJ9\n"},"http_version":null},"recorded_at":"Wed, 01 Jul 2015 15:37:24 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file +{"http_interactions":[{"request":{"method":"put","uri":"https://api.datasift.com/v1.2/push/stop","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.5.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["41"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 12 Nov 2015 11:04:52 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9296"],"X-Ratelimit-Cost":["1"],"X-Ratelimit-Reset":["1447329263"],"X-Ratelimit-Reset-Ttl":["2971"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"Access-Control-Allow-Methods":["GET,POST,PUT,DELETE"],"X-Served-By":["ded2587"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJpZCI6IjkyY2YxMjkxYzQ2N2Q2ZjhmMTQ2MDIzZTBmNDNjZTFhIiwib3V0\ncHV0X3R5cGUiOiJzMyIsIm5hbWUiOiJSdWJ5IFB1c2ggRXhhbXBsZSIsImNy\nZWF0ZWRfYXQiOjE0NDczMjYyOTIsInVzZXJfaWQiOjMwNDksImhhc2giOiIx\nNDVlYTI0YTRkODNhMTRlY2I5MDc3YjgzMWYxNDgwOSIsImhhc2hfdHlwZSI6\nInN0cmVhbSIsIm91dHB1dF9wYXJhbXMiOnsiYnVja2V0IjoiY29tZGF0YXNp\nZnRqYXNvbiIsImRpcmVjdG9yeSI6InJ1YnkiLCJhY2wiOiJwcml2YXRlIiwi\nZGVsaXZlcnlfZnJlcXVlbmN5IjowLCJtYXhfc2l6ZSI6MTA0ODU3NjAwLCJm\naWxlX3ByZWZpeCI6IkRhdGFTaWZ0In0sInN0YXR1cyI6ImZpbmlzaGluZyIs\nImxhc3RfcmVxdWVzdCI6bnVsbCwibGFzdF9zdWNjZXNzIjpudWxsLCJyZW1h\naW5pbmdfYnl0ZXMiOm51bGwsImxvc3RfZGF0YSI6ZmFsc2UsInN0YXJ0Ijox\nNDQ3MzI2MjkyLCJlbmQiOjE0NDczMjYyOTJ9\n"},"http_version":null},"recorded_at":"Thu, 12 Nov 2015 11:04:52 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/push/push_update.json b/test/fixtures/cassettes/push/push_update.json index 1b374d6..859f411 100644 --- a/test/fixtures/cassettes/push/push_update.json +++ b/test/fixtures/cassettes/push/push_update.json @@ -1 +1 @@ -{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.1/push/update","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["320"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 14 May 2015 15:05:33 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9009"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1431617916"],"X-Ratelimit-Reset-Ttl":["1984"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2584"]},"body":{"encoding":"UTF-8","base64_string":"eyJpZCI6IjJmZTdlYjk1ZmYyNmNlOTk0ZGMyN2M5OWM4YzRmYWQ4Iiwib3V0\ncHV0X3R5cGUiOiJzMyIsIm5hbWUiOiJSdWJ5IFB1c2ggRXhhbXBsZSIsImNy\nZWF0ZWRfYXQiOjE0MzE2MTU5MzIsInVzZXJfaWQiOjMwNDksImhhc2giOiIx\nNDVlYTI0YTRkODNhMTRlY2I5MDc3YjgzMWYxNDgwOSIsImhhc2hfdHlwZSI6\nInN0cmVhbSIsIm91dHB1dF9wYXJhbXMiOnsiYnVja2V0IjoiY29tZGF0YXNp\nZnRqYXNvbiIsImRpcmVjdG9yeSI6InJ1YnkiLCJhY2wiOiJwcml2YXRlIiwi\nZGVsaXZlcnlfZnJlcXVlbmN5IjowLCJtYXhfc2l6ZSI6MTA0ODU3NjAwLCJm\naWxlX3ByZWZpeCI6IkRhdGFTaWZ0In0sInN0YXR1cyI6ImFjdGl2ZSIsImxh\nc3RfcmVxdWVzdCI6bnVsbCwibGFzdF9zdWNjZXNzIjpudWxsLCJyZW1haW5p\nbmdfYnl0ZXMiOjAsImxvc3RfZGF0YSI6ZmFsc2UsInN0YXJ0IjoxNDMxNjE1\nOTMyLCJlbmQiOm51bGx9\n"},"http_version":null},"recorded_at":"Thu, 14 May 2015 15:05:33 GMT"},{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/push/update","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["320"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Wed, 01 Jul 2015 15:37:16 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9463"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1435765382"],"X-Ratelimit-Reset-Ttl":["346"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2587"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJpZCI6ImU4MTczODUyNjQ0YjlhY2M0ZTk2YTJiZDkxZTNmYTBkIiwib3V0\ncHV0X3R5cGUiOiJzMyIsIm5hbWUiOiJSdWJ5IFB1c2ggRXhhbXBsZSIsImNy\nZWF0ZWRfYXQiOjE0MzU3NjUwMzYsInVzZXJfaWQiOjMwNDksImhhc2giOiIx\nNDVlYTI0YTRkODNhMTRlY2I5MDc3YjgzMWYxNDgwOSIsImhhc2hfdHlwZSI6\nInN0cmVhbSIsIm91dHB1dF9wYXJhbXMiOnsiYnVja2V0IjoiY29tZGF0YXNp\nZnRqYXNvbiIsImRpcmVjdG9yeSI6InJ1YnkiLCJhY2wiOiJwcml2YXRlIiwi\nZGVsaXZlcnlfZnJlcXVlbmN5IjowLCJtYXhfc2l6ZSI6MTA0ODU3NjAwLCJm\naWxlX3ByZWZpeCI6IkRhdGFTaWZ0In0sInN0YXR1cyI6ImFjdGl2ZSIsImxh\nc3RfcmVxdWVzdCI6bnVsbCwibGFzdF9zdWNjZXNzIjpudWxsLCJyZW1haW5p\nbmdfYnl0ZXMiOjAsImxvc3RfZGF0YSI6ZmFsc2UsInN0YXJ0IjoxNDM1NzY1\nMDM2LCJlbmQiOm51bGx9\n"},"http_version":null},"recorded_at":"Wed, 01 Jul 2015 15:37:18 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file +{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/push/update","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.5.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["320"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 12 Nov 2015 11:04:44 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9377"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1447329263"],"X-Ratelimit-Reset-Ttl":["2980"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"Access-Control-Allow-Methods":["GET,POST,PUT,DELETE"],"X-Served-By":["ded2584"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJpZCI6IjE0MDM0MThkOWY3NWNkNDYxMGZiNjExNWU5MjcyNzUwIiwib3V0\ncHV0X3R5cGUiOiJzMyIsIm5hbWUiOiJSdWJ5IFB1c2ggRXhhbXBsZSIsImNy\nZWF0ZWRfYXQiOjE0NDczMjYyODMsInVzZXJfaWQiOjMwNDksImhhc2giOiIx\nNDVlYTI0YTRkODNhMTRlY2I5MDc3YjgzMWYxNDgwOSIsImhhc2hfdHlwZSI6\nInN0cmVhbSIsIm91dHB1dF9wYXJhbXMiOnsiYnVja2V0IjoiY29tZGF0YXNp\nZnRqYXNvbiIsImRpcmVjdG9yeSI6InJ1YnkiLCJhY2wiOiJwcml2YXRlIiwi\nZGVsaXZlcnlfZnJlcXVlbmN5IjowLCJtYXhfc2l6ZSI6MTA0ODU3NjAwLCJm\naWxlX3ByZWZpeCI6IkRhdGFTaWZ0Iiwib3V0cHV0X3R5cGUiOiJzMyIsIm91\ndHB1dF9wYXJhbXMiOnsiYnVja2V0IjoiY29tZGF0YXNpZnRqYXNvbiIsImRp\ncmVjdG9yeSI6Im5ld19kaXJlY3RvcnkiLCJhY2wiOiJwcml2YXRlIiwiZGVs\naXZlcnlfZnJlcXVlbmN5IjowLCJtYXhfc2l6ZSI6MTA0ODU3NjAwLCJmaWxl\nX3ByZWZpeCI6IkRhdGFTaWZ0IiwiYXV0aCI6eyJhY2Nlc3Nfa2V5IjoiQUtJ\nQUpTVDdZRjJFTlpYSUxLQlEiLCJzZWNyZXRfa2V5Ijoic3VuQmFoZ1YxOW5W\nQmtUT0JqYzd4RUZ5SkhJcG5zWW1icG15aWtISSJ9fSwiaWQiOiIxNDAzNDE4\nZDlmNzVjZDQ2MTBmYjYxMTVlOTI3Mjc1MCJ9LCJzdGF0dXMiOiJhY3RpdmUi\nLCJsYXN0X3JlcXVlc3QiOm51bGwsImxhc3Rfc3VjY2VzcyI6bnVsbCwicmVt\nYWluaW5nX2J5dGVzIjowLCJsb3N0X2RhdGEiOmZhbHNlLCJzdGFydCI6MTQ0\nNzMyNjI4MywiZW5kIjpudWxsfQ==\n"},"http_version":null},"recorded_at":"Thu, 12 Nov 2015 11:04:44 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file diff --git a/test/fixtures/cassettes/push/push_validate.json b/test/fixtures/cassettes/push/push_validate.json index 44c3634..18c2d6a 100644 --- a/test/fixtures/cassettes/push/push_validate.json +++ b/test/fixtures/cassettes/push/push_validate.json @@ -1 +1 @@ -{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.1/push/validate","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["271"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 14 May 2015 15:05:48 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["8854"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1431617916"],"X-Ratelimit-Reset-Ttl":["1968"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2584"]},"body":{"encoding":"UTF-8","base64_string":"eyJzdWNjZXNzIjp0cnVlLCJtZXNzYWdlIjoiVmFsaWRhdGVkIHN1Y2Nlc3Nm\ndWxseSJ9\n"},"http_version":null},"recorded_at":"Thu, 14 May 2015 15:05:49 GMT"},{"request":{"method":"post","uri":"https://api.datasift.com/v1.1/push/validate","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.1 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["271"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 14 May 2015 15:05:49 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.1"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["8849"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1431617916"],"X-Ratelimit-Reset-Ttl":["1968"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2587"]},"body":{"encoding":"UTF-8","base64_string":"eyJzdWNjZXNzIjp0cnVlLCJtZXNzYWdlIjoiVmFsaWRhdGVkIHN1Y2Nlc3Nm\ndWxseSJ9\n"},"http_version":null},"recorded_at":"Thu, 14 May 2015 15:05:50 GMT"},{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/push/validate","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["271"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Wed, 01 Jul 2015 15:37:09 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9517"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1435765382"],"X-Ratelimit-Reset-Ttl":["353"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2584"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJzdWNjZXNzIjp0cnVlLCJtZXNzYWdlIjoiVmFsaWRhdGVkIHN1Y2Nlc3Nm\ndWxseSJ9\n"},"http_version":null},"recorded_at":"Wed, 01 Jul 2015 15:37:11 GMT"},{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/push/validate","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*; q=0.5, application/xml"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.2.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["271"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Wed, 01 Jul 2015 15:37:10 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9512"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1435765382"],"X-Ratelimit-Reset-Ttl":["352"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"X-Served-By":["ded2587"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJzdWNjZXNzIjp0cnVlLCJtZXNzYWdlIjoiVmFsaWRhdGVkIHN1Y2Nlc3Nm\ndWxseSJ9\n"},"http_version":null},"recorded_at":"Wed, 01 Jul 2015 15:37:11 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file +{"http_interactions":[{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/push/validate","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.5.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["271"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 12 Nov 2015 11:04:46 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9360"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1447329263"],"X-Ratelimit-Reset-Ttl":["2978"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"Access-Control-Allow-Methods":["GET,POST,PUT,DELETE"],"X-Served-By":["ded2587"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJzdWNjZXNzIjp0cnVlLCJtZXNzYWdlIjoiVmFsaWRhdGVkIHN1Y2Nlc3Nm\ndWxseSJ9\n"},"http_version":null},"recorded_at":"Thu, 12 Nov 2015 11:04:46 GMT"},{"request":{"method":"post","uri":"https://api.datasift.com/v1.2/push/validate","body":{"encoding":"UTF-8","base64_string":"PEJBU0U2NF9TVFJJTkc+\n"},"headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"User-Agent":["DataSift/v1.2 Ruby/v3.5.0"],"Authorization":[""],"Content-Type":["application/json"],"Content-Length":["271"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx"],"Date":["Thu, 12 Nov 2015 11:04:46 GMT"],"Content-Type":["application/json"],"Transfer-Encoding":["chunked"],"Connection":["close"],"X-Api-Version":["1.2"],"P3p":["CP=\"CAO PSA\""],"X-Ratelimit-Limit":["10000"],"X-Ratelimit-Remaining":["9355"],"X-Ratelimit-Cost":["5"],"X-Ratelimit-Reset":["1447329263"],"X-Ratelimit-Reset-Ttl":["2977"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["Authorization,Content-Type"],"Access-Control-Allow-Methods":["GET,POST,PUT,DELETE"],"X-Served-By":["ded2584"],"X-Frame-Options":["SAMEORIGIN"]},"body":{"encoding":"UTF-8","base64_string":"eyJzdWNjZXNzIjp0cnVlLCJtZXNzYWdlIjoiVmFsaWRhdGVkIHN1Y2Nlc3Nm\ndWxseSJ9\n"},"http_version":null},"recorded_at":"Thu, 12 Nov 2015 11:04:46 GMT"}],"recorded_with":"VCR 2.9.3"} \ No newline at end of file From 1122d90725481321045f136956ef8d6498019933 Mon Sep 17 00:00:00 2001 From: Jason Dugdale Date: Fri, 13 Nov 2015 14:47:02 +0000 Subject: [PATCH 13/14] Update CHANGELOG 3.5.0 notes --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b119903..a05d21f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,10 @@ CHANGELOG ================================ -## v.3.5.0 (2015-09-29) +## v.3.5.0 (2015-11-13) ### Added * Support for the [/account/usage](http://dev.datasift.com/pylon/docs/api/acct-api-endpoints/get-accountusage) API endpoint * Added explicit support for 412, 415, 503 and 504 HTTP error responses -* Support for the [/pylon/sample](http://dev.datasift.com/pylon/docs/api/pylon-api-endpoints/pylonsample) API endpoint. Full details about the feature can be found in our [platform release notes]() +* Support for the [/pylon/sample](http://dev.datasift.com/pylon/docs/api/pylon-api-endpoints/pylonsample) API endpoint. Full details about the feature can be found in our [platform release notes](http://community.datasift.com/t/pylon-1-6-release-notes/1859) ### Changed * Only set ```Content-Type``` HTTP header for POST/PUT requests; it's not necessary unless we are passing a request entity From aaa6d871ad08e2b4bb77e5a3c25716626279ceec Mon Sep 17 00:00:00 2001 From: Jason Dugdale Date: Fri, 13 Nov 2015 15:25:53 +0000 Subject: [PATCH 14/14] Trivial refactoring (mainly comments/whitespace) in examples --- .rubocop_todo.yml | 2 +- examples/account_identity_eg.rb | 4 +-- examples/auth.rb | 57 ++++++++++++++++----------------- examples/core_api_eg.rb | 2 +- examples/live_stream_eg.rb | 6 ++-- examples/pull.rb | 43 +++++++++++++------------ examples/push_eg.rb | 17 +++++----- 7 files changed, 67 insertions(+), 64 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 6029026..ba1abfb 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -43,7 +43,7 @@ Metrics/CyclomaticComplexity: # Offense count: 118 # Configuration parameters: AllowURI, URISchemes. LineLength: - Max: 90 + Max: 100 # Offense count: 33 # Configuration parameters: CountComments. diff --git a/examples/account_identity_eg.rb b/examples/account_identity_eg.rb index 5f59329..d3a0742 100644 --- a/examples/account_identity_eg.rb +++ b/examples/account_identity_eg.rb @@ -10,7 +10,7 @@ def run begin puts "Create a new identity" identity = @datasift.account_identity.create( - "Ruby Identity #{DateTime.now.to_s}", "active", false + "Ruby Identity #{DateTime.now}", "active", false ) identity_id = identity[:data][:id] puts identity[:data].to_json @@ -23,7 +23,7 @@ def run puts "\nUpdate an identity" puts @datasift.account_identity.update( - identity_id, "Updated Ruby Identity #{DateTime.now.to_s}" + identity_id, "Updated Ruby Identity #{DateTime.now}" )[:data].to_json puts "\nDelete an identity" diff --git a/examples/auth.rb b/examples/auth.rb index 3e165e6..e6ed37f 100644 --- a/examples/auth.rb +++ b/examples/auth.rb @@ -3,29 +3,29 @@ class DataSiftExample def initialize @config = { - :username => 'DATASIFT_USERNAME', - :api_key => 'DATASIFT_API_KEY', - :api_version => 'v1.2' + username: 'DATASIFT_USERNAME', + api_key: 'DATASIFT_API_KEY', + api_version: 'v1.2' } @params = { - :output_type => 's3', - :output_params => { - :bucket => 'YOUR_BUCKET_NAME', - :directory => 'ruby', - :acl => 'private', - :delivery_frequency => 0, - :max_size => 104857600, - :file_prefix => 'DataSift', - :auth => { - :access_key => 'ADD_YOUR_ACCESS_KEY', - :secret_key => 'ADD_YOUR_SECRET_KEY', + output_type: 's3', + output_params: { + bucket: 'YOUR_BUCKET_NAME', + directory: 'ruby', + acl: 'private', + delivery_frequency: 0, + max_size: 104857600, + file_prefix: 'DataSift', + auth: { + access_key: 'ADD_YOUR_ACCESS_KEY', + secret_key: 'ADD_YOUR_SECRET_KEY', } } } @pull_params = { - :output_type => 'pull', - :output_params => { - :max_size => 52428800 + output_type: 'pull', + output_params: { + max_size: 52428800 } } @datasift = DataSift::Client.new(@config) @@ -35,22 +35,21 @@ def initialize def create_push(hash, is_historics_id = false) create_params = @params.merge ({ - #hash or historics_id can be used but not both - :name => 'My awesome push subscription', - :initial_status => 'active', # or 'paused' or 'waiting_for_start' + # Hash or historics_id can be used, but not both + name: 'My awesome push subscription', + initial_status: 'active', # or 'paused' or 'waiting_for_start' }) if is_historics_id - create_params.merge!({:historics_id => hash}) + create_params.merge!(historics_id: hash) else - create_params.merge!({:hash => hash, - #start and end are not valid for historics - :start => Time.now.to_i, - :end => Time.now.to_i + 320 - }) + # Start and end are not valid for historics + create_params.merge!( + hash: hash, + start: Time.now.to_i, + end: Time.now.to_i + 320 + ) end puts 'Creating subscription' - subscription = @datasift.push.create create_params - puts 'Create push => ' + subscription.to_s - subscription + @datasift.push.create create_params end end diff --git a/examples/core_api_eg.rb b/examples/core_api_eg.rb index f9fb939..e49c5f4 100644 --- a/examples/core_api_eg.rb +++ b/examples/core_api_eg.rb @@ -35,7 +35,7 @@ def run rescue DataSiftError => dse puts dse.message - # Then match specific one to take action - All errors thrown by the client extend DataSiftError + # Then match specific one to take action; All errors thrown by the client extend DataSiftError case dse when ConnectionError # some connection error diff --git a/examples/live_stream_eg.rb b/examples/live_stream_eg.rb index ccf14ab..30b3d64 100644 --- a/examples/live_stream_eg.rb +++ b/examples/live_stream_eg.rb @@ -68,15 +68,15 @@ def run puts "DataSift Message #{hash} ==> #{message}" end - conn = DataSift::new_stream(@config, on_delete, on_error, on_connect, on_close) + conn = DataSift::new_stream(@config, on_delete, on_error, on_connect, on_close) conn.on_datasift_message = on_datasift_message #can do something else here now... puts 'Do some other business stuff...' conn.stream.read_thread.join #rescue DataSiftError rescue DataSiftError => dse - puts "Error #{dse.message}" - # Then match specific one to take action - All errors thrown by the client extend DataSiftError + puts dse.inspect + # Then match specific one to take action; All errors thrown by the client extend DataSiftError case dse when ConnectionError # some connection error diff --git a/examples/pull.rb b/examples/pull.rb index 769f192..0f1d08a 100644 --- a/examples/pull.rb +++ b/examples/pull.rb @@ -6,34 +6,37 @@ def initialize def run begin - @params = {:output_type => 'pull'} + @params = {output_type: 'pull'} puts 'Validating the Pull subscription' - if @datasift.push.valid? @params - stream = @datasift.compile 'interaction.content contains "music"' - subscription = create_push(stream[:data][:hash]) + fail InvalidParamError unless @datasift.push.valid? @params - subscription_id = subscription[:data][:id] - #pull a bunch of interactions from the push queue - only work if we had set the output_type above to pull - #pull @datasift.pull subscription_id + stream = @datasift.compile 'interaction.content contains "music"' + subscription = create_push(stream[:data][:hash]) - puts "\nPulling data a first time, then waiting 10 seconds" - @datasift.push.pull(subscription_id).each { |e| puts e } - - sleep 10 + subscription_id = subscription[:data][:id] + # Pull a bunch of interactions from the push queue. This only works if we had set the + # output_type above to "pull" - puts "\nPulling data a second time, then waiting 10 seconds" + 2.times do + puts "\nPulling data, then waiting 10 seconds" @datasift.push.pull(subscription_id).each { |e| puts e } - sleep 10 + end - puts "\nPulling data the third and final time time" - #passing a lambda is more efficient because it is executed once for each interaction received - #this saves having to iterate over the array returned so the same iteration isn't done twice - @datasift.push.pull(subscription_id, 20971520, '', lambda{ |e| puts "on_message => #{e}" }) + puts "\nPulling data the third and final time time" + # Passing a lambda is more efficient because it is executed once for each interaction + # received this saves having to iterate over the array returned so the same iteration + # isn't processed twice + @datasift.push.pull( + subscription_id, + 20_971_520, + '', + lambda{ |e| puts "on_message => #{e}" } + ) + + puts "\nDeleting the Pull subscription" + @datasift.push.delete subscription_id - puts "\nDeleting the Pull subscription" - @datasift.push.delete subscription_id - end #rescue DataSiftError rescue DataSiftError => dse puts dse.inspect diff --git a/examples/push_eg.rb b/examples/push_eg.rb index 5e7bc6d..e10ee8d 100644 --- a/examples/push_eg.rb +++ b/examples/push_eg.rb @@ -8,14 +8,17 @@ def initialize def run begin puts 'Creating Push subscription' - subscription = @datasift.push.create @params.merge(hash: '54dbfc8464258de162b7f1a057e630c5', name: 'Ruby Client Example') + subscription = @datasift.push.create @params.merge( + hash: '54dbfc8464258de162b7f1a057e630c5', + name: 'Ruby Client Example' + ) subscription_id = subscription[:data][:id] puts "\nPush subscription created! Push Subscription ID #{subscription_id}" puts "\nGetting subscription info" # Get details for a subscription. Also available are - # push.[get, get_by_hash,get_by_historics_id] + # push.[get, get_by_hash, get_by_historics_id] puts @datasift.push.get_by_subscription subscription_id puts "\nPausing Push subscription" @@ -27,18 +30,16 @@ def run @datasift.push.resume subscription_id puts "\nGetting subscription logs" - # Get logs for a subscription. Also available is - # push.log to get logs for all subscriptions + # Get logs for a subscription. Also available is push.log to get logs for all subscriptions puts @datasift.push.log_for subscription_id puts "\nStopping Push subscription" - # Push subscriptions can be stopped. Once stopped, a - # subscription can not be resumed + # Push subscriptions can be stopped. Once stopped, a subscription can not be resumed @datasift.push.stop subscription_id puts "\nDeleting Push subscription" - # Push subscriptions can be deleted. On delete, any undelivered - # data is dropped. A delete is permenent. + # Push subscriptions can be deleted. On delete, any undelivered data is dropped. A delete + # is permenent. @datasift.push.delete subscription_id rescue DataSiftError => dse