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)
})