getRatedSituationsPerUserStats
A GET request that returns the number of Situations rated by a user within a given time range.
Back to Stats API.
Request arguments
Endpoint getRatedSituationsPerUserStats
takes the following request arguments.
Response
Endpoint getRatedSituationsPerUserStats
returns the following response:
Successful requests return a JSON object containing the following:
Name | Type | Description |
---|---|---|
| String | "Rated Situations (full name)" |
| Number Array | An array of data points. Each data point is an array in the format [data point, timestamp]:
|
Examples
The following examples demonstrate typical use of endpoint getRatedSituationsPerUserStats
:
Request example
A cURL request to return the number of Situations rated by users 5 and 7 from 3:57am until 9:57am on Thursday, October 5th 2018:
curl -G -u graze:graze -k -v "https://localhost/graze/v1/getRatedSituationsPerUserStats" --data-urlencode 'users=[5,7]' --data-urlencode 'from=1538621843' --data-urlencode 'to=1538643443'
Response example
A successful response returns the number of Situations rated by the users Steve and Charlie each hour during the time range:
[{ "datapoints":[ [6.0,1538621843000], [1.0,1538625443000], [6.0,1538629043000], [5.0,1538632643000], [2.0,1538636243000], [5.0,1538639843000] ], "target":"Rated Situations (Steve Smith)" }, { "datapoints":[ [0.0,1538621843000], [3.0,1538625443000], [1.0,1538629043000], [6.0,1538632643000], [6.0,1538636243000], [8.0,1538639843000] ], "target":"Rated Situations (Charlie Copper)" }]