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.
- Provides the translation of objectId to id for identity mapping.
- Provides encoding of hasMany associations to arrays of Parse Pointer objects.
- Implements the persistence layer to Parse by extending the Ember Data REST Adapter.
- Provides a
sessionToken
property which can set a session token.
- Login
- Signup
- Request password reset
- Is stored at the special user endpoint at parse
- Provides transforms for file, geo, and date types at Parse.
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})
});
git clone
this repositorynpm install
bower install
ember server
- View the demo at http://localhost:4200
For more information on using ember-cli, visit http://www.ember-cli.com/.
- Bring back relationships via Parse relation type?
- Bytes type?
- Parse Roles implementation.
- Parse ACL implementation.
ember install:addon ember-parse-adapter