Skip to content

0.7.10 / 2018-10-09

Compare
Choose a tag to compare
@chentsulin chentsulin released this 09 Oct 07:41
· 410 commits to master since this release

messaging-api-messenger

  • [new] Implement persona apis:

  • createPersona():

createPersona({
  name: 'John Mathew',
  profile_picture_url: 'https://facebook.com/john_image.jpg',
}).then(persona => {
  console.log(persona);
  // {
  //  "id": "<PERSONA_ID>"
  // }
});
  • getPersona(personaId):
getPersona(personaId).then(persona => {
  console.log(persona);
  // {
  //   "name": "John Mathew",
  //   "profile_picture_url": "https://facebook.com/john_image.jpg",
  //   "id": "<PERSONA_ID>"
  // }
});
  • getPersonas(cursor?: string):
getPersonas(cursor).then(personas => {
  console.log(personas);
  // {
  //   "data": [
  //     {
  //       "name": "John Mathew",
  //       "profile_picture_url": "https://facebook.com/john_image.jpg",
  //       "id": "<PERSONA_ID>"
  //     },
  //     {
  //       "name": "David Mark",
  //       "profile_picture_url": "https://facebook.com/david_image.jpg",
  //       "id": "<PERSONA_ID>"
  //     }
  //   ],
  //   "paging": {
  //     "cursors": {
  //       "before": "QVFIUlMtR2ZATQlRtVUZALUlloV1",
  //       "after": "QVFIUkpnMGx0aTNvUjJNVmJUT0Yw"
  //     }
  //   }
  // }
});
  • getAllPersonas():
getAllPersonas().then(personas => {
  console.log(personas);
  //   [
  //     {
  //       "name": "John Mathew",
  //       "profile_picture_url": "https://facebook.com/john_image.jpg",
  //       "id": "<PERSONA_ID>"
  //     },
  //     {
  //       "name": "David Mark",
  //       "profile_picture_url": "https://facebook.com/david_image.jpg",
  //       "id": "<PERSONA_ID>"
  //     }
  //   ]
});
  • deletePersona(personaId):
deletePersona(personaId);
  • [fix] getAssociatedLabels: get name field by default and add options for fields.