This repository has been archived by the owner on Aug 29, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
/
ORSTwitterEngine.h
95 lines (81 loc) · 2.92 KB
/
ORSTwitterEngine.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
//
// ORSTwitterEngine.h
// Twitter Engine
//
// Created by Nicholas Toumpelis on 12/04/2009.
// Copyright 2009 Ocean Road Software. All rights reserved.
//
// Version 0.7
#import <Cocoa/Cocoa.h>
#import "ORSSession.h"
#define DEVICE_NONE @"none"
#define DEVICE_IM @"im"
#define DEVICE_SMS @"sms"
@interface ORSTwitterEngine : NSObject {
@private
ORSSession *session;
NSMutableData *dataReceived;
BOOL synchronously;
NSURLConnection *mainConnection;
NSMutableArray *sessionQueue;
}
+ (ORSTwitterEngine *) sharedTwitterEngine;
+ (id) allocWithZone:(NSZone *)zone;
- (id) initSynchronously:(BOOL)synchr
withUserID:(NSString *)userID
andPassword:(NSString *)password;
- (NSString *) sessionUserID;
- (void) setSessionUserID:(NSString *)theSessionUserID;
- (NSString *) sessionPassword;
- (void) setSessionPassword:(NSString *)theSessionPassword;
- (NSData *) executeRequestOfType:(NSString *)type
atPath:(NSString *)path
synchronously:(BOOL)synchr;
- (NSData *) executeUnencodedRequestOfType:(NSString *)type
atPath:(NSString *)path
synchronously:(BOOL)synchr;
- (void) simpleExecuteRequestOfType:(NSString *)type
atPath:(NSString *)path
synchronously:(BOOL)synchr;
- (NSXMLDocument *) getXMLDocumentFromData:(NSData *)data;
- (NSXMLNode *) getNodeFromData:(NSData *)userData;
- (NSArray *) getAllStatusesFromData:(NSData *)statuses;
- (NSArray *) getAllUsersFromData:(NSData *)users;
- (NSArray *) getAllDMsFromData:(NSData *)directMessages;
// Status methods
- (NSArray *) getPublicTimeline;
- (NSArray *) getPublicTimelineSinceStatus:(NSString *)statusID;
- (NSArray *) getFriendsTimeline;
- (NSArray *) getFriendsTimelineSinceStatus:(NSString *)statusID;
- (NSArray *) getUserTimeline;
- (NSArray *) getUserTimelineForUser:(NSString *)userID;
- (NSArray *) getUserTimelineSinceStatus:(NSString *)statusID;
- (NSXMLNode *) sendUpdate:(NSString *)text inReplyTo:(NSString *)statusID;
- (NSArray *) getReplies;
- (NSArray *) getRepliesSinceStatus:(NSString *)statusID;
// Direct Message methods
- (NSArray *) getReceivedDMs;
- (NSArray *) getReceivedDMsSinceDM:(NSString *)dmID;
- (NSArray *) getSentDMs;
- (NSArray *) getSentDMsSinceDM:(NSString *)dmID;
// Friendship methods
- (BOOL) createFriendshipWithUser:(NSString *)userID;
- (BOOL) destroyFriendshipWithUser:(NSString *)userID;
- (BOOL) user:(NSString *)userIDA isFriendWithUser:(NSString *)userIDB;
// Account methods
- (BOOL) verifyCredentials;
- (BOOL) endSession;
// Favorite methods
- (NSArray *) getFavorites;
- (NSArray *) getFavoritesSinceStatus:(NSString *)statusID;
// Notification methods
- (BOOL) followUser:(NSString *)userID;
- (BOOL) leaveUser:(NSString *)userID;
// Block methods
- (BOOL) blockUser:(NSString *)userID;
- (BOOL) unblockUser:(NSString *)userID;
@property (copy) NSMutableData *dataReceived;
@property BOOL synchronously;
@property (copy) NSURLConnection *mainConnection;
@property (retain) ORSSession *session;
@end