Skip to content

Instantly share code, notes, and snippets.

@cscott
Created May 21, 2015 22:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cscott/47e521514ad5c825b42a to your computer and use it in GitHub Desktop.
Save cscott/47e521514ad5c825b42a to your computer and use it in GitHub Desktop.
Check first character of vocaloid API response
#!/usr/bin/env node
var r = require("request");
var url = "http://wiki.vocaloid.de/api.php?format=json&action=query&meta=siteinfo&siprop=namespaces%7Cnamespacealiases%7Cmagicwords%7Cfunctionhooks%7Cextensiontags%7Cgeneral%7Cinterwikimap%7Clanguages%7Cprotocols&rawcontinue=1";
r({ url: url, json: false }, function(err, res, body) {
console.log("First character is: ", body.charCodeAt(0));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment