Repository navigation
Expand file tree
/
Copy pathIRWebAPIKit.h
More file actions
83 lines (43 loc) · 2.03 KB
/
Copy pathIRWebAPIKit.h
File metadata and controls
83 lines (43 loc) · 2.03 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
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
//
// IRWebAPIKit.h
// IRWebAPIKit
//
// Created by Evadne Wu on 11/19/10.
// Copyright 2010 Iridia Productions. All rights reserved.
//
#import <Foundation/Foundation.h>
@class IRWebAPIEngine;
@class IRWebAPIContext;
@class IRWebAPIAuthenticator;
@class IRWebAPIInterface;
typedef NSDictionary * (^IRWebAPIResponseParser) (NSData *inData);
typedef NSDictionary * (^IRWebAPITransformer) (NSDictionary *inOriginalContext);
typedef void (^IRWebAPICallback) (IRWebAPIEngine *inEngine, NSDictionary *inResponseOrNil, BOOL *inNotifyDelegate, BOOL *inShouldRetry);
typedef void (^IRWebAPIAuthenticatorCallback) (IRWebAPIAuthenticator *inAuthenticator, BOOL isAuthenticated, BOOL *inShouldRetry);
typedef void (^IRWebAPIEngineExecutionBlock) (void);
// The dictionary that a IRWebAPITransformer block gets will contain these keys:
#define kIRWebAPIEngineRequestHTTPBaseURL @"IRWebAPIEngineRequestHTTPBaseURL"
// Expected to be a NSURL, and well it should be there
#define kIRWebAPIEngineRequestHTTPHeaderFields @"IRWebAPIEngineHTTPHeaderFields"
// Expected to be a dictionary
#define kIRWebAPIEngineRequestHTTPBody @"IRWebAPIEngineHTTPBody"
// Expected to be NSData or nil
#define kIRWebAPIEngineRequestHTTPQueryParameters @"IRWebAPIEngineHTTPQueryParameters"
// Expected to be a dictionary
#define kIRWebAPIEngineRequestHTTPMethod @"IRWebAPIEngineRequestHTTPMethod"
// Expected to be POST, GET, whatever
#define kIRWebAPIEngineParser @"IRWebAPIEngineParser"
// Expected to be a IRWebAPIResponseParser. Exposed to allow custom response parsing for “some methods”.
#import "IRWebAPIResponseParser.h"
#import "IRWebAPIHelpers.h"
#import "IRWebAPIEngine.h"
#import "IRWebAPIContext.h"
#import "IRWebAPIAuthenticator.h"
#import "IRWebAPICredentials.h"
#import "IRWebAPIInterface.h"
#import "IRWebAPIGoogleReaderAuthenticator.h"
#import "IRWebAPIXOAuthAuthenticator.h"
#import "IRWebAPIInterfaceAuthenticating.h"
#import "IRWebAPIInterfaceXOAuthAuthenticating.h"
#import "IRWebAPITwitterInterface.h"
#import "IRWebAPIGoogleReaderInterface.h"