1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-06-02 23:27:50 +02:00
OpenIntegrations/docs/en/md/VK/Statistics/Get-post-statistics.mdx

111 lines
2.3 KiB
Plaintext
Raw Normal View History

2024-10-15 10:50:56 +03:00
---
2024-10-15 10:16:04 +03:00
sidebar_position: 2
---
2024-10-15 10:50:56 +03:00
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
2024-10-15 10:16:04 +03:00
# Get post statistics
Gets statistics in terms of posts
`Function GetPostStatistics(Val PostIDsArray, Val Parameters = "") Export`
2024-10-15 15:15:47 +03:00
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| PostIDsArray | --posts | Array of String,Number | ✔ | Array of post IDs |
| Parameters | --auth | Structure Of String | ✖ | Authorization JSON or path to .json |
2024-10-15 10:16:04 +03:00
Returns: Array of Arbitrary - Array of post statistics data
<br/>
2024-10-15 21:15:56 +03:00
```bsl title="1C:Enterprise/OneScript code example"
2024-10-15 10:16:04 +03:00
Parameters = GetVKParameters();
ArrayOfPosts = New Array;
ArrayOfPosts.Add(214);
ArrayOfPosts.Add(215);
Result = OPI_VK.GetPostStatistics(ArrayOfPosts, Parameters);
```
2024-10-20 22:36:03 +03:00
<Tabs>
<TabItem value="bash" label="Bash" default>
```bash
2024-10-22 08:59:24 +03:00
# JSON data can also be passed as a path to a .json file
2024-10-20 22:36:03 +03:00
oint vk GetPostStatistics \
2024-10-22 08:59:24 +03:00
--posts "[214,215]" \
--auth "{'access_token':'***','owner_id':'-218861756','app_id':'51694790','group_id':'218861756'}"
2024-10-20 22:36:03 +03:00
```
</TabItem>
<TabItem value="bat" label="CMD/Bat" default>
```batch
2024-10-22 08:59:24 +03:00
:: JSON data can also be passed as a path to a .json file
2024-10-20 22:36:03 +03:00
oint vk GetPostStatistics ^
2024-10-22 08:59:24 +03:00
--posts "[214,215]" ^
--auth "{'access_token':'***','owner_id':'-218861756','app_id':'51694790','group_id':'218861756'}"
2024-10-20 22:36:03 +03:00
```
</TabItem>
</Tabs>
2024-10-15 10:16:04 +03:00
```json title="Result"
[
{
"post_id": 214,
"hide": 0,
"join_group": 0,
"links": 0,
"reach_subscribers": 1,
"reach_total": 1,
"reach_viral": 0,
"reach_ads": 0,
"report": 0,
"to_group": 1,
"unsubscribe": 0,
"ad_views": 0,
"ad_subscribers": 0,
"ad_hide": 0,
"ad_unsubscribe": 0,
"ad_links": 0,
"ad_to_group": 0,
"ad_join_group": 0,
"ad_coverage": 0,
"ad_report": 0
},
{
"post_id": 215,
"hide": 0,
"join_group": 0,
"links": 0,
"reach_subscribers": 1,
"reach_total": 1,
"reach_viral": 0,
"reach_ads": 0,
"report": 0,
"to_group": 0,
"unsubscribe": 0,
"ad_views": 0,
"ad_subscribers": 0,
"ad_hide": 0,
"ad_unsubscribe": 0,
"ad_links": 0,
"ad_to_group": 0,
"ad_join_group": 0,
"ad_coverage": 0,
"ad_report": 0
}
]
```