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