Create story
Creates a story from an image
- Parameters
- Advanced call ?
Function CreateStory(Val Image, Val URL = "", Val Parameters = "") Export
| Parameter | CLI option | Type | Required | Description |
|---|---|---|---|---|
| Image | --picture | String, BinaryData | ✔ | Story background |
| URL | --url | String | ✖ | URL for button under the story |
| Parameters | --auth | Structure Of String | ✖ | Authorization parameters. See GetAuthParameters |
Returns
Map Of KeyAndValue - serialized JSON response from VK
| 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) |
tip
Parameters with Binary data type can also accept file paths on disk and URLs
1C:Enterprise/OneScript code example
Parameters = GetVKParameters();
URL = "https://github.com/Bayselonarrend/OpenIntegrations";
Image = "https://releases.openintegrations.dev/test_data/picture.jpg"; // URL, File path or Binary data
TFN = GetTempFileName("png");
CopyFile(Image, TFN);
Image = New BinaryData(TFN);
Result = OPI_VK.CreateStory(Image, URL, Parameters);
- Bash
- CMD/Bat
# JSON data can also be passed as a path to a .json file
oint vk CreateStory \
--picture "/tmp/5412nw4t.nuq.png" \
--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 CreateStory ^
--picture "/tmp/5412nw4t.nuq.png" ^
--auth "{'access_token':'***','owner_id':'-218861756','app_id':'51694790','group_id':'218861756'}"
Result
{
"response": {
"count": 1,
"groups": [
{
"id": 218861756,
"is_admin": 1,
"is_closed": 0,
"is_member": 1,
"name": "Test",
"photo_100": "https://sun9-30.userapi.com/s/v1/ig2/lNqfe2Aq8grOMSYdNFoH6OYdUT1hdnVYDMT9WsE4KM9TFqnYohcPXps1hv9uC4Isr_ocpcwTb1a1qaalD6eXk3L8.jpg?as=32x32%2C48x48%2C72x72%2C108x108%2C160x160%2C240x240%2C360x360%2C400x400&background=000000&quality=90&cs=100x100",
"photo_200": "https://sun9-30.userapi.com/s/v1/ig2/lNqfe2Aq8grOMSYdNFoH6OYdUT1hdnVYDMT9WsE4KM9TFqnYohcPXps1hv9uC4Isr_ocpcwTb1a1qaalD6eXk3L8.jpg?as=32x32%2C48x48%2C72x72%2C108x108%2C160x160%2C240x240%2C360x360%2C400x400&background=000000&quality=90&cs=200x200",
"photo_50": "https://sun9-30.userapi.com/s/v1/ig2/lNqfe2Aq8grOMSYdNFoH6OYdUT1hdnVYDMT9WsE4KM9TFqnYohcPXps1hv9uC4Isr_ocpcwTb1a1qaalD6eXk3L8.jpg?as=32x32%2C48x48%2C72x72%2C108x108%2C160x160%2C240x240%2C360x360%2C400x400&background=000000&quality=90&cs=50x50",
"photo_base": "https://sun9-30.userapi.com/s/v1/ig2/lNqfe2Aq8grOMSYdNFoH6OYdUT1hdnVYDMT9WsE4KM9TFqnYohcPXps1hv9uC4Isr_ocpcwTb1a1qaalD6eXk3L8.jpg?as=32x32%2C48x48%2C72x72%2C108x108%2C160x160%2C240x240%2C360x360%2C400x400&background=000000&quality=90",
"screen_name": "club218861756",
"type": "group",
"verified": 0,
"can_upload_story": 1,
"member_status": 1,
"trending": 0
}
],
"items": [
{
"access_key": "***",
"answers_count": 0,
"can_ask": 0,
"can_ask_anonymous": 0,
"can_comment": 1,
"can_hide": 1,
"can_like": true,
"can_reply": 1,
"can_see": 1,
"can_share": 1,
"can_use_in_narrative": true,
"date": 1784481043,
"expires_at": 1784567443,
"id": 456241893,
"is_ads": false,
"likes_count": 0,
"link": {
"text": "Ещё",
"url": "https://github.com/Bayselonarrend/OpenIntegrations"
},
"narratives_count": 0,
"no_sound": false,
"owner_id": -218861756,
"photo": {
"album_id": -81,
"date": 0,
"has_tags": false,
"id": 457265733,
"owner_id": -218861756,
"sizes": [
{
"height": 453,
"type": "x",
"url": "https://sun9-84.userapi.com/s/v1/ig2/Br5TUz5kHRpG9F7ga4B2q-SOenYaNh9OlILUQiLAJiE42OOe9RWqy4SFGgx6ketTdbhL2Vfq9suhzZIuYB8VU-bG.jpg?quality=95&size=604x453",
"width": "***"
},
{
"height": 605,
"type": "y",
"url": "https://sun9-84.userapi.com/s/v1/ig2/7FUO4cWXzkXeBS3crvZXCpmo-GDiuM6Sr3wZwe-KwWXs-oHq8extMmmFvOlq7rlyAPtigy9J9pgtiZTjCyOdELwN.jpg?quality=95&size=807x605",
"width": "***"
},
{
"height": 960,
"type": "z",
"url": "https://sun9-84.userapi.com/s/v1/ig2/YS_1eAxeJE1nsPmXCM6X2DamFXDni1PPLTRZZey2G4UYs3k61DR7sFUACugPe83fS-gPtHJtbdMyLhggIXpPGW7l.jpg?quality=95&size=1280x960",
"width": "***"
},
{
"height": 1920,
"type": "w",
"url": "https://sun9-84.userapi.com/s/v1/ig2/v-XEphXZ0dEzgXNMLn0NEHvCJxojsQT9Me4f6xzxChEAgvrG_C8nPgubhQYDW7QgTQlb6lRZ8dInD-qscPo95BkP.jpg?quality=95&size=2560x1920",
"width": "***"
}
],
"text": ""
},
"preloading_enabled": true,
"reaction_set_id": "story_reactions",
"replies": {
"count": 0,
"new": 0
},
"track_code": "story_json/eyJvd25lcl9pZCI6LTIxODg2MTc1Niwic3RvcnlfaWQiOjQ1NjI0MTg5Mywidmlld2VyX2lkIjo2NTc4NDY3NTZ9",
"type": "photo",
"views": 0
}
],
"profiles": []
}
}