gnip-client 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/gnip/gnip-full-archive/full_archive.rb +11 -6
- data/lib/gnip/version.rb +1 -1
- metadata +2 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7823da744cc5f7813dc5d7ae1189a3f5ef4f46a5
|
|
4
|
+
data.tar.gz: aa5ffac45a636bfcc599812e4d0d7305bd888a50
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6d6f31dd21ddd20f4df463ef236ce4a390e876363b2e821fb32bf83f251a8b91b86704bb7b3f32bfcba1a9a160717bbdc584952bef03875a669de62da4faa61e
|
|
7
|
+
data.tar.gz: 77055fa6b3ad251bf514c918ddfb60e73f1e11bc8307e5a65c7ff772c87c52cfc178c69d543ca989d2465b8d7a3159c2bf08e10e67d0ca360ab53a5b8f35aee5
|
|
@@ -31,11 +31,14 @@ module Gnip
|
|
|
31
31
|
search_options[:next] = options[:next_cursor] if options[:next_cursor]
|
|
32
32
|
url = [self.search_url, search_options.to_query].join('?')
|
|
33
33
|
begin
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
gnip_call = self.class.get(url, basic_auth: @auth)
|
|
35
|
+
parsed_response = gnip_call.parsed_response
|
|
36
|
+
parsed_response = (parsed_response||{}).with_indifferent_access
|
|
37
|
+
raise gnip_call.response.message if !parsed_response.present?
|
|
38
|
+
if parsed_response[:error].present?
|
|
39
|
+
response = { results: [], next: nil, error: parsed_response[:error][:message] }
|
|
37
40
|
else
|
|
38
|
-
response = { results: parsed_response[
|
|
41
|
+
response = { results: parsed_response[:results], next: parsed_response[:next] }
|
|
39
42
|
end
|
|
40
43
|
rescue Exception => e
|
|
41
44
|
response = { results: [], next: nil, error: e.message }
|
|
@@ -57,8 +60,10 @@ module Gnip
|
|
|
57
60
|
url = [self.counts_url, search_options.to_query].join('?')
|
|
58
61
|
|
|
59
62
|
begin
|
|
60
|
-
|
|
61
|
-
parsed_response = parsed_response
|
|
63
|
+
gnip_call = self.class.get(url, basic_auth: @auth)
|
|
64
|
+
parsed_response = gnip_call.parsed_response
|
|
65
|
+
parsed_response = (parsed_response||{}).with_indifferent_access
|
|
66
|
+
raise gnip_call.response.message if !parsed_response.present?
|
|
62
67
|
if parsed_response[:error].present?
|
|
63
68
|
response = { results: [], next: nil, error: parsed_response[:error][:message] }
|
|
64
69
|
else
|
data/lib/gnip/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gnip-client
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Duccio Giovannelli
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-
|
|
11
|
+
date: 2015-11-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -162,4 +162,3 @@ specification_version: 4
|
|
|
162
162
|
summary: A Ruby library for accessing the Gnip API. See https://gnip.com/ for full
|
|
163
163
|
details and to sign up for an account.
|
|
164
164
|
test_files: []
|
|
165
|
-
has_rdoc:
|