feedingamerica / freshtrak-public

FreshTrak public access created with Can't Stop Columbus March 2020
4 stars 3 forks source link

initial foodbanks api #25

Closed PhilNorman2 closed 4 years ago

PhilNorman2 commented 4 years ago

Returns 1 or more Foodbanks on zip_code for use in Pantry Finder. Includes display_url logic.

curl -XGET "localhost:8888/api/foodbanks?zip_code=43201"

"foodbanks":[ { "address":"3960 Brookham DR", "city":"Grove City", "state":"OH", "zip":"43123", "name":"Mid-Ohio Foodbank", "nickname":"Mid-Ohio Foodbank", "display_url":"https://www.midohiofoodbank.org/get-help/get-food/", "fb_agency_locator_url":"https://www.midohiofoodbank.org/get-help/get-food/", "fb_url":"https://www.midohiofoodbank.org/", "fb_fano_url":"https://www.feedingamerica.org/find-your-local-foodbank/mid-ohio-foodbank.html" } ]

codecov[bot] commented 4 years ago

Codecov Report

Merging #25 into master will increase coverage by 0.07%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #25      +/-   ##
==========================================
+ Coverage   99.65%   99.72%   +0.07%     
==========================================
  Files          29       34       +5     
  Lines         289      366      +77     
==========================================
+ Hits          288      365      +77     
  Misses          1        1              
Impacted Files Coverage Δ
...er-api/app/controllers/api/foodbanks_controller.rb 100.00% <100.00%> (ø)
pantry-finder-api/app/lib/config.rb 100.00% <100.00%> (ø)
pantry-finder-api/app/models/foodbank.rb 100.00% <100.00%> (ø)
pantry-finder-api/app/models/zip_code.rb 100.00% <100.00%> (ø)
...-finder-api/app/serializers/foodbank_serializer.rb 100.00% <100.00%> (ø)
pantry-finder-api/config/routes.rb 100.00% <100.00%> (ø)
.../spec/controllers/api/foodbanks_controller_spec.rb 100.00% <100.00%> (ø)
pantry-finder-api/spec/models/foodbank_spec.rb 100.00% <100.00%> (ø)
...r-api/spec/serializers/foodbank_serializer_spec.rb 100.00% <100.00%> (ø)
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 91b0d61...660011b. Read the comment docs.