Seagull
Migme chat for javascript
Usage
Installation
Install Node.js
Run npm install
Testing
Run npm test
Using
// Initialise ferry first and wait for connected // Chat containerconst chat = ferry // Individual chatconst individual = 'exampleaccount' ferry // ChatRoomconst chatroom = ferrychatroom // GroupChatconst groupchat = ferrygroupchat
Chat
Get chats
chat
Get contacts
chat
The following methods work with Individual
, ChatRoom
and GroupChat
Send a message
individual
Send a sticker
individual
Send a gift
individual
Send a gift with a message
individual
Send an image
individual
Send an image with a message or meta data
individual
Both message and mime_type are optional
Get Emoticon
individual
ChatRoom
Create a new chatroom
To create a new chatroom the user needs to be mig level 10 or higher. The chat room name must not contain more than 15 characters
const chatroom = ferrychatroom
Create chatroom with additional options
All options are optional
const chatroom = ferrychatroom
Join a chatroom
const chatroom = ferrychatroom
Favorite a chatroom
chatroom
Unfavorite a chatroom
chatroom
Get participants
chatroom
Kick a user
chatroom
Mute a user
chatroom
Unmute a user
chatroom
Leave the chatroom
chatroom
Send a gift
This works the same as in regular chat, however you can pass an extra parameter to specify the destination. By default the destination will be all, which will send to all members of the chatroom.
chatroom
Chat GroupChat
Create a chat group
const groupchat = ferrygroupchat
Join a chat group
const groupchat = ferrygroupchat
Get participants
groupchat
Invite a user to the group chat
groupchat// orgroupchat
Send a gift
This works the same as in regular chat, however you can pass an extra parameter to specify the destination. By default the destination will be all, which will send to all members of the group chat.
groupchat
Leave the chat group
groupchat
Chat List
const chatlist = ferry
Get chat list
chatlist
Chat Room List
const roomlist = ferry
Get chat room list
roomlist
Get chatroom categories
roomlist
Contacts
const contacts = ferry
Get Contact list
contacts
Add contact group
contacts
Update contact group
contacts
Remove contact group
contacts
Move contact to a different group
contacts