summaryrefslogtreecommitdiff
path: root/Juick/Model
diff options
context:
space:
mode:
Diffstat (limited to 'Juick/Model')
-rw-r--r--Juick/Model/Entity.h19
-rw-r--r--Juick/Model/Entity.m13
-rw-r--r--Juick/Model/Message.h2
-rw-r--r--Juick/Model/Message.m1
4 files changed, 35 insertions, 0 deletions
diff --git a/Juick/Model/Entity.h b/Juick/Model/Entity.h
new file mode 100644
index 0000000..13142f1
--- /dev/null
+++ b/Juick/Model/Entity.h
@@ -0,0 +1,19 @@
+//
+// Entity.h
+// Juick
+//
+// Created by Vitaly Takmazov on 12/11/2018.
+// Copyright © 2018 com.juick. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+@interface Entity : NSObject
+
+@property NSString *type;
+@property NSString *text;
+@property NSString *link;
+@property NSNumber *start;
+@property NSNumber *end;
+
+@end
diff --git a/Juick/Model/Entity.m b/Juick/Model/Entity.m
new file mode 100644
index 0000000..ac53a1f
--- /dev/null
+++ b/Juick/Model/Entity.m
@@ -0,0 +1,13 @@
+//
+// Entity.m
+// Juick
+//
+// Created by Vitaly Takmazov on 12/11/2018.
+// Copyright © 2018 com.juick. All rights reserved.
+//
+
+#import "Entity.h"
+
+@implementation Entity
+
+@end
diff --git a/Juick/Model/Message.h b/Juick/Model/Message.h
index 5eab279..45b14fa 100644
--- a/Juick/Model/Message.h
+++ b/Juick/Model/Message.h
@@ -9,6 +9,7 @@
#import <Foundation/Foundation.h>
#import "User.h"
#import "Attachment.h"
+#import "Entity.h"
@interface Message : NSObject
@@ -17,6 +18,7 @@
@property User *user;
@property NSString *text;
@property NSArray<NSString *> *tags;
+@property NSArray<Entity *> *entities;
@property NSString *timestamp;
@property NSString *attach;
@property NSString *repliesBy;
diff --git a/Juick/Model/Message.m b/Juick/Model/Message.m
index d4d6a88..2a4090a 100644
--- a/Juick/Model/Message.m
+++ b/Juick/Model/Message.m
@@ -15,6 +15,7 @@
return @{@"text" : @"body",
@"mid" : @"mid",
@"rid" : @"rid",
+ @"entities": @"entities",
@"attach" : @"photo.small",
@"repliesCount": @"replies",
@"repliesBy": @"repliesby"};