Skip to content

Releases: bottenderjs/messaging-apis

0.6.9 / 2017-12-28

28 Dec 03:57
Compare
Choose a tag to compare

messaging-api-messenger

  • [fix] Not to use page token as default token when create subscription. #267

0.6.8 / 2017-12-25

25 Dec 04:32
Compare
Choose a tag to compare

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

22 Dec 10:59
Compare
Choose a tag to compare

messaging-api-line

  • [changed] Support original baseSize key in LINE imagemap APIs.

0.6.6 / 2017-12-20

20 Dec 07:35
Compare
Choose a tag to compare

messaging-api-messenger

  • [fix] Not to attach empty array as quick_replies to message. #261

0.6.5 / 2017-12-20

20 Dec 03:41
Compare
Choose a tag to compare

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

14 Dec 05:07
Compare
Choose a tag to compare

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 to MessengerBatch:
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

12 Dec 03:57
Compare
Choose a tag to compare

messaging-api-messenger

  • [fix] pass options into setGetStarted

0.6.2 / 2017-12-11

11 Dec 10:06
Compare
Choose a tag to compare

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

08 Dec 15:27
Compare
Choose a tag to compare

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

client.sendMediaGroup(CHAT_ID, [
  { type: 'photo', media: 'BQADBAADApYAAgcZZAfj2-xeidueWwI' },
]);

Telegram Bot API 3.5

0.6.0 / 2017-12-07

07 Dec 04:14
Compare
Choose a tag to compare
  • [new] Support WeChat! 🎉🎉🎉

WeChat

  • [breaking] Remove client.getHTTPClient() use client.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,
  }
);