Instant messaging app to interface server with sailsjs rest or socket.io API
3.1K
Instant messaging app via rest or websocket API
attributes
api
post /api/user - create user by authenticated admin only
get /api/user - list users for the specified pagination/sorting parameters skip, limit, sort
get /api/user/:id - read user attributes of the specified id
get /api/user/profile - get user profiles for email list specified in req.body (e.g. email: ["[email protected]", "[email protected]", ...])
get /user/photo/:id - get user photo
get /api/user/me - read user attributes of current login user
put /api/user/me - update user attributes of current login user excluding attribute id, jid, photoUrl
attributes
api
post /api/group - create group with the specified attributes excluding id, jid, photoUrl
post /api/group/:parentid/members/:id - add user with :id into group with :parentid as members
post /api/group/:parentid/moderators/:id - add user with :id into group with :parentid as moderators
get /api/group - list all public groups (moderated or unmoderated)
get /api/group/membersOnly - list private groups (members only) with current login user as member
get /api/group/me - list groups created by current login user
get /api/group/name/:name - get group details with specified name created by current login user
get /api/group/:id - get group details with specified group id
get /group/photo/:id - get group photo
put /api/group/:id - update group attributes of the specified id exlcuding id, jid, photoUrl
del /api/group/:id - delete group of the specified id
del /api/group/:id/members - remove current login user from member list of the specified group (leave group)
del /api/group/:id/moderators - remove current login user from moderator list of the specified group (leave group)
attributes
api
post /api/roster - create a roster item with the specified attributes excluding id, jid
get /api/roster - list all roster items for current login user
del /api/roster/:id - delete roster item of the specified jid
attributes
api
get /api/msg - read message history for the specified chat type (type) and target user or group jid (to) (e.g. {type: 'chat', to: '[email protected]'} or {type: 'groupchat', to: '[email protected]'})
get /api/msg/file/:id - get file attachment for the specified message id
post /api/msg - send message with the specified attributes
post /api/msg/file - send file attachment with the specified attributes
Content type
Image
Digest
Size
2 GB
Last updated
about 8 years ago
docker pull twhtanghk/imsails