library for the NeoCities.org API
Kyle Drake d0715c7a97 Merge pull request #6 from ungoldman/patch-1 | il y a 7 ans | |
---|---|---|
README.md | il y a 7 ans | |
index.js | il y a 10 ans | |
package.json | il y a 7 ans |
A node.js library for interacting with the NeoCities api.
$ npm install neocities
First, require the library and initialize:
var NeoCities = require('neocities')
var api = new NeoCities('YOURUSERNAME', 'YOURPASSWORD')
// local file path is ./index.js, saved on site as derp.js
api.upload([
{name: 'derp.js', path: './index.js'}
], function(resp) {
console.log(resp)
})
api.delete(['derp.js'], function(resp) {
console.log(resp)
})
api.info(function(resp) {
console.log(resp)
})
api.info('youpi', function(resp) {
console.log(resp)
})