hotosm / galaxy-api

Backend to fetch data from Underpass
https://galaxy-api.hotosm.org/latest/redoc
GNU Affero General Public License v3.0
14 stars 5 forks source link

API Endpoint for Ogranization Hashtag Statistics #107

Closed kshitijrajsharma closed 2 years ago

kshitijrajsharma commented 2 years ago

Given a hashtag and a weekly/monthly frequency return key feature and user statistics for the hashtag Data Source: Insights Sample request body: {     hashtag: [“hashtag_1”, “hashtag_2”],     frequency: “w”/”m” }

Acceptance Criteria: • User provides a set of hashtags  ◦ Array of strings ◦ If this is null throw a 402 error with an appropriate error message ◦ Required parameter • Frequency: ◦ Allowed values in string: “w”/”m” ◦ Other values throws a 402 error ◦ Required parameter • Output Type: ◦ CSV/JSON • CSV ◦ Hashtag|frequency|start_date|end_date|total_new_buildings|total_unique_contributors|total_new_road_kms • JSON { { "hashtag": “msf”,  "frequency": "w",  “start_date”:, “end_date”: , “total_new_buildings”: , “total_unique_contributors”:, “total_new_road_kms”:   }, { "hashtag": “msf”,  "frequency": "w",  “start_date”: “end_date”: , “total_new_buildings”: , “total_unique_contributors”:, “total_new_road_kms”: },   { "hashtag": “msflondon”,  "frequency": "w",  “start_date”:, “end_date”: , “total_new_buildings”:  “total_unique_contributors”: “total_new_road_kms”: } }