page = HTTParty.get("https://api.4chan.org/b/0.json").body
threads = JSON.parse(page)
count = 0
unless threads.nil?
threads['threads'].each do
count = count + 1
end
end
if count > 0
say "You have #{count} new threads."
unless threads['posts'].nil?
threads['posts'].each do |x|
say x['com']
end
end
end
if count == 0
say "You have no new threads."
end
なんらかの理由で、投稿は空だと思いますが、スレッドは決して空ではありません....何が間違っているのかわかりません.Facebookプラグインで同じことをしていますが、昨日はうまくいきましたが、今は何もありません. 私は何か間違ったことをしていますか?