fbe7f7a7
Apichat.Tum
add api google
|
1
2
|
'use strict'
|
1244ae71
Apichat.Tum
new response
|
3
4
5
6
|
const console = process.console
const yamlConfig = require('node-yaml-config')
const path = require('path')
const config = yamlConfig.load(path.join(__dirname, '/../../config/config.yml'))
|
f6a4415a
Apichat.Tum
start smart-rms-c...
|
7
|
|
1244ae71
Apichat.Tum
new response
|
8
|
const lib = require('../lib')
|
f6a4415a
Apichat.Tum
start smart-rms-c...
|
9
10
11
12
13
|
// lib.authorize()
// lib.listEvents()
// lib.createEvent()
|
1244ae71
Apichat.Tum
new response
|
14
15
|
const url = config.server.url
const port = config.server.port
|
f3f14fef
TUM.Apichat
add value config ...
|
16
|
const urlto = config.server.urlto
|
cf86e9a3
Apichat.Tum
- ui with oauth2 ...
|
17
|
const portto = config.server.portto
|
1244ae71
Apichat.Tum
new response
|
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
|
function index(req, res) {
res.send({
message: 'Google Calendar API',
endpoint: {
listEvents: 'GET /events',
createEvent: 'POST /events'
}
})
}
function events(req, res) {
lib.authorize((err, auth) => {
if (err) {
res.send(err)
}
lib.listEvents(auth, (err, response) => {
if (err) {
res.send(err)
} else {
res.send(response)
}
})
})
}
function create(req, res) {
|
77034810
Apichat.Tum
fix REST API
|
45
46
47
|
let payload = req.body
let summary = payload.summary
|
cf86e9a3
Apichat.Tum
- ui with oauth2 ...
|
48
49
50
51
52
53
54
55
56
57
|
let description = payload.description
let email = payload.email
let startDate = payload.startDate
let endDate = payload.endDate
lib.authorize((err, auth) => {
if (err) {
res.send(err)
}
|
77034810
Apichat.Tum
fix REST API
|
58
|
// let options = lib.eventBuilder(payload)
|
1244ae71
Apichat.Tum
new response
|
59
60
|
// options.auth = auth
|
cf86e9a3
Apichat.Tum
- ui with oauth2 ...
|
61
62
63
64
65
66
67
68
69
70
71
72
73
|
lib.createEvent(auth, payload, (err, result) => {
if (err) {
res.send(err)
} else {
res.send(result)
}
})
})
}
module.exports.index = index
module.exports.events = events
module.exports.create = create
|
1244ae71
Apichat.Tum
new response
|
|
|
cf86e9a3
Apichat.Tum
- ui with oauth2 ...
|
|
|
f6a4415a
Apichat.Tum
start smart-rms-c...
|
|
|
1244ae71
Apichat.Tum
new response
|
|
|
cf86e9a3
Apichat.Tum
- ui with oauth2 ...
|
|
|
1244ae71
Apichat.Tum
new response
|
|
|
cf86e9a3
Apichat.Tum
- ui with oauth2 ...
|
|
|
1244ae71
Apichat.Tum
new response
|
|
|
cf86e9a3
Apichat.Tum
- ui with oauth2 ...
|
|
|
fbe7f7a7
Apichat.Tum
add api google
|
|
|
cf86e9a3
Apichat.Tum
- ui with oauth2 ...
|
|
|
1244ae71
Apichat.Tum
new response
|
|
|
cf86e9a3
Apichat.Tum
- ui with oauth2 ...
|
|
|
1244ae71
Apichat.Tum
new response
|
|
|
cf86e9a3
Apichat.Tum
- ui with oauth2 ...
|
|
|
1244ae71
Apichat.Tum
new response
|
|
|
f6a4415a
Apichat.Tum
start smart-rms-c...
|
|
|
1244ae71
Apichat.Tum
new response
|
|
|
fbe7f7a7
Apichat.Tum
add api google
|
|
|
cf86e9a3
Apichat.Tum
- ui with oauth2 ...
|
|
|
f6a4415a
Apichat.Tum
start smart-rms-c...
|
|
|
1244ae71
Apichat.Tum
new response
|
|
|
cf86e9a3
Apichat.Tum
- ui with oauth2 ...
|
|
|
fbe7f7a7
Apichat.Tum
add api google
|
|
|
cf86e9a3
Apichat.Tum
- ui with oauth2 ...
|
|
|
77034810
Apichat.Tum
fix REST API
|
|
|
1244ae71
Apichat.Tum
new response
|
|
|
77034810
Apichat.Tum
fix REST API
|
|
|
1244ae71
Apichat.Tum
new response
|
|
|
77034810
Apichat.Tum
fix REST API
|
|
|
cf86e9a3
Apichat.Tum
- ui with oauth2 ...
|
|
|
fbe7f7a7
Apichat.Tum
add api google
|
|
|
cf86e9a3
Apichat.Tum
- ui with oauth2 ...
|
|
|
f6a4415a
Apichat.Tum
start smart-rms-c...
|
|
|
f6a4415a
Apichat.Tum
start smart-rms-c...
|
|
|
77034810
Apichat.Tum
fix REST API
|
|
|
1244ae71
Apichat.Tum
new response
|
|
|
f6a4415a
Apichat.Tum
start smart-rms-c...
|
|
|
77034810
Apichat.Tum
fix REST API
|
|
|
f6a4415a
Apichat.Tum
start smart-rms-c...
|
|
|
f6a4415a
Apichat.Tum
start smart-rms-c...
|
|
|
a54f2679
DESKTOP-RBJDHSM\ADMIN
fix API
|
|
|
f6a4415a
Apichat.Tum
start smart-rms-c...
|
|
|
1244ae71
Apichat.Tum
new response
|
|
|
a54f2679
DESKTOP-RBJDHSM\ADMIN
fix API
|
|
|
f6a4415a
Apichat.Tum
start smart-rms-c...
|
|
|
a54f2679
DESKTOP-RBJDHSM\ADMIN
fix API
|
|
|
f6a4415a
Apichat.Tum
start smart-rms-c...
|
|
|
1244ae71
Apichat.Tum
new response
|
|
|
f6a4415a
Apichat.Tum
start smart-rms-c...
|
|
|
1244ae71
Apichat.Tum
new response
|
|
|
f6a4415a
Apichat.Tum
start smart-rms-c...
|
|
|
77034810
Apichat.Tum
fix REST API
|
|
|
1244ae71
Apichat.Tum
new response
|
|
|
77034810
Apichat.Tum
fix REST API
|
|
|
1244ae71
Apichat.Tum
new response
|
|
|
77034810
Apichat.Tum
fix REST API
|
|
|
fbe7f7a7
Apichat.Tum
add api google
|
|
|
f3f14fef
TUM.Apichat
add value config ...
|
|
|
77034810
Apichat.Tum
fix REST API
|
|
|
1244ae71
Apichat.Tum
new response
|
|
|
21a1ff19
Apichat.Tum
fix follow smartr...
|
|
|
1244ae71
Apichat.Tum
new response
|
|
|
77034810
Apichat.Tum
fix REST API
|
|
|
1244ae71
Apichat.Tum
new response
|
|
|
77034810
Apichat.Tum
fix REST API
|
|
|
1244ae71
Apichat.Tum
new response
|
|
|
77034810
Apichat.Tum
fix REST API
|
|
|
1244ae71
Apichat.Tum
new response
|
|
|
77034810
Apichat.Tum
fix REST API
|
|
|
1244ae71
Apichat.Tum
new response
|
|
|
77034810
Apichat.Tum
fix REST API
|
|
|
1244ae71
Apichat.Tum
new response
|
|
|
77034810
Apichat.Tum
fix REST API
|
|
|
1244ae71
Apichat.Tum
new response
|
|
|
77034810
Apichat.Tum
fix REST API
|
|
|
1244ae71
Apichat.Tum
new response
|
|
|
77034810
Apichat.Tum
fix REST API
|
|
|
1244ae71
Apichat.Tum
new response
|
|
|
77034810
Apichat.Tum
fix REST API
|
|
|
1244ae71
Apichat.Tum
new response
|
|
|
77034810
Apichat.Tum
fix REST API
|
|
|
1244ae71
Apichat.Tum
new response
|
|
|
7598c58f
Apichat.Tum
add eventTypeID /...
|
|
|
1244ae71
Apichat.Tum
new response
|
|
|
7598c58f
Apichat.Tum
add eventTypeID /...
|
|
|
77034810
Apichat.Tum
fix REST API
|
|
|
fbe7f7a7
Apichat.Tum
add api google
|
|
|
f3f14fef
TUM.Apichat
add value config ...
|
|
|
fbe7f7a7
Apichat.Tum
add api google
|
|
|