Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Kabam plugin with rest api for sending and recieving private messages
JavaScript
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
test
.gitignore
.jshintrc
.travis.yml
Gruntfile.js
LICENSE
README.md
index.js
package.json
sonar-project.properties

README.md

Kabam-plugin-private-message

Kabam plugin for sending and recieving private message

Build Status

It exposes 3 routes

GET /api/messages?limit=10&offset=0

Get all recent messages for current authenticated user, in reverse chronological order - the most recent messages on top. Limit and offset can be ommited.

GET /api/messages/:username?limit=10&offset=0

Get all recent messages of dialog between current authenticated user and other one with :username. Messages are sorted in chronological order - the most recent on top. Limit and offset can be ommited.

POST /api/messages/:username

Sends the message to :username. Mandatory parameters are username (string) and message (string). Optional parameter is title (string)

When user receives message, the kabamKernel emits event.

See example

MWC.on('notify:pm',function(pm){
      console.log('Sendind email to '+pm.user.username+' with text "' + pm.message+'" from user "'+pm.from.username+'"');
});
Something went wrong with that request. Please try again.