VK Audio API reference for VK Audio Token
Index
API Methods
General info
New API Methods

catalog.getBlockItems

Get items in a block. A block is a part of the section.

Parameters:

NameValue
block_idId of the section
start_from (optional)Id of the offset

Block ids are returned in id or block_id fields. They are returned, for example, by catalog.getSection method.

Offset is returned in the next_from field and is needed, for example, for scrolling suggested artists right (getting more artist icons)

Example (VK Official):

$block_id = 'abc12345';
curl_setopt($ch, CURLOPT_URL,
"https://api.vk.com/method/catalog.getBlockItems"
);
curl_setopt($ch, CURLOPT_POSTFIELDS,
"v=5.116&https=1&block_id=".urlencode($block_id)."&access_token=".TOKEN
);
<?php
include __DIR__.'/../../autoloader.php';
use Vodka2\VKAudioToken\SupportedClients;
//Credentials obtained by example_vkofficial.php script
define('TOKEN', $argv[1]);
define('USER_AGENT', SupportedClients::VkOfficial()->getUserAgent());
$ch = curl_init();
curl_setopt($ch,CURLOPT_HTTPHEADER, array('User-Agent: '.USER_AGENT));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
$block_id = 'abc12345';
curl_setopt($ch, CURLOPT_URL,
"https://api.vk.com/method/catalog.getBlockItems"
);
curl_setopt($ch, CURLOPT_POSTFIELDS,
"v=5.116&https=1&block_id=".urlencode($block_id)."&access_token=".TOKEN
);
echo json_encode(json_decode(curl_exec($ch)), JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE)."\n\n";