Sha256: 5487591d7e23559a0b5dd6828ec1733b662de2811e5a566d5bb4fc170a0e4cb0
Contents?: true
Size: 440 Bytes
Versions: 1
Compression:
Stored size: 440 Bytes
Contents
module Ugigi class Parser def initialize @agent = Mechanize.new @agent.user_agent = "Ugigi Ruby #{Ugigi::VERSION}" end def fetch(args) params = Ugigi.serialize_parameter(args) page = @agent.get(URI.join(BASE_URL, params)) data = JSON.parse(page.body) indexes = [] data.each do |e| index = Index.new(e) indexes << index end return indexes end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ugigi-0.0.1 | lib/ugigi/parser.rb |