ok-io
OK API SDK для Node.js
Содержание
Установка
Требуется Node.js версии 8.0.0 или выше
Yarn
yarn add ok-io
NPM
npm i ok-io -S
Использование
let OK = ;let ok = key: 'tkn18YdUJZe:CQABPOJKAKEKEKEKE' ;
Методы
User
getChat
okapiuser; // => Promise<IUserChatResponse>
getChats
okapiuser; // => Promise<IUserGetChatsResponse>
getFileUploadUrl
okapiuser; // => Promise<IUserGetFileUploadUrlResponse>
getInfo
okapiuser; // => Promise<IUserInfoResponse>
getMessages
okapiuser; // => Promise<IUserGetMessagesResponse>
sendMessage
okapiuser; // => Promise<any>
subscribe
okapiuser; // => Promise<IUserSubscribeResponse>
unsubscribe
okapiuser; // => Promise<IUserUnsubscribeResponse>
getSubscriptions
okapiuser; // => Promise<IUserGetSubscriptionsResponse>
Chat
getUrl
okapichat; // => Promise<IChatGetUrlResponse>
Примеры
Примеры можно посмотреть здесь.