twilio / twilio-chat-demo-js

Programmable Chat API Demo Application for JavaScript
BSD 3-Clause "New" or "Revised" License
90 stars 94 forks source link

From where does the Twilio coming? #32

Closed avastamin closed 6 years ago

avastamin commented 6 years ago

https://www.npmjs.com/package/twilio-chat if the package name is twilio-chat then how client initiation happening like this?

Twilio.Chat.Client.create(token).then(client => {
    // Use client
});

So confusing documentation to me.

aleksandrsivanovs commented 6 years ago

this is sample for the web-based package. in web-based (browserified packag) we are declaring the global Twilio.Chat.Client as main entry point for the programmable chat. for the nodejs package you should use Client class from twilio-chat package.