summaryrefslogtreecommitdiff
path: root/Juick/Model/Entity.m
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-12-02 23:23:31 +0300
committerGravatar Vitaly Takmazov2018-12-02 23:23:31 +0300
commita293a8e049fea49b8c2b8262fb92a29f73d66989 (patch)
tree2201a139fc19fcac59714e915f08b0aa7e816517 /Juick/Model/Entity.m
parent3bc3a38be7ccaf9622bdc86ffac37827af36f0f1 (diff)
Drop YYModel
Diffstat (limited to 'Juick/Model/Entity.m')
-rw-r--r--Juick/Model/Entity.m10
1 files changed, 10 insertions, 0 deletions
diff --git a/Juick/Model/Entity.m b/Juick/Model/Entity.m
index ac53a1f..cf23a2a 100644
--- a/Juick/Model/Entity.m
+++ b/Juick/Model/Entity.m
@@ -10,4 +10,14 @@
@implementation Entity
++(Entity *) fromJSON:(NSDictionary *)jsonData {
+ Entity *entity = [Entity new];
+ entity.start = jsonData[@"start"];
+ entity.end = jsonData[@"end"];
+ entity.type = jsonData[@"type"];
+ entity.text = jsonData[@"text"];
+ entity.link = jsonData[@"url"];
+ return entity;
+}
+
@end