Skip to content

Commit

Permalink
Search multiple shelters on petharbor
Browse files Browse the repository at this point in the history
  • Loading branch information
amclelland committed Oct 2, 2015
1 parent 34dc3df commit 4199951
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ petfinder_shelter_id='MA38'

# Petharbor Key
# This must be set for data to be fetched from Petharbor
# To search multiple shelter, separate by commas
# example: '12345','23456','34567'
petharbor_shelter_id='DNVR'
# This must be all or a smaller set of these pet types.
# The types must be separated by a space.
Expand Down
4 changes: 2 additions & 2 deletions lib/cute_pets/pet_fetcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def get_petharbor_pet()
uri = URI('http://www.petharbor.com/petoftheday.asp')

params = {
shelterlist: "\'#{get_petharbor_shelter_id}\'",
shelterlist: get_petharbor_shelter_id,
type: get_petharbor_pet_type,
availableonly: '1',
showstat: '1',
Expand Down Expand Up @@ -133,7 +133,7 @@ def get_petfinder_shelter_id
end

def get_petharbor_shelter_id
get_shelter_id(ENV.fetch('petharbor_shelter_id'))
ENV.fetch('petharbor_shelter_id')
end

def get_shelter_id(id)
Expand Down

0 comments on commit 4199951

Please sign in to comment.