Skip to content

Conversation

@richmolj
Copy link
Contributor

Adds ability to calculate stats in 'meta' against the scope. eg:

GET /api/v1/posts?stats[total]=count&stats[rank]=average,maximum

returns

{
  data: [],
  meta: {
    stats: {
      total: { count: 100 },
      rank: { average: 3.3, maximum: 10 }
    }
  }
}

Adds ability to calculate stats in 'meta' against the scope. eg:

GET /api/v1/posts?stats[total]=count&stats[rank]=average,maximum

returns

{
  data: [],
  meta: {
    stats: {
      total: { count: 100 },
      rank: { average: 3.3, maximum: 10 }
    }
  }
}
@richmolj richmolj merged commit b391224 into jsonapi-suite:master Nov 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant