diff options
author | Vitaly Takmazov | 2017-12-04 00:20:02 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2017-12-04 00:20:02 +0300 |
commit | 3c680cfe8c1e6cfbce16f787fbf01fdb3f7c40ae (patch) | |
tree | 51c90370eae5c622ab305bc4bd7eb0a34fd96f2a /Juick/APIClient.m | |
parent | ccf06c2af74f63e5276e15f3e10acf74bf4174f7 (diff) |
WIP
Diffstat (limited to 'Juick/APIClient.m')
-rw-r--r-- | Juick/APIClient.m | 15 |
1 files changed, 15 insertions, 0 deletions
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"; |