PottyMouth SDK for Node
What is PottyMouth?
PottyMouth is an advanced chat, username and content filtering service offering automated risk factors based on user behavior. The service also offers moderation tools and tight-knit integration into web platforms of many shapes and sizes.
More information on the service can be found at: http://pottymouthfilter.com/
What is this SDK?
This SDK is a lightweight wrapper library that takes care of all of the RESTful communications to the PottyMouth service. The goal is to cover all of PottyMouth's features via easy to use function calls using Node's standard callback structure.
What has been implemented so far?
- HTTPS RESTful communication with PottyMouth service.
- Basic username risk factor checking and adding to moderation queue.
npm install pottymouth in the root of your project.
var pmSettings =host: 'yourhost.pottymouthfilter.com'apiToken: 'yourAPItoken';var PottyMouth = pmSettings;
Setup for Staging/Insecure Mode
In the event that you need to run on HTTP instead of HTTPS you can pass an alternate port number and secure property:
var pmSettings =host: 'staging.yourhost.pottymouthfilter.com'apiToken: 'yourAPItoken'port: 8080secure: false;var PottyMouth = pmSettings;
Checking the Risk Factor of a Username:
/*Parameters:nickname,unique player ID,(optional) 2 digit language code,(optional) rule set to use,callback function*/PottyMouth;
Adding a username to a moderation queue:
/*Parameters:nickname,unique player ID,bucket id,callback function*/PottyMouth;
Some of these features aren't available to all PottyMouth users, as they're custom implementations. Please ask them if your account supports these features if you are unsure.
Adding custom content to a moderation queue:
// Custom object to be passed into the moderation queue (sample only)var contentObject =hash: 'sample'url: 'http://...'example: true;PottyMouth;
This software is offered into the open source world by Just Be Friends (www.justbefriends.net) in hopes that others will find it useful.
Any contributions would be appreciated in the form of pull requests. It should be noted that we will be adding features to this library when time permits - so feel to reach out and ask to be put in touch with our dev team if you are wanting to make significant changes: email@example.com