Releases: bottenderjs/messaging-apis
Releases · bottenderjs/messaging-apis
0.6.9 / 2017-12-28
messaging-api-messenger
- [fix] Not to use page token as default token when create subscription. #267
0.6.8 / 2017-12-25
messaging-api-telegram
- [new] Add
getUpdates
:
client
.getUpdates({
limit: 10,
})
.then(data => {
console.log(data.result);
/*
[
{
update_id: 513400512,
message: {
message_id: 3,
from: {
id: 313534466,
first_name: 'first',
last_name: 'last',
username: 'username',
},
chat: {
id: 313534466,
first_name: 'first',
last_name: 'last',
username: 'username',
type: 'private',
},
date: 1499402829,
text: 'hi',
},
},
...
]
*/
});
0.6.7 / 2017-12-22
messaging-api-line
- [changed] Support original
baseSize
key in LINE imagemap APIs.
0.6.6 / 2017-12-20
messaging-api-messenger
- [fix] Not to attach empty array as
quick_replies
to message. #261
0.6.5 / 2017-12-20
messaging-api-telegram
- [new] Add
sendVideoNote
:
client.sendVideoNote(CHAT_ID, 'https://example.com/video_note.mp4', {
duration: 40,
disable_notification: true,
});
0.6.4 / 2017-12-14
messaging-api-messenger
- [changed] Rename arguments in
logCustomEvent
for consistency:
appId -> app_id
pageId -> page_id
userId -> page_scoped_user_id
client.logCustomEvents({
app_id: APP_ID,
page_id: PAGE_ID,
page_scoped_user_id: USER_ID,
events: [
{
_eventName: 'fb_mobile_purchase',
_valueToSum: 55.22,
_fb_currency: 'USD',
},
],
});
Original keys (appId
, pageId
, userId
) will be removed when v0.7
or v0.8
release.
- [changed] Rename
Messenger
toMessengerBatch
:
const { MessengerBatch } = require('messaging-api-messenger');
client.sendBatch([
MessengerBatch.createText(USER_ID, '1'),
MessengerBatch.createText(USER_ID, '2'),
MessengerBatch.createText(USER_ID, '3'),
MessengerBatch.createText(USER_ID, '4'),
MessengerBatch.createText(USER_ID, '5'),
]);
Original APIs on Messenger
will be changed when v0.7
release.
- [new] Add
createSubscription
method:
client.createSubscription({
app_id: APP_ID,
callback_url: 'https://mycallback.com',
fields: ['messages', 'messaging_postbacks', 'messaging_referrals'],
verify_token: VERIFY_TOKEN,
});
- [new] ID Matching API:
Given a user ID for an app, retrieve the IDs for other apps owned by the same business.
client
.getIdsForApps({
user_id: USER_ID,
app_secret: APP_SECRET,
})
.then(result => {
console.log(result);
});
Given a user ID for a Page (associated with a bot), retrieve the IDs for other Pages owned by the same business.
client
.getIdsForPages({
user_id: USER_ID,
app_secret: APP_SECRET,
})
.then(result => {
console.log(result);
});
0.6.3 / 2017-12-12
messaging-api-messenger
- [fix] pass options into
setGetStarted
0.6.2 / 2017-12-11
messaging-api-telegram
Support Game APIs!
sendGame
:
client.sendGame(CHAT_ID, 'Mario Bros.', {
disable_notification: true,
});
setGameScore
:
client.setGameScore(USER_ID, 999);
getGameHighScores
:
client.getGameHighScores(USER_ID);
0.6.1 / 2017-12-08
messaging-api-line
- [new] Support new options (
imageAspectRatio
,imageSize
,imageBackgroundColor
) for template message images #247
client.replyButtonTemplate(REPLY_TOKEN, altText, {
thumbnailImageUrl,
title,
imageAspectRatio: 'rectangle',
imageSize: 'cover',
imageBackgroundColor: '#FFFFFF',
actions,
});
client.replyCarouselTemplate(REPLY_TOKEN, altText, columns, {
imageAspectRatio: 'rectangle',
imageSize: 'cover',
});
messaging-api-telegram
- [new] Add
sendMediaGroup
:
client.sendMediaGroup(CHAT_ID, [
{ type: 'photo', media: 'BQADBAADApYAAgcZZAfj2-xeidueWwI' },
]);
0.6.0 / 2017-12-07
- [new] Support WeChat! 🎉🎉🎉
- [breaking] Remove
client.getHTTPClient()
useclient.axios
instead #236
messaging-api-messenger
- [breaking] Set default
is_reusable
to false when upload attachment #221 - [breaking] Remove messenger profile deprecated methods #239
getGetStartedButton -> getGetStarted
setGetStartedButton -> setGetStarted
deleteGetStartedButton -> deleteGetStarted
getGreetingText -> getGreeting
setGreetingText -> setGreeting
deleteGreetingText -> deleteGreeting
getDomainWhitelist -> getWhitelistedDomains
setDomainWhitelist -> setWhitelistedDomains
deleteDomainWhitelist -> deleteWhitelistedDomains
getChatExtensionHomeURL -> getHomeURL
setChatExtensionHomeURL -> setHomeURL
deleteChatExtensionHomeURL -> deleteHomeURL
messaging-api-telegram
- [new] Add Inline mode API -
answerInlineQuery
:
client.answerInlineQuery(
'INLINE_QUERY_ID',
[
{
type: 'photo',
id: 'UNIQUE_ID',
photo_file_id: 'FILE_ID',
title: 'PHOTO_TITLE',
},
{
type: 'audio',
id: 'UNIQUE_ID',
audio_file_id: 'FILE_ID',
caption: 'AUDIO_TITLE',
},
],
{
cache_time: 1000,
}
);