Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

41 lines (31 sloc) 0.975 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 TO_JSON(response);
}
+ (NSString *)generateSuccessResponseWithoutResults{
NSDictionary *response = [NSDictionary dictionaryWithObjectsAndKeys:
@"SUCCESS", @"outcome",
nil];
return TO_JSON(response);
}
+ (NSString *)generateSuccessResponseWithResults:(NSArray *)results{
NSDictionary *response = [NSDictionary dictionaryWithObjectsAndKeys:
@"SUCCESS", @"outcome",
results, @"results",
nil];
return TO_JSON(response);
}
@end
Jump to Line
Something went wrong with that request. Please try again.