diff options
author | Vitaly Takmazov | 2017-03-27 02:50:06 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2017-06-28 21:28:48 +0300 |
commit | c5888b864756cc38e94f81850f52687cb7dd2c0c (patch) | |
tree | 1a861b1eb1161d133efdc1a35e68a343c2c03889 /Juick/Model | |
parent | 9fd3a914fee6c22d7d7148ca100df72aa7cfc74e (diff) |
push notifications
Diffstat (limited to 'Juick/Model')
-rw-r--r-- | Juick/Model/Message.m | 1 | ||||
-rw-r--r-- | Juick/Model/TokensList.h | 14 | ||||
-rw-r--r-- | Juick/Model/TokensList.m | 13 |
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 |