From 3c680cfe8c1e6cfbce16f787fbf01fdb3f7c40ae Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Mon, 4 Dec 2017 00:20:02 +0300 Subject: WIP --- Juick/APIClient.m | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'Juick/APIClient.m') diff --git a/Juick/APIClient.m b/Juick/APIClient.m index beace7c..ca894d4 100644 --- a/Juick/APIClient.m +++ b/Juick/APIClient.m @@ -52,6 +52,21 @@ }); } +-(void) postReplyToThread:(NSNumber *)mid inReplyTo:(NSNumber *)rid text:(NSString *)text { + AFHTTPSessionManager *manager = [APIClient sharedClient].manager; + NSOperationQueue *operationQueue = [NSOperationQueue new]; + [operationQueue addOperationWithBlock:^{ + [manager POST:@"/post" parameters: + @{ + @"mid": mid, + @"rid": rid, + @"body": text + } progress:nil success:nil failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) { + NSLog(@"Errrorrr: %@", [error localizedDescription]); + }]; + }]; +} + +(NSString *) messagesUrl { return @"/messages"; -- cgit v1.2.3