Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modification in to-fix API: group stats by tag #253

Closed
tridip1931 opened this issue Dec 7, 2017 · 3 comments

Comments

Projects
None yet
2 participants
@tridip1931
Copy link

commented Dec 7, 2017

馃憢

We have a requirement of grouping tags by status

The current API list status and tags count separately. It is very difficult to group status by tags in SQL

{
    "total": 1111,
    "status": {
        "status1": 6,
        "status2": 4,
        "status3": 5,
        "status4": 2,
        "status5": 1
    },
    "tags": {
        "tag1": 148,
        "tag2": 6,
        "tag3": 22,
        
    }

As per discussion with @batpad , it would be much simpler if we modify object to something like this instead of doing the work in mode

   {
       "tags": {
           "tag1": {
               "status1": 33,
               "status2": 55,
               "status3": 77,
           },
           "tag2": {
               "status1": 11,
               "status2": 22,
               "status3": 33,
           }
       }
   }

@batpad batpad changed the title Modification in to-fix API Modification in to-fix API: group stats by tag Dec 7, 2017

@batpad

This comment has been minimized.

Copy link

commented Dec 7, 2017

+cc @maning

@batpad

This comment has been minimized.

Copy link

commented Dec 7, 2017

@tridip1931 - do you think we can just change the current stats end-point to output things grouped by tag, or do you think we need to keep the current end-point and add an option / a new end-point for the new format proposed here?

@tridip1931

This comment has been minimized.

Copy link
Author

commented Dec 7, 2017

@batpad In terms of making it future proof and incoming future requirements, will it make sense to keep both end-points?

@batpad batpad closed this in 6ea5be2 Dec 8, 2017

batpad pushed a commit that referenced this issue Dec 8, 2017

Sanjay Bhangar
Merge pull request #254 from osmlab/group-stats
change structure of stats response, fixes #253
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can鈥檛 perform that action at this time.