...
 
Commits (2)
......@@ -76,7 +76,10 @@ class fetch implements Interfaces\Api
$iterator->setIncrement(true);
foreach ($iterator as $guid => $entity) {
$response['boosts'][] = array_merge($entity->export(), ['boosted_guid' => (string) $guid]);
$response['boosts'][] = array_merge($entity->export(), [
'boosted_guid' => (string) $guid,
'urn' => "urn:boost:content:{$guid}",
]);
Counters::increment($entity->guid, "impression");
Counters::increment($entity->owner_guid, "impression");
}
......@@ -97,7 +100,11 @@ class fetch implements Interfaces\Api
break;
case 'newsfeed':
foreach ($iterator as $guid => $entity) {
$response['boosts'][] = array_merge($entity->export(), ['boosted' => true, 'boosted_guid' => (string)$guid]);
$response['boosts'][] = array_merge($entity->export(), [
'boosted' => true,
'boosted_guid' => (string) $guid,
'urn' => "urn:boost:newsfeed:{$guid}",
]);
}
$response['load-next'] = $iterator->getOffset();
if (isset($_GET['rating']) && $pages[0] == 'newsfeed') {
......