lib/petfinder/shelter.rb in petfinder-wrap-1.0.3.4 vs lib/petfinder/shelter.rb in petfinder-wrap-1.0.3.5
- old
+ new
@@ -9,18 +9,10 @@
def initialize attributes
@attributes = attributes
end
def get_pets
- get_shelter_pets = API_BASE_URI + "shelter.getPets?key=#{Client.new.api_key}&id=#{id}&output=basic&format=json"
- response = open(get_shelter_pets).read
- res = []
- if resp = JSON.parse(response)
- resp["petfinder"]["pets"]["pet"].each do |pet|
- # res << Petfinder::Pet.new(pet[1][0])
- res << Pet.new(pet)
- end
- end
+ res = Client.new.get_shelter_pets self
res
end
end
end