Created
June 20, 2014 21:45
-
-
Save ziad-saab/4f2ec20cd693330e1f78 to your computer and use it in GitHub Desktop.
Parse.com and ExtJS 5 base model
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ext.define('MyApp.model.Base', { | |
extend: 'Ext.data.Model', | |
fields: [ | |
{ | |
name: 'objectId', | |
type: 'string' | |
} | |
], | |
schema: { | |
namespace: 'MyApp.model', | |
proxy: { | |
type: 'rest', | |
url: 'https://api.parse.com/1/classes/{entityName}', | |
reader: { | |
type: 'json', | |
rootProperty: 'results' | |
}, | |
headers: { | |
'X-Parse-Application-Id': 'XXX', | |
'X-Parse-REST-API-Key': 'XXX' | |
} | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment