- Add PNObject connections

This commit is contained in:
giuseppenuc committed 2016-01-18 16:50:35 +01:00
1 parent 0de3997a2a
commit f569c8545c
8 files changed
+133 -24

No files matched your search

+1 -20
View File
@@ -13,6 +13,7 @@
#import "PNObject/PNUser.h"
#import "PNObjectConstants.h"
#define PNOBJECT_DIR @"PNObjects"
@@ -30,26 +31,6 @@
@implementation PNObject
+ (void) get {
[[[PNObjectConfig sharedInstance] manager] GET:[[[PNObjectConfig sharedInstance] PNObjEndpoint] stringByAppendingFormat:@"%@",@"User"] parameters:nil progress:nil success:^(NSURLSessionTask *task, id responseObject) {
NSLogDebug(@"JSON: %@", responseObject);
NSLogDebug(@"JSON: %@", [responseObject class]);
PNUser *user = [[PNUser alloc] initWithJSON:responseObject];
NSLogDebug(@"%@",user);
} failure:^(NSURLSessionTask *operation, NSError *error) {
NSLogDebug(@"Error: %@", error);
}];
}
- (instancetype) init {
self = [super init];