Objective-C
Objective-C
Download Full Intake Form in JSON Format
See more IntakeQ Examples
The full intake form is very similar to intake summary object, except it adds an array of questions.Chilkat Objective-C Downloads
#import <CkoHttp.h>
#import <CkoStringBuilder.h>
#import <CkoJsonObject.h>
BOOL success = NO;
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
CkoHttp *http = [[CkoHttp alloc] init];
// To log the exact HTTP request/response to a session log file:
http.SessionLogFilename = @"/someDir/sessionLog.txt";
[http SetRequestHeader: @"X-Auth-Key" value: @"xxxxxxxxxxxxxxxxxxxxxxxxx"];
CkoStringBuilder *sbJson = [[CkoStringBuilder alloc] init];
success = [http QuickGetSb: @"https://intakeq.com/api/v1/intakes/[intake-id]" sbContent: sbJson];
if (success == NO) {
NSLog(@"%@",http.LastErrorText);
return;
}
if ([http.LastStatus intValue] != 200) {
NSLog(@"%@%d",@"status code: ",[http.LastStatus intValue]);
NSLog(@"%@%@",@"response: ",[sbJson GetAsString]);
return;
}
NSLog(@"%@",@"raw response: ");
NSLog(@"%@",[sbJson GetAsString]);
CkoJsonObject *json = [[CkoJsonObject alloc] init];
[json LoadSb: sbJson];
json.EmitCompact = YES;
NSLog(@"%@",[json Emit]);