getCommentCountPerUserStats
A GET request that returns the number of comments left by a user or users within a given time range.
Back to Stats API.
Request arguments
Endpoint getCommentCountPerUserStats
takes the following request arguments.
Response
Endpoint getCommentCountPerUserStats
returns the following response:
Successful requests return a JSON object containing the following:
Name | Type | Description |
---|---|---|
| String | "Number of Comments (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 getCommentCountPerUserStats
:
Request example
A cURL request to retrieve the total number of comments made by users 9 and 11 each hour from 11pm on Sunday, 14th October until 11pm on Monday, 15th October 2018:
curl -G -u graze:graze -k -v "https://localhost/graze/v1/getCommentCountPerUserStats" --data-urlencode 'users=[9,11]' --data-urlencode 'from=1539558000' --data-urlencode 'to=1539644399' --data-urlencode 'aggregation=sum'
Response example
A successful response returns the number of comments made by the users Ian and Sharon each hour:
[{ "datapoints":[ [6.0,1539558000000], [24.0,1539561600000], [1.0,1539565200000], [0.0,1539568800000], [14.0,1539572400000], [10.0,1539576000000], [4.0,1539579600000], [12.0,1539583200000], [25.0,1539586800000], [8.0,1539590400000], [0.0,1539598043846] ], "target":"Number of Comments (Ian Ince/Sharon Scott)" }]