# hoodie-plugin-parse

> Parse data sync plugin for Hoodie.

Latest version **0.0.2** (published 2015-07-04) · 0 weekly downloads

## Install

```sh
npm install hoodie-plugin-parse
pnpm add hoodie-plugin-parse
yarn add hoodie-plugin-parse
bun add hoodie-plugin-parse
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2015-07-04 |
| First published | 2015-07-04 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Known vulnerabilities | 0 (+5 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | feego |

## Links

- npm: https://www.npmjs.com/package/hoodie-plugin-parse
- npm.io page: https://npm.io/package/hoodie-plugin-parse

## Dependencies (6)

- [bs58](https://npm.io/package/bs58.md) ^1.2.0
- [async](https://npm.io/package/async.md) ^0.9.0
- [hoodie](https://npm.io/package/hoodie.md) 0.6.5
- [lodash](https://npm.io/package/lodash.md) ^2.4.1
- [hoodie-server](https://npm.io/package/hoodie-server.md) 0.9.19
- [socket.io-client](https://npm.io/package/socket.io-client.md) ^1.3.5

## Recent versions

- 0.0.2 (latest) — 2015-07-04
- 0.0.1 — 2015-07-04

## README

#### Installation

```bash
hoodie install parse
```

After installing the plugin, you must configure it using your Parse App configuration keys. You need to do this both for the plugin's front-end and backend code. To setup the keys for the plugin's backend, you can use the plugin's admin dashboard. However, the plugin's front-end configuration have to be done directly in the plugin's front-end API code, in the line 8 of the file "hoodie.parse.js":

```js
// Parse App settings
var PARSE_APPLICATION_ID = 'PARSE_APPLICATION_ID'
var PARSE_JAVASCRIPT_KEY = 'PARSE_JAVASCRIPT_KEY'
```

To enable the real-time data sync between the data stored on Hoodie and on Parse, the plugin subscribes a SocketIO channel which will receive a message each time a data collection is changed on Parse. To use this feature, you must use the Parse's Cloud Code "afterSave" events to notify a SocketIO server that will later publish the corresponding notifications on the SocketIO channel this plugin is subscribing. The messages received on the plugin must respect the following pattern:

```js
{
    collection: 'collectionName',
    permissions: ['parseUserId1', 'parseUserId2', 'parseUserIdN']
}
```

#### Front-end API

```js
// TODO: sign in 
// hoodie.parse.authenticate(username, password)
// sign in with Facebook
hoodie.parse.authenticateWithFacebook()
// sync public data from Parse
hoodie.parse.syncPublicCollections(collectionNamesArray)
// sync private data from Parse
hoodie.parse.syncPrivateData(collectionNamesArray)
// sign out
hoodie.parse.deauthenticate()
// access parse front-end API instance
hoodie.parse.Parse
```

#### License

The MIT License (MIT)

Copyright (c) 2015 GlazedSolutions

---
_Source: https://npm.io/package/hoodie-plugin-parse · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
