forked from coding/Coding-iOS
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTweet.h
More file actions
92 lines (72 loc) · 2.85 KB
/
Tweet.h
File metadata and controls
92 lines (72 loc) · 2.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
//
// Tweet.h
// Coding_iOS
//
// Created by Ease on 15/3/9.
// Copyright (c) 2015年 Coding. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "Comment.h"
#import "User.h"
#import "HtmlMedia.h"
#import "TweetSendLocation.h"
@class TweetImage;
@interface Tweet : NSObject
@property (readwrite, nonatomic, strong) NSString *content, *device, *location, *coord, *address;
@property (readwrite, nonatomic, strong) NSNumber *liked, *activity_id, *id, *comments, *likes;
@property (readwrite, nonatomic, strong) NSDate *created_at;
@property (readwrite, nonatomic, strong) User *owner;
@property (readwrite, nonatomic, strong) NSMutableArray *comment_list, *like_users;
@property (readwrite, nonatomic, strong) NSDictionary *propertyArrayMap;
@property (assign, nonatomic) BOOL canLoadMore, willLoadMore, isLoading;
@property (readwrite, nonatomic, strong) HtmlMedia *htmlMedia;
@property (nonatomic,strong) TweetSendLocationResponse *locationData;
@property (readonly, nonatomic, strong) NSMutableArray *tweetImages;
@property (readwrite, nonatomic, strong) NSMutableArray *selectedAssetURLs;
@property (readwrite, nonatomic, strong) NSString *tweetContent;
@property (readwrite, nonatomic, strong) NSString *nextCommentStr;
@property (assign, nonatomic) CGFloat contentHeight;
@property (strong, nonatomic) NSString *user_global_key, *pp_id;
- (void)addASelectedAssetURL:(NSURL *)assetURL;
- (void)deleteASelectedAssetURL:(NSURL *)assetURL;
- (void)deleteATweetImage:(TweetImage *)tweetImage;
- (NSInteger)numOfComments;
- (BOOL)hasMoreComments;
- (NSInteger)numOfLikers;
- (BOOL)hasMoreLikers;
- (NSString *)toDoLikePath;
- (void)changeToLiked:(NSNumber *)liked;
- (NSString *)toDoCommentPath;
- (NSDictionary *)toDoCommentParams;
- (NSString *)toLikersPath;
- (NSDictionary *)toLikersParams;
- (NSString *)toCommentsPath;
- (NSDictionary *)toCommentsParams;
- (NSString *)toDeletePath;
- (NSString *)toDetailPath;
+(Tweet *)tweetForSend;
- (void)saveSendData;
- (void)loadSendData;
+ (void)deleteSendData;
+(Tweet *)tweetWithGlobalKey:(NSString *)user_global_key andPPID:(NSString *)pp_id;
- (NSDictionary *)toDoTweetParams;
- (BOOL)isAllImagesHaveDone;
- (void)addNewComment:(Comment *)comment;
- (void)deleteComment:(Comment *)comment;
- (NSString *)toShareLinkStr;
@end
typedef NS_ENUM(NSInteger, TweetImageUploadState)
{
TweetImageUploadStateInit = 0,
TweetImageUploadStateIng,
TweetImageUploadStateSuccess,
TweetImageUploadStateFail
};
@interface TweetImage : NSObject
@property (readwrite, nonatomic, strong) UIImage *image, *thumbnailImage;
@property (strong, nonatomic) NSURL *assetURL;
@property (assign, nonatomic) TweetImageUploadState uploadState;
@property (readwrite, nonatomic, strong) NSString *imageStr;
+ (instancetype)tweetImageWithAssetURL:(NSURL *)assetURL;
+ (instancetype)tweetImageWithAssetURL:(NSURL *)assetURL andImage:(UIImage *)image;
@end