Created
October 7, 2013 22:48
-
-
Save predictioniogists/6876316 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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