Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

npm and readme stuff

  • Loading branch information...
commit 3762082dee0e676a927a48daf3cb5be7bda0bda6 1 parent d7c30d1
@tenorviol tenorviol authored
Showing with 28 additions and 6 deletions.
  1. +1 −0  index.js
  2. +9 −0 package.json
  3. +17 −5 readme.md
  4. +1 −1  test/Parse.test.js
View
1  index.js
@@ -0,0 +1 @@
+exports.Parse = require('./lib/Parse');
View
9 package.json
@@ -0,0 +1,9 @@
+{
+ "name": "parse-api",
+ "description": "API for accessing Parse.com applications",
+ "version": "0.1.0",
+ "author": "Chris Johnson <tenorviol@yahoo.com>",
+ "repository": "git://github.com/tenorviol/node-parse-api",
+ "main": "index",
+ "engines": { "node": ">= 0.4.0" }
+}
View
22 readme.md
@@ -9,32 +9,44 @@ install
examples
--------
+### setup
+
var Parse = require('parse-api').Parse;
var APP_ID = ...;
var MASTER_KEY = ...;
var app = new Parse(APP_ID, MASTER_KEY);
-
+
+### insert
+
// add a Foo object, { foo: 'bar' }
app.insert('Foo', { foo: 'bar' }, function (err, response) {
console.log(response);
});
-
+
+### find one
+
// the Foo with id = 'someId'
app.find('Foo', 'someId', function (err, response) {
console.log(response);
});
-
+
+### find many
+
// all Foo objects with foo = 'bar'
app.find('Foo', { foo: 'bar' }, function (err, response) {
console.log(response);
});
-
+
+### update
+
app.update('Foo', 'someId', { foo: 'fubar' }, function (err, response) {
console.log(response);
});
-
+
+### delete
+
app.delete('Foo', 'someId', function (err) {
// nothing to see here
});
View
2  test/Parse.test.js
@@ -1,4 +1,4 @@
-var Parse = require('../lib/Parse.js');
+var Parse = require('../index').Parse;
// use environment variables APPLICATION_ID and MASTER_KEY to test against
var application_id = process.env.APPLICATION_ID;
Please sign in to comment.
Something went wrong with that request. Please try again.