class Ygoprodeck::Archetype
Attributes
archetype[R]
Public Class Methods
is(archetype)
click to toggle source
# File lib/ygoprodeck/search/archetype.rb, line 5 def self.is(archetype) url = "#{Ygoprodeck::Endpoint.is}?archetype=#{archetype}" uri = URI(url) response = Net::HTTP.get(uri) load = JSON.parse(response) if load[0] == nil '{"error"=>"No card matching your query was found in the database."}' else load end end