-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpredefined_parameters.js
56 lines (48 loc) · 1.39 KB
/
predefined_parameters.js
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
var querystring = require('querystring');
var config=require('./config');
var todoist_token = config.todoist_token;
var imap = {
user: config.user,
password: config.password,
host: config.host,
port: config.port,
tls: config.tls,
tlsOptions: config.tlsOptions
};
var post_data_project_list = querystring.stringify({
'token': todoist_token,
'sync_token': '*',
'resource_types': '["projects"]',
});
var options_project_list = {
hostname: 'todoist.com',
port: 443,
path: '/API/v7/sync',
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'Content-Length': Buffer.byteLength(post_data_project_list)
}
};
var post_data_collaborators_list = querystring.stringify({
'token': todoist_token,
'sync_token': '*',
'resource_types': '["collaborators"]',
});
var options_collaborators_list = {
hostname: 'todoist.com',
port: 443,
path: '/API/v7/sync',
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'Content-Length': Buffer.byteLength(post_data_collaborators_list)
}
};
module.exports = {
'imap': imap,
'post_data_project_list': post_data_project_list,
'options_project_list': options_project_list,
'post_data_collaborators_list': post_data_collaborators_list,
'options_collaborators_list': options_collaborators_list
};