-
Notifications
You must be signed in to change notification settings - Fork 4
/
LFWebService.h
45 lines (32 loc) · 1.18 KB
/
LFWebService.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
//
// LFWebService.h
// LastHistory
//
// Created by Frederik Seiffert on 28.11.08.
// Copyright 2008 Frederik Seiffert. All rights reserved.
//
#import <Cocoa/Cocoa.h>
extern NSString *LFWebServiceErrorDomain;
@interface LFWebService : NSObject {
NSString *_apiKey;
NSString *_secret;
NSString *_userName;
NSString *_sessionKey;
NSString *_token; // used during authorization
}
- (id)initWithApiKey:(NSString *)apiKey secret:(NSString *)secret;
- (id)initWithApiKey:(NSString *)apiKey
secret:(NSString *)secret
userName:(NSString *)userName
sessionKey:(NSString *)sessionKey;
@property (readonly, copy) NSString *apiKey;
@property (readonly, copy) NSString *secret;
@property (readonly, copy) NSString *userName;
@property (readonly, copy) NSString *sessionKey;
@property (readonly) BOOL isAuthenticated;
- (NSString *)authenticateGetToken;
- (NSURL *)authenticateGetAuthorizationURL;
- (BOOL)authenticateFinish;
- (NSXMLDocument *)callMethod:(NSString *)methodName withParameters:(NSDictionary *)params error:(NSError **)outError;
- (NSXMLDocument *)callAuthenticatedMethod:(NSString *)methodName withParameters:(NSDictionary *)params error:(NSError **)outError;
@end