Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save predictioniogists/6876316 to your computer and use it in GitHub Desktop.
Save predictioniogists/6876316 to your computer and use it in GitHub Desktop.
<?php
// Assuming we already have an ItemRec engine named 'similarapps'
// Get app ID
$app = getApp();
try {
// Retrieve similar apps for the current app
$command = $client->getCommand(
'itemsim_get_top_n',
array(
'pio_iid' => $app,
'pio_engine' => 'similarapps',
'pio_n' => 10
)
);
$result = $client->execute($command);
$recs = $result["pio_iids"];
} catch (Exception $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
}
show($recs);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment