Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including impermium with all npm packages installed. Try it out:

var impermium = require("impermium")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

impermium v0.1.1

An API client for impermium


A Node.js client for impermium.


var impermium = require('impermium');
impermium.API_KEY = 'YOUR_API_KEY_HERE';{
  post_id: '123456',
  user_id: 'some-user-id',
  content: 'This is some spam content. Viagra viagra viagra.',
  post_type: 'comment',
  operation: 'create'
}, function(err, res) {
  // do something with response

Generally, the imperium module has functions of the same names as the HTTP routes documented in the impermium API docs, but the names are camel cased. So for example, the /post/user_feedback route maps to the postUserFeedback function in node-impermium. Each function takes an options object and a callback.

In addition to the options documented by impermium, you can also set the req option to a Node http.IncomingMessage to automatically set the http_headers, and enduser_ip impermium options automatically.

Finally, if you don't set the user_id option, it will be set to "ANONYMOUS" by default.

Running the tests

You'll need to set the API_KEY property in test.js to your API key from impermium in order to run the tests.



RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free