glot.io

A package to interface with the glot.io api

Usage no npm install needed!

<script type="module">
  import glotIo from 'https://cdn.skypack.dev/glot.io';
</script>

README

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