library for the NeoCities.org API
Kyle Drake d0715c7a97 Merge pull request #6 from ungoldman/patch-1 | 7 gadi atpakaļ | |
---|---|---|
README.md | 7 gadi atpakaļ | |
index.js | 10 gadi atpakaļ | |
package.json | 7 gadi atpakaļ |
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)
})