ruby_reddit_api-h 0.2.7 → 0.2.8
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/ruby_reddit_api/json_listing.rb +8 -6
- metadata +2 -2
@@ -18,13 +18,15 @@ module Reddit
|
|
18
18
|
end
|
19
19
|
else
|
20
20
|
data = json["data"]
|
21
|
-
|
21
|
+
unless data.empty?
|
22
|
+
Reddit::Base.instance_variable_set("@modhash", data["modhash"]) # Needed for api calls
|
22
23
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
24
|
+
children = data["children"] || [{"data" => data, "kind" => json["kind"] }]
|
25
|
+
children.each do |message|
|
26
|
+
kind = message["kind"]
|
27
|
+
message["data"]["kind"] = kind
|
28
|
+
results << self.new(message["data"])
|
29
|
+
end
|
28
30
|
end
|
29
31
|
end
|
30
32
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby_reddit_api-h
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.8
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2013-01-15 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: httparty
|