diff options
author | Vitaly Takmazov | 2016-08-22 00:44:28 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2016-08-22 00:44:28 +0300 |
commit | a74588083c4950e9237dff7a84ccdd129b72c950 (patch) | |
tree | e2ac66b8b3028fe09d6046a1ae4c80bcf2f85e14 /Juick/APIClient.m | |
parent | 392e98ba3c4b3e4a01bf475794d23c26e20d654a (diff) |
RestKit -> YYModel
Diffstat (limited to 'Juick/APIClient.m')
-rw-r--r-- | Juick/APIClient.m | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Juick/APIClient.m b/Juick/APIClient.m new file mode 100644 index 0000000..1fc2743 --- /dev/null +++ b/Juick/APIClient.m @@ -0,0 +1,28 @@ +// +// APIClient.m +// Juick +// +// Created by Vitaly Takmazov on 22/08/16. +// Copyright © 2016 com.juick. All rights reserved. +// +#import "APIClient.h" + +@implementation APIClient + ++(APIClient *) sharedClient { + static APIClient *sharedAPIClient = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + sharedAPIClient = [[self alloc] init]; + }); + return sharedAPIClient; +} + +-(id)init { + if (self = [super init]) { + self.manager = [[AFHTTPSessionManager alloc] initWithBaseURL:[NSURL URLWithString:@"https://api.juick.com"]]; + } + return self; +} + +@end |