glot.io

1.28.2 • Public • Published

A node wrapper for the glot.io api.

Example usage

var glot = require('glot.io');
 
glot.token = ""
 
glot.GetSnippets(id, function(response) {
  //Do stuff here
});
 
glot.runCode(name, content, url,callback, function(response) {
  //Do stuff here
});

Example responses

Get Snippet

{
  "id": "e2tx9nh4fh",
  "url": "https://snippets.glot.io/snippets/e2tx9nh4fh",
  "created": "2015-04-23T22:03:11Z",
  "modified": "2015-04-23T22:03:11Z",
  "files_hash": "9bdd2b79fafbf81313a79b1df1be5c2671422307",
  "language": "haskell",
  "title": "Hello world",
  "public": true,
  "owner": "anonymous",
  "files": [
    {
      "name": "main.hs",
      "content": "main = putStrLn \"Hello World!\""
    }
  ]
}

Execute code

{
  "stdout": "Fizz Buzz\n",
  "stderr": "",
  "error": ""
}

Features

  • Save Snippets to cloud
  • Execute code and get output and debug information

Package Sidebar

Install

npm i glot.io

Weekly Downloads

1

Version

1.28.2

License

ISC

Last publish

Collaborators

  • karlwalsh