Get post statistics
Gets statistics in terms of posts
- Parameters
- Advanced call ?
Function GetPostStatistics(Val PostIDsArray, Val Parameters = "") Export
| Parameter | CLI option | Type | Required | Description |
|---|---|---|---|---|
| PostIDsArray | --posts | Array of string, number | ✔ | Array of post IDs |
| Parameters | --auth | Structure Of String | ✖ | Authorization parameters. See GetAuthParameters |
Returns
Array of Arbitrary - Array of post statistics data
| Parameter | Description |
|---|---|
| proxy | InternetProxy or a structure with fields Protocol, Host, Port, User, Password, UseOSAuthentication |
| timeout | Request execution timeout |
| adv_response | Formats the response as a complete HTTP structure with fields code, body, and headers |
| retries | Number of HTTP request send attempts on 5** status codes or internal client errors |
| dontwait | Creates a background job and returns its data (for 1C and OneScript only) |
1C:Enterprise/OneScript code example
Parameters = GetVKParameters();
ArrayOfPosts = New Array;
ArrayOfPosts.Add(214);
ArrayOfPosts.Add(215);
Result = OPI_VK.GetPostStatistics(ArrayOfPosts, Parameters);
- Bash
- CMD/Bat
# JSON data can also be passed as a path to a .json file
oint vk GetPostStatistics \
--posts "['214','215']" \
--auth "{'access_token':'***','owner_id':'-218861756','app_id':'51694790','group_id':'218861756'}"
:: JSON data can also be passed as a path to a .json file
oint vk GetPostStatistics ^
--posts "['214','215']" ^
--auth "{'access_token':'***','owner_id':'-218861756','app_id':'51694790','group_id':'218861756'}"
Result
[
{
"post_id": 214,
"hide": 0,
"join_group": 0,
"links": 0,
"reach_subscribers": 2,
"reach_total": 2,
"reach_viral": 0,
"reach_ads": 0,
"report": 0,
"to_group": 1,
"unsubscribe": 0
},
{
"post_id": 215,
"hide": 0,
"join_group": 0,
"links": 0,
"reach_subscribers": 3,
"reach_total": 3,
"reach_viral": 0,
"reach_ads": 0,
"report": 0,
"to_group": 0,
"unsubscribe": 0
}
]