Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Kabam plugin with rest api for sending and recieving private messages

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 test
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .jshintrc
Octocat-spinner-32 .travis.yml
Octocat-spinner-32 Gruntfile.js
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.md
Octocat-spinner-32 index.js
Octocat-spinner-32 package.json
Octocat-spinner-32 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.