summaryrefslogtreecommitdiff
path: root/Juick/APIClient.m
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2016-08-22 00:44:28 +0300
committerGravatar Vitaly Takmazov2016-08-22 00:44:28 +0300
commita74588083c4950e9237dff7a84ccdd129b72c950 (patch)
treee2ac66b8b3028fe09d6046a1ae4c80bcf2f85e14 /Juick/APIClient.m
parent392e98ba3c4b3e4a01bf475794d23c26e20d654a (diff)
RestKit -> YYModel
Diffstat (limited to 'Juick/APIClient.m')
-rw-r--r--Juick/APIClient.m28
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