Created
April 3, 2015 13:24
-
-
Save WouterG/7a89f7e9009df5b471dc to your computer and use it in GitHub Desktop.
Alter PlugDJ's API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Add any DJ to the waitlist, allows adding yourself */ | |
API.moderateAddDJ = function(id) { | |
var xml = new XMLHttpRequest(); | |
xml.open('POST', 'https://plug.dj/_/booth/add', true); | |
xml.setRequestHeader('Content-Type', 'application/json'); | |
xml.send(JSON.stringify({id: id})); | |
} | |
/* Remove any DJ from waitlist, allows removing yourself */ | |
API.moderateRemoveDJ = function(id) { | |
var xml = new XMLHttpRequest(); | |
xml.open('DELETE', 'https://plug.dj/_/booth/remove/' + id, true); | |
xml.setRequestHeader('Content-Type', 'application/json'); | |
xml.send(); | |
} | |
/* Delete chat of any user, including yourself */ | |
API.moderateDeleteChat = function(cid) { | |
var xml = new XMLHttpRequest(); | |
xml.open('DELETE', 'https://plug.dj/_/chat/' + cid, true); | |
xml.setRequestHeader('Content-Type', 'application/json'); | |
xml.send(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment