I hereby claim:
- I am pamornt on github.
- I am pamornt (https://keybase.io/pamornt) on keybase.
- I have a public key ASALzR5K2DKX9wplZE7IK-avGhSPztk_7jEirr_D2gAY6go
To claim this, I am signing this object:
exports.createCustomToken = functions.region("asia-east2").https.onRequest((request, response) => { | |
}); |
exports.createCustomToken = functions.https.onRequest((request, response) = { | |
}); |
const reply = req => { | |
return request({ | |
method: "POST", | |
uri: `${LINE_MESSAGING_API}/reply`, | |
headers: LINE_HEADER, | |
body: JSON.stringify({ | |
replyToken: req.body.events[0].replyToken, | |
messages: [ | |
{ | |
type: "text", |
I hereby claim:
To claim this, I am signing this object:
let promise_token = new Promise(resolve => { | |
var options = { | |
method: 'POST', | |
uri: 'https://trackapi.thailandpost.co.th/post/api/v1/authenticate/token', | |
strictSSL: false, | |
headers: { | |
'Content-Type': 'application/json', | |
'Authorization': 'Token ' + config.thaipost.token | |
} | |
}; |
let promise_track = new Promise(resolve => { | |
var options = { | |
method: 'POST', | |
uri: 'https://trackapi.thailandpost.co.th/post/api/v1/track', | |
strictSSL: false, | |
body: JSON.stringify(params), | |
headers: { | |
'Content-Type': 'application/json', | |
'Authorization': 'Token ' + access_token.token | |
} |
let item_json = []; | |
let { response } = tracks; | |
let { items } = response; | |
let key = Object.keys(tracks.response.items); | |
if (key.length > 0) { | |
let bgcolor; | |
items[key[0]].forEach(function(detail) { | |
bgcolor = (detail.delivery_status == 'S') ? '#ABEBC6' : '#EEEEEE'; | |
const item_temp = { |
const reply_track = (req, payload) => { | |
return request({ | |
method: `POST`, | |
uri: `${LINE_MESSAGING_API}/reply`, | |
headers: LINE_HEADER, | |
body: JSON.stringify({ | |
replyToken: req.body.events[0].replyToken, | |
messages: [ | |
{ | |
"type": "flex", |
const reply_notfound = (req) => { | |
return request({ | |
method: `POST`, | |
uri: `${LINE_MESSAGING_API}/reply`, | |
headers: LINE_HEADER, | |
body: JSON.stringify({ | |
replyToken: req.body.events[0].replyToken, | |
messages: [ | |
{ | |
type: `text`, |
{ | |
"line": { | |
"channelAccessToken": "", | |
"channelSecret": "" | |
}, | |
"thaipost": { | |
"token": "" | |
} | |
} |