Last active
December 20, 2015 03:49
-
-
Save ChrisRisner/6066607 to your computer and use it in GitHub Desktop.
ScriptsStuff
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
| NSString *stringData = [[NSString alloc] initWithData:result encoding:NSUTF8StringEncoding]; |
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
| exports.post = function(request, response) { | |
| // Use "request.service" to access features of your mobile service, e.g.: | |
| // var tables = request.service.tables; | |
| // var push = request.service.push; | |
| response.send(statusCodes.OK, { message : 'Hello World!' }); | |
| }; | |
| exports.get = function(request, response) { | |
| response.send(statusCodes.OK, { message : 'Hello World!' }); | |
| }; |
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
| [self.client invokeAPI:@"MyCustomAPI" data:nil HTTPMethod:@"POST" parameters:nil | |
| headers:nil completion:^(NSData *result, NSHTTPURLResponse *response, NSError *error) { | |
| NSLog(@"Result: %@", result); | |
| NSLog(@"URLResponse: %@", response); | |
| }]; |
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
| [self.client invokeAPI:@"MyCustomAPI" body:nil HTTPMethod:@"GET" parameters:nil | |
| headers:nil completion:^(id result, NSHTTPURLResponse *response, NSError *error) { | |
| NSLog(@"Result: %@", result); | |
| NSLog(@"URLResponse: %@", response); | |
| }]; |
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
| mClient.invokeApi("MyCustomAPI", | |
| new ApiJsonOperationCallback() { | |
| @Override | |
| public void onCompleted(JsonElement jsonData, Exception error, | |
| ServiceFilterResponse response) { | |
| Log.i("JsonData", jsonData.getAsJsonObject().get("message").getAsString()); | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment