300+ App42 Cloud APIs – Backend as a Service (BaaS, MBaaS)
Posted on Sep 13, 2012 by Siddhartha
String msg = "Debug logs"; String module = "testmod"; App42Callback requestCallback = this; /* This function used the App42Callback interface */ ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); LogService logService = api.BuildLogService(); logService.Debug(msg,module,requestCallback); OnSuccess(Object obj) { Log log = (Log) obj; String jsonResponse = log.ToString(); } public class CallBack : App42Callback { public override void OnSuccess(Object obj) { Log log = (Log) obj; //Do whatever you want with the object } public override void OnException(App42Exception e) { //Do whatever you want with the exception } }
String msg = "Debug logs"; String module = "testmod"; ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); LogService logService = api.buildLogService(); Log log = logService.debug(msg,module); String jsonResponse = log.toString();
String msg = "Debug logs"; String module = "testmod"; ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); LogService logService = api.buildLogService(); Log log = logService.debug(msg,module); String jsonResponse = log.toString();
NSString *msg = @"Debug logs"; NSString *module = @"testmod"; ServiceAPI *serviceAPIObj = [[ServiceAPI alloc]init]; serviceAPIObj.apiKey = @"<API_KEY>"; serviceAPIObj.secretKey = @"<SECRET_KEY>"; LogService *logService = [serviceAPIObj buildLogService]; Log *log = [logService debug:message module:module]; NSString *jsonResponse = [log toString];
String msg = "Debug logs"; String module = "testmod"; ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); LogService logService = api.buildLogService(); Log log = logService.debug(msg,module); String jsonResponse = log.toString();
String msg = "Debug logs"; String module = "testmod"; ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); LogService logService = api.BuildLogService(); Log log = logService.Debug(message,module); String jsonResponse = log.ToString();
msg = "Debug logs"; appModule = "testmod"; api = App42::ServiceAPI.new("<API_KEY>","<SECRET_KEY>"); logService = api.buildLogService(); log = logService.debug(msg, appModule); jsonResponse = log.to_s();
The request format for debug is URL : https://api.shephertz.com/cloud/1.0/log/{level} Method : POST QueryParam : apiKey=<apiKey>&signature=<signature>&version=<version>×tamp=<UTC_FORMATED_TIME_STAMP> Accept : application/json Content-Type : application/json Body: {"app42": {"log": {"message": "Debug logs","appModule": "testmod"}}}
Coming Soon...
$msg = "Debug logs"; $module = "testmod"; $api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); $logService = $api->buildLogService(); $log = $logService->debug($msg, $module); $jsonResponse = $log->toString();
App42Callback requestCallback = this; /* This function used the App42Callback interface */ ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); LogService logService = api.BuildLogService(); logService.FetchLogsByDebug(requestCallback); OnSuccess(Objcet obj) { Log log = (Log) obj; String jsonResponse = log.ToString(); } public class CallBack : App42Callback { public override void OnSuccess(Object obj) { Log log = (Log) obj; //Do whatever you want with the object } public override void OnException(App42Exception e) { //Do whatever you want with the exception } }
ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); LogService logService = api.buildLogService(); Log log = logService.fetchLogsByDebug(); String jsonResponse = log.toString();
ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); LogService logService = api.buildLogService(); Log log = logService.fetchLogsByDebug(); String jsonResponse = log.toString();
ServiceAPI *serviceAPIObj = [[ServiceAPI alloc]init]; serviceAPIObj.apiKey = @"<API_KEY>"; serviceAPIObj.secretKey = @"<SECRET_KEY>"; LogService *logService = [serviceAPIObj buildLogService]; Log *log = [logService fetchLogsByDebug]; NSString *jsonResponse = [log toString];
ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); LogService logService = api.buildLogService(); Log log = logService.fetchLogsByDebug(); String jsonResponse = log.toString();
ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); LogService logService = api.BuildLogService(); Log log = logService.FetchLogsByDebug(); String jsonResponse = log.ToString();
api = App42::ServiceAPI.new("<API_KEY>","<SECRET_KEY>"); logService = api.buildLogService(); log = logService.fetch_logs_by_debug(); jsonResponse = log.to_s();
The request format for fetchLogsByDebug is URL : https://api.shephertz.com/cloud/1.0/log/type/{level} Method : GET QueryParam : apiKey=<apiKey>&signature=<signature>&version=<version>×tamp=<UTC_FORMATED_TIME_STAMP> Accept : application/json Content-Type : application/json
Coming Soon...
$api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); $logService = $api->buildLogService(); $log = $logService->fetchLogsByDebug(); $jsonResponse = $log->toString();