- Add subclassing

This commit is contained in:
giuseppenuc committed 2016-01-15 17:45:16 +01:00
1 parent e2e17186ac
commit 75966e2a94
6 files changed
+6 -34

No files matched your search

-26
View File
@@ -22,32 +22,6 @@
@implementation PNObject
+ (void) get {
AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
manager.securityPolicy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModeCertificate];
manager.securityPolicy.allowInvalidCertificates = YES;
[manager GET:[[[PNObjectConfig sharedInstance] PNObjEndpoint] stringByAppendingFormat:@"%@",@"User"] parameters:nil progress:nil success:^(NSURLSessionTask *task, id responseObject) {
NSLog(@"JSON: %@", responseObject);
NSLog(@"JSON: %@", [responseObject class]);
PNUser *user = [[PNUser alloc] initWithJSON:responseObject];
NSLog(@"%@",user);
} failure:^(NSURLSessionTask *operation, NSError *error) {
NSLog(@"Error: %@", error);
}];
}
- (instancetype) init {
self = [super init];