github - Ember Data 1.0 with none standard json -


i'm looking use json github's issues api ember data.

the problem return json not formatted way ember data wants be. github returns data such.

[    {id: 0, title: 'test'},   {id: 1, title: "ect.."} ] 

where ember data's restadapter expects like:

{ issues: [    {id: 0, title: 'test'},   {id: 1, title: "ect.."} ] } 

i assume based on research need override find , findall methods ds.restadapter

myapp.issue = ds.model.extend({ ... });  myapp.issueadapter = ds.restadapter.extend({   host: 'https://api.github.com/repos/emberjs/ember.js',    find: function(store, type, id) {     ...   },    findall: function(store, type since) {     ...   },  } 

the problem in example if found there few out of data methods , not explain how can pass array out key of "issues"

to honest i'm complete noob , of js on head feel i'm close figuring out. let me know if i'm on right track.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -