summaryrefslogtreecommitdiff
path: root/Juick/Model
diff options
context:
space:
mode:
Diffstat (limited to 'Juick/Model')
-rw-r--r--Juick/Model/Message.m1
-rw-r--r--Juick/Model/TokensList.h14
-rw-r--r--Juick/Model/TokensList.m13
3 files changed, 28 insertions, 0 deletions
diff --git a/Juick/Model/Message.m b/Juick/Model/Message.m
index a7934ac..4a6e96c 100644
--- a/Juick/Model/Message.m
+++ b/Juick/Model/Message.m
@@ -25,6 +25,7 @@
+(void) pullNextFromPath:(NSString *)path params:(NSDictionary *) params callback:(void(^)(NSArray *))callback {
AFHTTPSessionManager *manager = [APIClient sharedClient].manager;
if ([[PDKeychainBindings sharedKeychainBindings] stringForKey:@"com.juick.username"] != nil) {
+ manager.requestSerializer = [AFJSONRequestSerializer serializer];
[manager.requestSerializer setAuthorizationHeaderFieldWithUsername:[[PDKeychainBindings sharedKeychainBindings] stringForKey:@"com.juick.username"] password:[[PDKeychainBindings sharedKeychainBindings] stringForKey:@"com.juick.password"]];
}
[manager GET:path parameters:params progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
diff --git a/Juick/Model/TokensList.h b/Juick/Model/TokensList.h
new file mode 100644
index 0000000..9ed5ab0
--- /dev/null
+++ b/Juick/Model/TokensList.h
@@ -0,0 +1,14 @@
+//
+// TokensList.h
+// Juick
+//
+// Created by Vitaly Takmazov on 27/03/2017.
+// Copyright © 2017 com.juick. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+@interface TokensList : NSObject
+@property NSString *type;
+@property NSArray<NSString *> *tokens;
+@end
diff --git a/Juick/Model/TokensList.m b/Juick/Model/TokensList.m
new file mode 100644
index 0000000..5cfe6a6
--- /dev/null
+++ b/Juick/Model/TokensList.m
@@ -0,0 +1,13 @@
+//
+// TokensList.m
+// Juick
+//
+// Created by Vitaly Takmazov on 27/03/2017.
+// Copyright © 2017 com.juick. All rights reserved.
+//
+
+#import "TokensList.h"
+
+@implementation TokensList
+
+@end