class InstaScraper::JSON
Attributes
response[W]
Public Instance Methods
data()
click to toggle source
# File lib/insta_scraper/json.rb, line 7 def data @data ||= Hashie::Mash.new(::JSON.parse(raw_json)) .extend(Hashie::Extensions::DeepFetch) .extend(Hashie::Extensions::DeepFind) end
raw_json()
click to toggle source
# File lib/insta_scraper/json.rb, line 3 def raw_json @raw_json ||= response.body end
response()
click to toggle source
# File lib/insta_scraper/json.rb, line 16 def response @response ||= Faraday.get(url) end
Protected Instance Methods
serialize_params()
click to toggle source
# File lib/insta_scraper/json.rb, line 22 def serialize_params return '' if params.empty? "?" + params.map {|k, v| "#{k}=#{v}"}.join('&') end