commit | author | age
|
655e66
|
1 |
/* |
H |
2 |
* Copyright (C) 2017 Twitter, Inc. |
|
3 |
* |
|
4 |
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
5 |
* you may not use this file except in compliance with the License. |
|
6 |
* You may obtain a copy of the License at |
|
7 |
* |
|
8 |
* http://www.apache.org/licenses/LICENSE-2.0 |
|
9 |
* |
|
10 |
* Unless required by applicable law or agreed to in writing, software |
|
11 |
* distributed under the License is distributed on an "AS IS" BASIS, |
|
12 |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
13 |
* See the License for the specific language governing permissions and |
|
14 |
* limitations under the License. |
|
15 |
* |
|
16 |
*/ |
|
17 |
|
a0a843
|
18 |
#import <Foundation/Foundation.h> |
H |
19 |
#import "TWTRScribeSerializable.h" |
|
20 |
|
|
21 |
NS_ASSUME_NONNULL_BEGIN |
|
22 |
|
|
23 |
/** |
|
24 |
* Mapping to `MediaType` in scribing. |
|
25 |
*/ |
|
26 |
typedef NS_ENUM(NSUInteger, TWTRScribeMediaType) { |
|
27 |
/** |
|
28 |
* Consumer video uploaded to Twitter. |
|
29 |
*/ |
|
30 |
TWTRScribeMediaTypeConsumerVideo = 1, |
|
31 |
/** |
|
32 |
* Amplify videos. |
|
33 |
*/ |
|
34 |
TWTRScribeMediaTypeProfessionalVideo = 2, |
|
35 |
/** |
|
36 |
* Gif as a video. |
|
37 |
*/ |
|
38 |
TWTRScribeMediaTypeGIF = 3, |
|
39 |
/** |
|
40 |
* Vine as a video. |
|
41 |
*/ |
|
42 |
TWTRScribeMediaTypeVine = 4 |
|
43 |
}; |
|
44 |
|
|
45 |
@interface TWTRScribeMediaDetails : NSObject <TWTRScribeSerializable> |
|
46 |
|
|
47 |
@property (nonatomic, readonly, copy) NSString *publisherID; |
|
48 |
@property (nonatomic, readonly, copy) NSString *contentID; |
|
49 |
@property (nonatomic, readonly) TWTRScribeMediaType mediaType; |
|
50 |
|
|
51 |
- (instancetype)init NS_UNAVAILABLE; |
|
52 |
/** |
|
53 |
* Initializes a new media detail scribe item. |
|
54 |
* |
|
55 |
* @param publisherID Owner (publisher) of the content. This is often the Twitter user. |
|
56 |
* @param contentID UUID to the content. This is often the entity ID. |
|
57 |
* @param mediaType Type of media included. |
|
58 |
* |
|
59 |
* @return A new media detail scribe item. |
|
60 |
*/ |
|
61 |
- (instancetype)initWithPublisherID:(NSString *)publisherID contentID:(NSString *)contentID mediaType:(TWTRScribeMediaType)mediaType; |
|
62 |
|
|
63 |
@end |
|
64 |
|
|
65 |
NS_ASSUME_NONNULL_END |