glitch-api
A Node.js module that allows you to easily interact with the Glitch API
Features
- 99% coverage of the known Glitch API
- Support for authorization
- Class abstraction
Warning: this module uses unstable API that hasn’t been officially released yet. Described only world-open methods from this unofficial site and my researches
Links
NPM page: click
Glitch project: click
GitHub repo: click
Installation
Node.js 8.0.0 or newer is required
NPM
npm i glitch-api -s
Example usage
const { Glitch } = require('glitch-api')
const glitch = new Glitch({ token: 'xxx' })
const { api } = glitch
api.users.get({ id: 1 }).then(user => {
console.log(user) // User<Object>
})
Contribution
Feel free to contribute to the project using GitHub!
You can contact me in DM:
Give your thoughts on this project here
4 Likes
Excellent work! With nicely documented API methods.
What bugs me is that why Node.js 12 is required. Node v12 is the so-called “beta” version for Node.js which not all the users have, so perhaps, change the engine to Node v10.
Again well done! I will see if it requires some modification.
Hello @chroventer,
The reason why version is really high is that only in Node 12.x I’ve managed to work with URLSearchParams
class (doc). I’ll try to find a polyfill for it or write own wrapper in the next version. (the node version will be >=8.0.0)
Glad you like it!
@jarvis394, you can do something like this in older versions of Node:
const { URLSearchParams } = require('url');
1 Like
Yes, already realized, but thanks!
Released 1.3.1, must be all done.
Tests added :sweet:
Node version: >=8.0.0
@chroventer, will you continue to develop your glitch API docs project? It will be really handy for me!
I am willing to continue the project.