300+ App42 Cloud APIs – Backend as a Service (BaaS, MBaaS)
Posted on Sep 13, 2012 by Siddhartha
String userID = "Nick"; String itemID = "itemID"; String reviewComment = "reviewComment"; double reviewRating = 3; App42Callback requestCallback = this; /* This function used the App42Callback interface */ ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); ReviewService reviewService = api.BuildReviewService(); reviewService.CreateReview(userID,itemID,reviewComment,reviewRating,requestCallback); OnSuccess(Object obj) { Review review = (Review) obj; String jsonResponse = review.ToString(); } public class CallBack : App42Callback { public override void OnSuccess(Object obj) { Review review = (Review) obj; //Do whatever you want with the object } public override void OnException(App42Exception e) { //Do whatever you want with the exception } }
String userID = "Nick"; String itemID = "itemID"; String reviewComment = "reviewComment"; double reviewRating = 3; ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); ReviewService reviewService = api.buildReviewService(); Review review = reviewService.createReview(userID,itemID,reviewComment,reviewRating); String jsonResponse = review.toString();
String userID = "Nick"; String itemID = "itemID"; String reviewComment = "reviewComment"; double reviewRating = 3; ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); ReviewService reviewService = api.buildReviewService(); Review review = reviewService.createReview(userID,itemID,reviewComment,reviewRating); String jsonResponse = review.toString();
NSString *userID = @"Nick"; NSString *itemID = @"itemID"; NSString *reviewComment = @"reviewComment"; double reviewRating = 3; ServiceAPI *serviceAPIObj = [[ServiceAPI alloc]init]; serviceAPIObj.apiKey = @"<API_KEY>"; serviceAPIObj.secretKey = @"<SECRET_KEY>"; ReviewService *reviewService = [serviceAPIObj buildReviewService]; Review *review = [reviewService createReview:userId itemID:itemId reviewComment:reviewComment reviewRating:reviewRating]; NSString *jsonResponse = [review toString];
String userID = "Nick"; String itemID = "itemID"; String reviewComment = "reviewComment"; double reviewRating = 3; ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); ReviewService reviewService = api.buildReviewService(); Review review = reviewService.createReview(userID,itemID,reviewComment,reviewRating); String jsonResponse = review.toString();
String userID = "Nick"; String itemID = "itemID"; String reviewComment = "reviewComment"; Double reviewRating = 3; ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); ReviewService reviewService = api.BuildReviewService(); Review review = reviewService.CreateReview(userID,itemID,reviewComment,reviewRating); String jsonResponse = review.ToString();
userID = "Nick"; itemID = "itemID"; reviewComment = "reviewComment"; reviewRating = 3; api = App42::ServiceAPI.new("<API_KEY>","<SECRET_KEY>"); reviewService = api.buildReviewService(); review = reviewService.create_review(userID,itemID,reviewComment,reviewRating); jsonResponse = review.to_s();
The request format for createReview is URL : https://api.shephertz.com/cloud/1.0/review Method : POST QueryParam : apiKey=<apiKey>&signature=<signature>&version=<version>×tamp=<UTC_FORMATED_TIME_STAMP> Accept : application/json Content-Type : application/json Body : {"app42": {"review": {"userId": "Nick","itemId": "itemID","comment": "reviewComment","rating": 3}}}
Coming Soon...
$userID = "Nick"; $itemID = "itemID"; $reviewComment = "reviewComment"; $reviewRating = 3; $api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); $reviewService = $api->buildReviewService(); $review = $reviewService->createReview($userID,$itemID,$reviewComment,$reviewRating); $jsonResponse = $review->toString();
String itemId = "itemID"; App42Callback requestCallback = this; /* This function used the App42Callback interface */ ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); ReviewService reviewService = api.BuildReviewService(); reviewService.GetHighestReviewByItem(itemId,requestCallback); OnSuccess(Object obj) { Review review = (Review) obj; String jsonResponse = review.ToString(); } public class CallBack : App42Callback { public override void OnSuccess(Object obj) { Review review = (Review) obj; //Do whatever you want with the object } public override void OnException(App42Exception e) { //Do whatever you want with the exception } }
String itemId = "itemID"; ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); ReviewService reviewService = api.buildReviewService(); Review review = reviewService.getHighestReviewByItem(itemId); String jsonResponse = review.toString();
String itemId = "itemID"; ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); ReviewService reviewService = api.buildReviewService(); Review review = reviewService.getHighestReviewByItem(itemId); String jsonResponse = review.toString();
NSString *itemId = @"itemID"; ServiceAPI *serviceAPIObj = [[ServiceAPI alloc]init]; serviceAPIObj.apiKey = @"<API_KEY>"; serviceAPIObj.secretKey = @"<SECRET_KEY>"; ReviewService *reviewService = [serviceAPIObj buildReviewService]; Review *review = [reviewService getHighestReviewByItem:itemId]; NSString *jsonResponse = [review toString];
String itemId = "itemID"; ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); ReviewService reviewService = api.buildReviewService(); Review review = reviewService.getHighestReviewByItem(itemId); String jsonResponse = review.toString();
String itemId = "itemID"; ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); ReviewService reviewService = api.buildReviewService(); Review review = reviewService.GetHighestReviewByItem(itemId); String jsonResponse = review.ToString();
itemId = "itemID"; api = App42::ServiceAPI.new("<API_KEY>","<SECRET_KEY>"); reviewService = api.buildReviewService(); review = reviewService.get_highest_review_by_item(itemId); jsonResponse = review.to_s();
The request format for getHighestReviewByItem is URL : https://api.shephertz.com/cloud/1.0/review/{itemId}/highest Method : GET QueryParam : apiKey=<apiKey>&signature=<signature>&version=<version>×tamp=<UTC_FORMATED_TIME_STAMP> Accept : application/json Content-Type : application/json
Coming Soon...
$itemId = "itemID"; $api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); $reviewService = $api->buildReviewService(); $review = $reviewService->getHighestReviewByItem($itemId); $jsonResponse = $review->toString();