UNPKG

meses-messaging

Version:

Meses messaging SDK in JavaScript

27 lines (23 loc) 831 B
import MesesMessagingApp from '../src/MesesMessagingApp' import PreviousConversationListQuery from '../src/classes/PreviousConversationListQuery' class TestPreviousConversationListQuery { static testLoad() { const app = new MesesMessagingApp('http://meses-api.airyrooms.dev', 'ceres') const query = new PreviousConversationListQuery(app._service, 'USER-20002', null) query.load(5) .then(result => console.log('First 5: ', result)) .then(() => query.load(5)) .then(result => console.log('Next 5: ', result)) .catch(err => console.log(err)) } static run(command) { switch (command) { case 1: TestPreviousConversationListQuery.testLoad() break default: console.log('Please provide the argument') } } } TestPreviousConversationListQuery.run(1)