neocities

0.0.3 • Public • Published

NeoCities Node.js Client Library

A node.js library for interacting with the NeoCities api.

Installation

  $ npm install neocities --global

Usage

First, require the library and initialize:

var NeoCities = require('neocities')
var api = new NeoCities('YOURUSERNAME', 'YOURPASSWORD')

Uploading files to your site

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

Deleting files from your site

api.delete(['derp.js'], function(resp) {
  console.log(resp)
})

Get site info (hits, et cetera)

api.info(function(resp) {
  console.log(resp)
})
api.info('youpi', function(resp) {
  console.log(resp)
})

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.3
    39
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.3
    39
  • 0.0.2
    0
  • 0.0.1
    0

Package Sidebar

Install

npm i neocities

Weekly Downloads

39

Version

0.0.3

License

BSD-2-Clause

Last publish

Collaborators

  • kyledrake