ohcnetwork / life

Verified Crowd-Sourced Emergency Services Directory
https://life.coronasafe.network/
84 stars 56 forks source link

APIS should have parameters for states and districts #188

Closed Fayiz-A closed 3 years ago

Fayiz-A commented 3 years ago

Is your feature request related to a problem? Please describe. This issue is regarding the apis. The api always gives a huge list of all districts and states. For Example: This oxygen api gives a huge list of all states and districts data. The api should have an option to bring data about a particular state/district.

Describe the solution you'd like The state and the district can be passed in the query params like this https://life-api.coronasafe.network/data/oxygen/[stateName]/[districtName].

Describe alternatives you've considered Right now, I am working on a bot which fetches information from this api. I have to fetch all the data and filter it in the frontend itself. This is the only alternative I have. However, this will become impractical as data is increasing day by day.

Additional context

vigneshhari commented 3 years ago

@bodhish this can be done in the pipeline if needed.

bodhish commented 3 years ago

@vigneshhari the data could be processed and split across multiple chunks by a GitHub action.

The API would be straightforward vig GitHub pages and CF cache in BW.
I am thinking if it should be inside life or as a new repo that just deals with the translations.

vigneshhari commented 3 years ago

we don't need it inside life unless life actually uses it, anyone can take the data and create a GitHub pipeline to get the data.

bodhish commented 3 years ago

@Fayiz-A https://life-pipeline.coronasafe.network/

Fayiz-A commented 3 years ago

@bodhish Thanks for responding. I can't open https://life-pipeline.coronasafe.network/ . It is showing This site can’t be reached.life-pipeline.coronasafe.network took too long to respond.

bodhish commented 3 years ago

@tomahawk-pilot can you check if we have waf enabled for this subdomain

Screenshot_20210504-070233.jpg

Fayiz-A commented 3 years ago

@bodhish thanks, now it is opening.