forked from ciaranj/node-oauth
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnode-oauth.d.ts
108 lines (106 loc) · 3.86 KB
/
node-oauth.d.ts
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
declare module "oauth" {
import * as http from 'http';
interface OAuth {
setClientOptions(options: Object): void;
getOAuthAccessToken(
oauth_token: string,
oauth_token_secret: string,
callback: (error: string, oauthToken: string, oauthTokenSecret: string, results: { id: string; screen_name: string; }) => void
): void;
getOAuthAccessToken(
oauth_token: string,
oauth_token_secret: string,
oauth_verifier: string,
callback: (error: string, oauthToken: string, oauthTokenSecret: string, results: { id: string; screen_name: string; }) => void
): void;
getProtectedResource(
url: string,
method: string,
oauth_token: string,
oauth_token_secret: string,
callback: (req: any, res: any) => void
): void;
getProtectedResource(
url: string,
method: string,
oauth_token: string,
oauth_token_secret: string,
callback: (error: string, oauthToken: string, oauthTokenSecret: string, results: string) => void
): void;
delete(
url: string,
oauth_token: string,
oauth_token_secret: string,
callback: (error: string, oauthToken: string, oauthTokenSecret: string, results: string) => void
): any;
get(
url: string,
oauth_token: string,
oauth_token_secret: string,
callback: (error: { statusCode: number, data: string }, data: string, response: http.ServerResponse) => void
): any;
put(
url: string,
oauth_token: string,
oauth_token_secret: string,
post_body: string,
callback: (error: string, oauthToken: string, oauthTokenSecret: string, results: string) => void
): any;
put(
url: string,
oauth_token: string,
oauth_token_secret: string,
post_body: string,
post_content_type: string,
callback: (error: string, oauthToken: string, oauthTokenSecret: string, results: string) => void
): any;
post(
url: string,
oauth_token: string,
oauth_token_secret: string,
post_body: string,
callback: (error: string, oauthToken: string, oauthTokenSecret: string, results: string) => void
): any;
post(
url: string,
oauth_token: string,
oauth_token_secret: string,
post_body: string,
post_content_type: string,
callback: (error: string, oauthToken: string, oauthTokenSecret: string, results: string) => void
): any;
getOAuthRequestToken(
callback: (error: string, oauthToken: string, oauthTokenSecret: string, results: string) => void
): void;
getOAuthRequestToken(
extraParams: any,
callback: (error: string, oauthToken: string, oauthTokenSecret: string, results: string) => void
): void;
signUrl(
url: string,
oauth_token: string,
oauth_token_secret: string,
method?: string,
extra_params?: { [key: string]: any; }
): string;
authHeader(
url: string,
oauth_token: string,
oauth_token_secret: string,
method?: string,
extra_params?: { [key: string]: any; }
): string;
}
var OAuth: {
new (requestUrl: string,
accessUrl: string,
consumerKey: string,
consumerSecret: string,
version: string,
authorize_callback: string,
signatureMethod: string,
nonceSize?: string,
customHeaders?: Object
): OAuth;
}
}