mootoh / milpon

an iPhone application for Remember the Milk.

This URL has Read+Write access

milpon / api / RTMAPI.h
100644 51 lines (44 sloc) 1.004 kb
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
//
// RTMAPI.h
// Milpon
//
// Created by mootoh on 8/30/08.
// Copyright 2008 deadbeaf.org. All rights reserved.
//
 
#import <Foundation/Foundation.h>
 
/**
* access to RTM Web API.
*/
@interface RTMAPI : NSObject {
   enum {
      TIMELINES_CREATE
   } method_;
 
   NSString *timeline; //!< for parser
}
 
+ (void) setApiKey:(NSString *)key;
+ (void) setSecret:(NSString *)sec;
+ (void) setToken:(NSString *)tok;
 
/**
* call RTM API method with args.
*
* if error happened in HTTP request, returns nil.
*/
- (NSData *) call:(NSString *)method withArgs:(NSDictionary *)args;
/**
* construct request path.
*/
- (NSString *) path:(NSString *)method withArgs:(NSDictionary *)args;
/**
* sign a request.
*/
- (NSString *) sign:(NSString *)method withArgs:(NSDictionary *)args;
/**
* construct authentication URL.
*/
- (NSString *) authURL:(NSString *)frob forPermission:(NSString *)perm;
/**
* call RTM API 'rtm.timelines.create'.
*/
- (NSString *) createTimeline;
 
@end
// vim:set ft=objc: