-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
37 lines (29 loc) · 1006 Bytes
/
index.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
var GetMyCrew = require('./lib/getmycrew-node').GetMyCrew;
getMyCrew = new GetMyCrew({
client_id: '573464783de8e53595f554919556f698f9e63e9ea30c08bc225f520109e66dc6',
client_secret: '664e5ca7b817c6eeb5892931e09745ff40005e3899ae9d1ab54300cbbe6bf036',
endpoint_url: 'http://mbhx.ngrok.com/api/v2'
});
getMyCrew.authenticate("[email protected]", "marcin123").then(function(token) {
console.log("authenticated");
console.log(token);
// getMyCrew.index_tasks().then(function(data) {
// console.log("task list");
// console.log(data);
// });
// getMyCrew.show_tasks(32).then(function(task) {
// console.log("task shown");
// console.log(task);
// });
// getMyCrew.create_tasks({
// title: 'My New Cool Task',
// time: new Date(),
// location: 'V6J1G1',
// details: 'Some notes about task',
// urgency: true,
// contact_ids: [1,2,3]
// }).then(function(task) {
// console.log("task created");
// console.log(task);
// });
});