summaryrefslogtreecommitdiff
path: root/Juick/APIClient.m
diff options
context:
space:
mode:
Diffstat (limited to 'Juick/APIClient.m')
-rw-r--r--Juick/APIClient.m15
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";