whatfoodbanksneed / food_bank_api

An API that returns items needed by foodbanks near a given location
3 stars 2 forks source link

"Foodbank centres" not included in list of foodbanks #1

Closed martinlugton closed 4 years ago

martinlugton commented 4 years ago

Foodbanks can have "foodbank centres" as children.

For the MVP I left these out, but they should be included.

Update get_foodbank_details_and_write_to_file.py to include them.

Decide whether there need to be any architectural changes to how foodbank data is stored to accommodate these.

martinlugton commented 4 years ago

Each foodbank has a foodbank_centre key. It can be false, in which case a foodbank has no child foodbank centres. Otherwise, the foodbank centre value is a list of dictionary items of some length. Example item below:

{ "foodbank_name": "Ellon Foodbank Centre", "foodbank_telephone_number": "07562 914986", "opening_time": [ { "day": "monday", "foodbank_status": "open", "opening_time": "10:00", "closing_time": "12:00" }, { "day": "friday", "foodbank_status": "open", "opening_time": "10:00", "closing_time": "12:00" } ], "centre_address": "Ythan Centre<br \/>\r\nStation Road<br \/>\r\nEllon<br \/>\r\nAberdeenshire", "post_code": "AB41 9AE", "centre_geolocation": { "address": "Ellon Kirk Centre, 4 Station Road, Ellon, United Kingdom", "lat": "57.3653075", "lng": "-2.072831800000017" } },

martinlugton commented 4 years ago

Foodbank centres don't seem to have an independent website or list of items needed. So inherit those from the parent.

martinlugton commented 4 years ago

5 Addresses this. See the PR for data structure changes.

martinlugton commented 4 years ago

PR #5 has been merged and this is now resolved.