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}}}
$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();