From a74588083c4950e9237dff7a84ccdd129b72c950 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Mon, 22 Aug 2016 00:44:28 +0300 Subject: RestKit -> YYModel --- Juick/APIClient.m | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Juick/APIClient.m (limited to 'Juick/APIClient.m') 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 -- cgit v1.2.3