Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

40 lines (31 sloc) 1.014 kB
//
// Created by pete on 5/20/12.
//
// To change the template use AppCode | Preferences | File Templates.
//
#import "FranklyProtocolHelper.h"
#import "JSON.h"
@implementation FranklyProtocolHelper {
}
+ (NSString *)generateErrorResponseWithReason:(NSString *)reason andDetails:(NSString *)details{
NSDictionary *response = [NSDictionary dictionaryWithObjectsAndKeys:
@"ERROR", @"outcome",
reason, @"reason",
details, @"details",
nil];
return [response JSONRepresentation];
}
+ (NSString *)generateSuccessResponseWithoutResults{
NSDictionary *response = [NSDictionary dictionaryWithObjectsAndKeys:
@"SUCCESS", @"outcome",
nil];
return [response JSONRepresentation];
}
+ (NSString *)generateSuccessResponseWithResults:(NSArray *)results{
NSDictionary *response = [NSDictionary dictionaryWithObjectsAndKeys:
@"SUCCESS", @"outcome",
results, @"results",
nil];
return [response JSONRepresentation];
}
@end
Jump to Line
Something went wrong with that request. Please try again.