dd-push-js

1.0.0 • Public • Published

dd-push-js

A simple library for accessing Data Drop pushes via the web and nodejs.

What's DataDrop?

DataDrop is an application that connects with Dropbox to allow you to read and write a file using a simple permanent URL. It uses the HTTP verbs (GET, PUT, POST, DELETE) to enable reading, writing, appending, and deleting the file. Usage of the verbs is abstracted away when you use this library though. You just get simple methods for doing those things.

How do you install it?

Install it with npm:

npm install dd-push-js

or bower:

bower install dd-push-js

How do you use it?

  1. Load the library.
    If you're using node:
var ddPush = require("dd-push-js");

If you're using a browser:

<script src="bower_components/dd-push-js/dist/dd-push.min.js"></script>
  1. Config the push.
var push1 = ddPush.push({url : "#### your url here ###", key: "#### your key here ###"});
  1. Do your thing!
// use read, write, append, or delete.
push1.write("This is saved from node.js")
  .then(function(body){
    console.log("The server responded with:", body);
  })
  .catch(function(err){
    console.error("There was an error:", err);
  });

Readme

Keywords

none

Package Sidebar

Install

npm i dd-push-js

Weekly Downloads

1

Version

1.0.0

License

BSD-2-Clause

Last publish

Collaborators

  • billstron