Stream stream = "file stream"; App42Callback requestCallback = this; /* This function used the App42Callback interface */ ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); RecommenderService recommenderService = api.BuildRecommenderService(); recommenderService.LoadPreferenceFile(stream,requestCallback); OnSuccess(Object obj) { Recommender recommender = (Recommender) obj; App42Response response = (App42Response) recommender; String jsonResponse = response.ToString(); } public class CallBack : App42Callback { public override void OnSuccess(Object obj) { Recommender recommender = (Recommender) obj; //Do whatever you want with the object } public override void OnException(App42Exception e) { //Do whatever you want with the exception } }
InputStream preferenceFileIS = null; /* get inputStream from your source. */ ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); RecommenderService recommenderService = api.buildRecommenderService(); App42Response response = recommenderService.loadPreferenceFile(preferenceFileIS); String jsonResponse = response.toString()
String preferenceFilePath = "Local file path"; ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); RecommenderService recommenderService = api.buildRecommenderService(); App42Response response = recommenderService.loadPreferenceFile(preferenceFilePath); String jsonResponse = response.toString()
NSString *preferenceFilePath = @"Local file path"; ServiceAPI *serviceAPIObj = [[ServiceAPI alloc]init]; serviceAPIObj.apiKey = @"<API_KEY>"; serviceAPIObj.secretKey = @"<SECRET_KEY>"; RecommenderService *recommenderService = [serviceAPIObj buildRecommenderService]; App42Response *response = [recommenderService loadPreferenceFile:fileName preferenceFilePath:filePath description:description] NSString *jsonResponse = [response toString];
String preferenceFilePath = "Local file path"; ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); RecommenderService recommenderService = api.buildRecommenderService(); App42Response response = recommenderService.loadPreferenceFile(preferenceFilePath); String jsonResponse = response.toString()
String preferenceFilePath = "Local file path"; ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); RecommenderService recommenderService = api.BuildRecommenderService(); App42Response response = recommenderService.LoadPreferenceFile(preferenceFilePath); String jsonResponse = response.ToString()
preferenceFilePath = "Local file path"; api = App42::ServiceAPI.new("<API_KEY>","<SECRET_KEY>"); recommenderService = api.buildRecommenderService(); recommender = recommenderService.load_preference_file(preferenceFilePath); jsonResponse = recommender.to_s();
The request format for loadPreferenceFile is URL : https://api.shephertz.com/cloud/1.0/recommend Method : POST QueryParam : apiKey=<apiKey>&signature=<signature>&version=<version>×tamp=<UTC_FORMATED_TIME_STAMP> Accept : application/json Content-Type : application/json
Coming Soon...
$preferenceFilePath = "Local file path"; $api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); $recommenderService = $api->buildRecommenderService(); $recommender = $recommenderService-> loadPreferenceFile($preferenceFilePath); $jsonResponse = $recommender->toString();
long userId = 1; int howMany = 1; App42Callback requestCallback = this; /* This function used the App42Callback interface */ ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); RecommenderService recommenderService = api.BuildRecommenderService(); recommenderService.ItemBased(preferenceFileName, userId, howMany,requestCallback); OnSuccess(Object obj) { Recommender recommender = (Recommender) obj; String jsonResponse = recommender.ToString(); } public class CallBack : App42Callback { public override void OnSuccess(Object obj) { Recommender recommender = (Recommender) obj; //Do whatever you want with the object } public override void OnException(App42Exception e) { //Do whatever you want with the exception } }
long userId = 1; int howMany = 1; ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); RecommenderService recommenderService = api.buildRecommenderService(); Recommender recommender = recommenderService.itemBased(userId, howMany); String jsonResponse = recommender.toString();
long userId = 1; int howMany = 1; ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); RecommenderService recommenderService = api.buildRecommenderService(); Recommender recommender = recommenderService.itemBased(userId, howMany); String jsonResponse = recommender.toString();
long userId = 1; int howMany = 1; ServiceAPI *serviceAPIObj = [[ServiceAPI alloc]init]; serviceAPIObj.apiKey = @"<API_KEY>"; serviceAPIObj.secretKey = @"<SECRET_KEY>"; RecommenderService *recommenderService = [serviceAPIObj buildRecommenderService]; Recommender *recommender = [recommenderService itemBased:preferenceFileName userId:userId howMany:howMany]; NSString *jsonResponse = [recommender toString];
long userId = 1; int howMany = 1; ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); RecommenderService recommenderService = api.buildRecommenderService(); Recommender recommender = recommenderService.itemBased(userId, howMany); String jsonResponse = recommender.toString();
Int64 userId = 1; int howMany = 1; ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); RecommenderService recommenderService = api.BuildRecommenderService(); Recommender recommender = recommenderService.ItemBased(userId, howMany); String jsonResponse = recommender.ToString();
userId = 1; howMany = 1; api = App42::ServiceAPI.new("<API_KEY>","<SECRET_KEY>"); recommenderService = api.buildRecommenderService(); recommender = recommenderService.item_based(userId, howMany); jsonResponse = recommender.to_s();
The request format for itemBased is URL : https://api.shephertz.com/cloud/1.0/recommend/itemBased/{userId}/{howMany} Method : GET QueryParam : apiKey=<apiKey>&signature=<signature>&version=<version>×tamp=<UTC_FORMATED_TIME_STAMP> Accept : application/json Content-Type : application/json
Coming Soon...
$userId = 1; $howMany = 1; $api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); $recommenderService = $api->buildRecommenderService(); $recommender = $recommenderService->itemBased($userId, $howMany); $jsonResponse = $recommender->toString();
double threshold = 1; int howMany = 3; App42Callback requestCallback = this; /* This function used the App42Callback interface */ ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); RecommenderService recommenderService = api.BuildRecommenderService(); recommenderService.UserBasedThresholdForAll(threshold, howMany,requestCallback); OnSuccess(Objcet obj) { Recommender recommender = (Recommender) obj; App42Response response = (App42Response) recommender; String jsonResponse = response.ToString(); } public class CallBack : App42Callback { public override void OnSuccess(Object obj) { Recommender recommender = (Recommender) obj; //Do whatever you want with the object } public override void OnException(App42Exception e) { //Do whatever you want with the exception } }
double threshold = 1; int howMany = 3; ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); RecommenderService recommenderService = api.buildRecommenderService(); Recommender recommender = recommenderService.userBasedThresholdForAll(threshold, howMany); String jsonResponse = recommender.toString();
double threshold = 1; int howMany = 3; ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); RecommenderService recommenderService = api.buildRecommenderService(); Recommender recommender = recommenderService.userBasedThresholdForAll(threshold, howMany); String jsonResponse = recommender.toString();
double threshold = 1; int howMany = 3; ServiceAPI *serviceAPIObj = [[ServiceAPI alloc]init]; serviceAPIObj.apiKey = @"<API_KEY>"; serviceAPIObj.secretKey = @"<SECRET_KEY>"; RecommenderService *recommenderService = [serviceAPIObj buildRecommenderService]; Recommender *recommender = [recommenderService userBasedThresholdForAll:threshold howMany:howMany]; NSString *jsonResponse = [recommender toString];
double threshold = 1; int howMany = 3; ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); RecommenderService recommenderService = api.buildRecommenderService(); Recommender recommender = recommenderService.userBasedThresholdForAll(threshold, howMany); String jsonResponse = recommender.toString();
Double threshold = 1; int howMany = 3; ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); RecommenderService recommenderService = api.BuildRecommenderService(); Recommender recommender = recommenderService.UserBasedThresholdForAll(threshold, howMany); String jsonResponse = recommender.ToString();
threshold = 1; howMany = 3; api = App42::ServiceAPI.new("<API_KEY>","<SECRET_KEY>"); recommenderService = api.buildRecommenderService(); recommender = recommenderService.user_based_threshold_for_all(threshold, howMany); jsonResponse = recommender.to_s();
The request format for userBasedThresholdForAll is URL : https://api.shephertz.com/cloud/1.0/recommend/userBasedThreshold/all/{threshold}/{howMany} Method : GET QueryParam : apiKey=<apiKey>&signature=<signature>&version=<version>×tamp=<UTC_FORMATED_TIME_STAMP> Accept : application/json Content-Type : application/json
Coming Soon...
$threshold = 1; $howMany = 3; $api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); $recommenderService = $api->buildRecommenderService(); $recommender = $recommenderService->userBasedThresholdForAll($threshold, $howMany); $jsonResponse = $recommender->toString();