Skip to content
An Ember Data Adapter for Parse
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
addon
app Convert to EmberCLI 0.1.15 Addon Mar 15, 2015
config Convert to EmberCLI 0.1.15 Addon Mar 15, 2015
tests Convert to EmberCLI 0.1.15 Addon Mar 15, 2015
vendor Convert to EmberCLI 0.1.15 Addon Mar 15, 2015
.bowerrc Convert to EmberCLI 0.1.15 Addon Mar 15, 2015
.editorconfig
.ember-cli Convert to EmberCLI 0.1.15 Addon Mar 15, 2015
.gitignore Convert to EmberCLI 0.1.15 Addon Mar 15, 2015
.jshintrc Convert to EmberCLI 0.1.15 Addon Mar 15, 2015
.npmignore Convert to EmberCLI 0.1.15 Addon Mar 15, 2015
.travis.yml Convert to EmberCLI 0.1.15 Addon Mar 15, 2015
Brocfile.js Convert to EmberCLI 0.1.15 Addon Mar 15, 2015
LICENSE.md Convert to EmberCLI 0.1.15 Addon Mar 15, 2015
README.md Add security warning to readme Jul 11, 2015
bower.json
index.js Convert to EmberCLI 0.1.15 Addon Mar 15, 2015
package.json Upgrade to ember-cli 0.2.7 Jul 5, 2015
testem.json Convert to EmberCLI 0.1.15 Addon Mar 15, 2015

README.md

Ember Data Adapter for Parse Build Status

An Ember Data plugin built to use the Parse REST API. This is a full Ember implementation against the Parse REST API without the use of the Parse JavaScript SDK.

The demo application contains some example usage.

Features

EmberParseAdapter.Serializer
  • Provides the translation of objectId to id for identity mapping.
  • Provides encoding of hasMany associations to arrays of Parse Pointer objects.
EmberParseAdapter.Adapter
  • Implements the persistence layer to Parse by extending the Ember Data REST Adapter.
  • Provides a sessionToken property which can set a session token.
EmberParseAdapter.ParseUser
  • Login
  • Signup
  • Request password reset
  • Is stored at the special user endpoint at parse
EmberParseAdapter.Transforms
  • Provides transforms for file, geo, and date types at Parse.

Get Started

You'll want to get an account at Parse. After this you will be provided with two keys:

  • Application ID
  • REST API Key

You will need each of these to configure the ParseAdapter via entries in the config/environment.js file:

var ENV = {
  ...

  APP: {
    applicationId: '<YOUR APP ID HERE>',
    restApiId: '<YOUR REST API KEY HERE>'
  }
};

Any model using this adapter will be stored on Parse. Create models as you would normally:

App.Post = DS.Model.extend({
  // Attributes can use normal transforms
  title: DS.attr('string'),
  body: DS.attr('string'),
  // Or there are special transforms for some data-types
  avatar: DS.attr('parse-file'),
  // There is a parse-date transform, but sometimes dates are just strings
  updatedAt: DS.attr('date'),
  // ALWAYS refer to relationships as async, for now.
  user: DS.belongsTo('user', {async: true})
});

Security Warning

Before publishing your app you should disable REST Push. Parse apps are created with this feature enabled by default. If this feature is enabled anyone with your Application ID and REST API Key will be able to send push notifications to your user's devices. Anyone using your app has access your Application ID and REST API Key.

To disable REST Push:

  • Login to your Parse account.
  • Click on your application.
  • Go to Settings > Push.
  • And disable REST Push.
  • It should look like the image below.

Demo

Installation

  • git clone this repository
  • npm install
  • bower install

Running

For more information on using ember-cli, visit http://www.ember-cli.com/.

Roadmap

  • Bring back relationships via Parse relation type?
  • Bytes type?
  • Parse Roles implementation.
  • Parse ACL implementation.

How to use this addon in your application

ember install:addon ember-parse-adapter
You can’t perform that action at this time.