Sha256: 5f802025894b84a09e5ffb96d4c6b858c7903758f1613276d190b9c026b66405
Contents?: true
Size: 610 Bytes
Versions: 1
Compression:
Stored size: 610 Bytes
Contents
module MyAnimeList class Anime def initialize(options={}) @myanimelist_username = options[:username] @myanimelist_password = options[:password] end def search(name) get_search(name) end def get_search(name) response = RestClient::Request.new( method: :get, url: "http://myanimelist.net/api/anime/search.xml?q=#{name}", user: @myanimelist_username, password: @myanimelist_password, content_type: :xml ).execute parse_xml response end def parse_xml(response) Hash.from_xml response end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
myanimelist-0.0.2 | lib/myanimelist/anime.rb |