DS.RESTAdapter#generatedDetailedMessage()

generatedDetailedMessage (status, headers, payload, requestData) Stringprivate Defined in addon/adapters/rest.js:1126 Generates a detailed ("friendly") error message, with plenty of information for debugging (good luck!) Parameters: status Number headers Object payload Object requestData Object Returns: String detailed error message

DS.RESTAdapter#findRecord()

findRecord (store, type, id, snapshot) Promise Inherited from DS.Adapter but overwritten in addon/adapters/rest.js:406 Available since 1.13.0 Called by the store in order to fetch the JSON for a given type and ID. The findRecord method makes an Ajax request to a URL computed by buildURL, and returns a promise for the resulting payload. This method performs an HTTP GET request with the id provided as part of the query string. Parameters: store DS.Store type DS.Model id String sna

DS.RESTAdapter#findMany()

findMany (store, type, ids, snapshots) Promise Inherited from DS.Adapter but overwritten in addon/adapters/rest.js:548 Called by the store in order to fetch several records together if coalesceFindRequests is true For example, if the original payload looks like: { "id": 1, "title": "Rails is omakase", "comments": [ 1, 2, 3 ] } The IDs will be passed as a URL-encoded Array of IDs, in this form: ids[]=1&ids[]=2&ids[]=3 Many servers, such as Rails and PHP, will automatically co

DS.RESTAdapter#findHasMany()

findHasMany (store, snapshot, url) Promise Defined in addon/adapters/rest.js:595 Called by the store in order to fetch a JSON array for the unloaded records in a has-many relationship that were originally specified as a URL (inside of links). For example, if your original payload looks like this: { "post": { "id": 1, "title": "Rails is omakase", "links": { "comments": "/posts/1/comments" } } } This method will be called with the parent record and /posts/1/comments. The find

DS.RESTAdapter#findBelongsTo()

findBelongsTo (store, snapshot, url) Promise Defined in addon/adapters/rest.js:648 Called by the store in order to fetch the JSON for the unloaded record in a belongs-to relationship that was originally specified as a URL (inside of links). For example, if your original payload looks like this: { "person": { "id": 1, "name": "Tom Dale", "links": { "group": "/people/1/group" } } } This method will be called with the parent record and /people/1/group. The findBelongsTo method

DS.RESTAdapter#findAll()

findAll (store, type, sinceToken, snapshotRecordArray) Promise Inherited from DS.Adapter but overwritten in addon/adapters/rest.js:439 Called by the store in order to fetch a JSON array for all of the records for a given type. The findAll method makes an Ajax (HTTP GET) request to a URL computed by buildURL, and returns a promise for the resulting payload. Parameters: store DS.Store type DS.Model sinceToken String snapshotRecordArray DS.SnapshotRecordArray Returns: Promise

DS.RESTAdapter#deleteRecord()

deleteRecord (store, type, snapshot) Promise Inherited from DS.Adapter but overwritten in addon/adapters/rest.js:772 Called by the store when a record is deleted. The deleteRecord method makes an Ajax (HTTP DELETE) request to a URL computed by buildURL. Parameters: store DS.Store type DS.Model snapshot DS.Snapshot Returns: Promise promise

DS.RESTAdapter#dataForRequest()

dataForRequest (params) Objectpublic Defined in addon/adapters/rest.js:1196 Get the data (body or query params) for a request. Parameters: params Object Returns: Object data

DS.RESTAdapter#createRecord()

createRecord (store, type, snapshot) Promise Inherited from DS.Adapter but overwritten in addon/adapters/rest.js:700 Called by the store when a newly created record is saved via the save method on a model record instance. The createRecord method serializes the record and makes an Ajax (HTTP POST) request to a URL computed by buildURL. See serialize for information on how to customize the serialized form of a record. Parameters: store DS.Store type DS.Model snapshot DS.Snapshot

DS.RESTAdapter#coalesceFindRequests

coalesceFindRequests{boolean} Inherited from DS.Adapter but overwritten in addon/adapters/rest.js:300 By default the RESTAdapter will send each find request coming from a store.find or from accessing a relationship separately to the server. If your server supports passing ids as a query string, you can set coalesceFindRequests to true to coalesce all find requests within a single runloop. For example, if you have an initial payload of: { post: { id: 1, comments: [1, 2] } } By d