npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

rest-parse

v0.0.3

Published

A Parse REST API for Nodejs

Readme

rest-parse

Parse REST API for Node js

##Installation##

  • Simply run
npm install rest-parse
  • Or if you want to save it to package.json
npm install rest-parse --save
  • Or add rest-parse in your package.json
"dependencies": {
  "rest-parse": "*",
  ...
},

    then run

npm install

##Setup##

var restParse = require('rest-parse');

//prepare your keys
var APP_ID = '<your-parse-app-id>';
var REST_API_KEY = '<your-parse-rest-api-key>';

//create parse object with your keys
var Parse = new restParse(APP_ID, REST_API_KEY);

##Callback## All callbacks should follow this format: function(error, response, body, success) { ... }. This is because Kaiseki is based on Request and I thought it would be best to pass the same callback parameters. The error and response parameters are passed as is. On most methods, body is changed and parsed from JSON for your convenience.

  • error: If there's an error during the request (e.g. no internet connection), this will not be empty. Note that if the API returns a statusCode that is not 2xx, it is not marked as an error.

  • response: You can check lots of info about the request in here. For example, the REST API will return a response.statusCode value of 4xx on failures. In these cases, the API will still return a JSON object containing the fields code and error. You can get this in the body parameter.

    { "code": 105,
      "error": "invalid field name: bl!ng" }

    Read more about the Response format here.

  • body: On successful requests, this will be an object or array depending on the method called.

  • success: A convenience parameter, this is a boolean indicating if the request was a success.

##User## ####Setup#### This is to init the parse user before you could use it.

var parseUser = Parse.user();

####signUp(user, callback)####

var newUser = {
  username: 'boylove142',
  password: '123456',
  email: '[email protected]',
  //...
}

parseUser.signUp(newUser, callback);

####logIn(username, password, callback)####

var username = 'boylove142';
var password = '123456';

parseUser.logIn(username, password, callback);

####get(userId, params, callback)####

var userId = '<random-user-id>';

parseUser.get(userId, callback);

####getCurrent(callback)####

This method is used to check whether you logged in or not.

parseUser.getCurrent(callback);

####getAll(params, callback)####

Get all users

parseUser.getAll(callback);

Get all user with specified params. You can read more how to construct these params at https://parse.com/docs/rest#queries

var params = {
  email: '[email protected]'
}

parseUser.getAll(params, callback);

####update(userId, data, callback)####

var params = {
  var userId = '<random-user-id>';
  var params = {
    name: 'Bob',
    phone: '123456789',
  }
  
  parseUser.update(userId, params, callback);
}

####delete(userId, callback)####

This method will delete a specified user from parse

var params = {
  var userId = '<random-user-id>';
  
  parseUser.delete(userId, callback);
}

####requestResetPassword(email, callback)#### ####logInSocial(authData, callback)#### ####linkWithSocial(userId, authData, callback)#### ####unlinkWithSocial(userId, authData, callback)####

##Object## ####create(data, callback)#### ####get(objectId, params, callback)#### ####getAll(params, callback)#### ####update(objectId, data, callback)#### ####delete(objectId, callback)#### ####count(params, callback)#### ####createMany(objects, callback)#### ####updateMany(objects, callback)#### ####deleteMany(obeccts, callback)#### ##File## ####upload(filePath, fileName, callback)#### ####uploadBuffer(buffer, contentType, fileName, callback)#### ####delete(name, callback)#### ##Role## ####create(role, callback)#### ####get(roleId, params, callback)#### ####update(roleId, data, callback)#### ####delete(roleId, callback)#### ####getAll(params, callback)####