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 |
*/ |
a0a843
|
17 |
|
H |
18 |
#import <Foundation/Foundation.h> |
|
19 |
#import "TWTRTimelineDataSource.h" |
|
20 |
|
|
21 |
@class TWTRAPIClient; |
|
22 |
@class TWTRTimelineFilter; |
|
23 |
|
|
24 |
NS_ASSUME_NONNULL_BEGIN |
|
25 |
|
|
26 |
@interface TWTRCollectionTimelineDataSource : NSObject <TWTRTimelineDataSource> |
|
27 |
|
|
28 |
/** |
|
29 |
* The number of Tweets to request in each query to the Twitter Timeline API when fetching the next batch of Tweets. |
|
30 |
*/ |
|
31 |
@property (nonatomic, readonly) NSInteger maxTweetsPerRequest; |
|
32 |
|
|
33 |
/** |
|
34 |
* ID of the collection. |
|
35 |
*/ |
|
36 |
@property (nonatomic, copy, readonly) NSString *collectionID; |
|
37 |
|
|
38 |
/* |
|
39 |
* A filtering object that hides certain tweets. |
|
40 |
*/ |
|
41 |
@property (nonatomic, copy, nullable) TWTRTimelineFilter *timelineFilter; |
|
42 |
|
|
43 |
/** |
|
44 |
* Convenience initializer. |
|
45 |
* |
|
46 |
* @param collectionID (required) The ID of this collection. For example, the ID of this collection: https://twitter.com/TwitterMusic/timelines/393773266801659904 is @"393773266801659904" |
|
47 |
* |
|
48 |
* @return An instance of TWTRCollectionTimelineDataSource or nil if any of the required parameters is missing. |
|
49 |
*/ |
|
50 |
- (instancetype)initWithCollectionID:(NSString *)collectionID APIClient:(TWTRAPIClient *)client; |
|
51 |
|
|
52 |
/** |
|
53 |
* Designated initializer setting all supported values for Collection Timeline Data Source. |
|
54 |
* |
|
55 |
* @param collectionID (required) The Collection ID value. e.g. @"393773266801659904" |
|
56 |
* @param client (required) The API client to use for all network requests. |
|
57 |
* @param maxTweetsPerRequest (optional) Number of Tweets to request per batch. A value of 0 uses the server default. |
|
58 |
* |
|
59 |
* @return An instance of TWTRCollectionTimelineDataSource or nil if any of the required parameters are missing. |
|
60 |
*/ |
|
61 |
- (instancetype)initWithCollectionID:(NSString *)collectionID APIClient:(TWTRAPIClient *)client maxTweetsPerRequest:(NSUInteger)maxTweetsPerRequest NS_DESIGNATED_INITIALIZER; |
|
62 |
|
|
63 |
- (instancetype)init NS_UNAVAILABLE; |
|
64 |
|
|
65 |
@end |
|
66 |
|
|
67 |
NS_ASSUME_NONNULL_END |