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