-
Notifications
You must be signed in to change notification settings - Fork 0
/
Twitter.framework.h
134 lines (101 loc) · 4.86 KB
/
Twitter.framework.h
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
// ========== Twitter.framework/Headers/TWRequest.h
//
// TWRequest.h
// Twitter
//
// Copyright 2011 Apple Inc. All rights reserved.
//
// This class has been deprecated in iOS 6. Please use SLRequest (in the Social framework) instead.
#import <Foundation/Foundation.h>
#import <Social/SLRequest.h>
@class ACAccount;
enum {
TWRequestMethodGET = SLRequestMethodGET,
TWRequestMethodPOST = SLRequestMethodPOST,
TWRequestMethodDELETE = SLRequestMethodDELETE
};
typedef SLRequestMethod TWRequestMethod; // available in iPhone 5.0
// Completion block for performRequestWithHandler.
typedef SLRequestHandler TWRequestHandler;
NS_DEPRECATED(NA, NA, 5_0, 6_0) __attribute__((visibility("default")))
@interface TWRequest : NSObject
- (id)initWithURL:(NSURL *)url parameters:(NSDictionary *)parameters requestMethod:(TWRequestMethod)requestMethod;
// Optional account information used to authenticate the request. Defaults to nil.
@property (nonatomic, retain) ACAccount *account;
// The request method
@property (nonatomic, readonly) TWRequestMethod requestMethod;
// The request URL
@property (nonatomic, readonly) NSURL *URL;
// The parameters
@property (nonatomic, readonly) NSDictionary *parameters;
// Specify a named MIME multi-part value. As of version 6.0, if you set parameters,
// the parameters will automatically be added as form data in the multi-part data.
- (void)addMultiPartData:(NSData*)data withName:(NSString*)name type:(NSString*)type;
// Returns an OAuth compatible NSURLRequest for use with NSURLConnection.
- (NSURLRequest *)signedURLRequest;
// Issue the request. This block is not guaranteed to be called on any particular thread.
- (void)performRequestWithHandler:(TWRequestHandler)handler;
@end
// ========== Twitter.framework/Headers/TWTweetComposeViewController.h
//
// TWTweetComposeViewController.h
// Twitter
//
// Copyright 2011 Apple Inc. All rights reserved.
//
// This class has been deprecated in iOS 6. Please use SLComposeViewController (in the Social framework) instead.
#import <UIKit/UIKit.h>
#import <Social/SLComposeViewController.h>
enum {
TWTweetComposeViewControllerResultCancelled = SLComposeViewControllerResultCancelled,
TWTweetComposeViewControllerResultDone = SLComposeViewControllerResultDone
};
typedef SLComposeViewControllerResult TWTweetComposeViewControllerResult; // available in iPhone 5.0
// Completion handler for TWTweetComposeViewController
typedef SLComposeViewControllerCompletionHandler TWTweetComposeViewControllerCompletionHandler;
// Although you may perform requests on behalf of the user, you cannot append
// text, images, or URLs without the user's knowledge. Hence, you can set the
// initial text and other content before presenting the view to the user, but
// cannot change the content after the user views it. All of the methods used
// to set the content return a Boolean value. The methods return NO if the
// content doesn't fit or if the view was already presented to the user and the
// content can no longer be changed.
NS_DEPRECATED(NA, NA, 5_0, 6_0) __attribute__((visibility("default")))
@interface TWTweetComposeViewController : UIViewController
// Returns if Twitter is accessible and at least one account has been setup.
+ (BOOL)canSendTweet;
// Sets the initial text to be posted. Returns NO if the sheet has already been
// presented to the user. On iOS 6.x, this returns NO if the specified text
// will not fit within the character space currently available; on iOS 7.0 and
// later, you may supply text with a length greater than the service supports,
// and the sheet will allow the user to edit it accordingly.
- (BOOL)setInitialText:(NSString *)text;
// Adds an image to the tweet. Returns NO if the additional image will not fit
// within the character space currently available, or if the sheet has already
// been presented to the user.
- (BOOL)addImage:(UIImage *)image;
// Removes all images from the tweet. Returns NO and does not perform an operation
// if the sheet has already been presented to the user.
- (BOOL)removeAllImages;
// Adds a URL to the tweet. Returns NO if the additional URL will not fit
// within the character space currently available, or if the sheet has already
// been presented to the user.
- (BOOL)addURL:(NSURL *)url;
// Removes all URLs from the tweet. Returns NO and does not perform an operation
// if the sheet has already been presented to the user.
- (BOOL)removeAllURLs;
// Specify a block to be called when the user is finished. This block is not guaranteed
// to be called on any particular thread. It is cleared after being called.
@property (nonatomic, copy) TWTweetComposeViewControllerCompletionHandler completionHandler;
@end
// ========== Twitter.framework/Headers/Twitter.h
//
// Twitter.h
// Twitter
//
// Copyright 2011 Apple Inc. All rights reserved.
//
#import <Twitter/TWRequest.h>
#if TARGET_OS_IPHONE
#import <Twitter/TWTweetComposeViewController.h>
#endif