DS.BuildURLMixin#urlForUpdateRecord()

urlForUpdateRecord (id, modelName, snapshot) String Defined in addon/-private/adapters/build-url-mixin.js:323 Builds a URL for a record.save() call when the record has been update locally. Example: app/adapters/application.js import DS from 'ember-data'; export default DS.RESTAdapter.extend({ urlForUpdateRecord(id, modelName, snapshot) { return `/${id}/feed?access_token=${snapshot.adapterOptions.token}`; } }); Parameters: id String modelName String snapshot DS.Snapshot

DS.ConflictError

DS.ConflictError Class Defined in: addon/adapters/errors.js:154 Module: ember-data

DS.BuildURLMixin#_buildURL()

_buildURL (modelName, id) Stringprivate Defined in addon/-private/adapters/build-url-mixin.js:81 Parameters: modelName String id String Returns: String url

DS.BuildURLMixin#urlPrefix()

urlPrefix (path, parentURL) Stringprivate Defined in addon/-private/adapters/build-url-mixin.js:373 Parameters: path String parentURL String Returns: String urlPrefix

DS.BuildURLMixin#urlForQueryRecord()

urlForQueryRecord (query, modelName) String Defined in addon/-private/adapters/build-url-mixin.js:191 Builds a URL for a store.queryRecord(type, query) call. Example: app/adapters/application.js import DS from 'ember-data'; export default DS.RESTAdapter.extend({ urlForQueryRecord({ slug }, modelName) { let baseUrl = this.buildURL(); return `${baseUrl}/${encodeURIComponent(slug)}`; } }); Parameters: query Object modelName String Returns: String url

DS.BuildURLMixin#urlForFindRecord()

urlForFindRecord (id, modelName, snapshot) String Defined in addon/-private/adapters/build-url-mixin.js:110 Builds a URL for a store.findRecord(type, id) call. Example: app/adapters/user.js import DS from 'ember-data'; export default DS.JSONAPIAdapter.extend({ urlForFindRecord(id, modelName, snapshot) { let baseUrl = this.buildURL(); return `${baseUrl}/users/${snapshot.adapterOptions.user_id}/playlists/${id}`; } }); Parameters: id String modelName String snapshot DS.S

DS.BuildURLMixin#urlForQuery()

urlForQuery (query, modelName) String Defined in addon/-private/adapters/build-url-mixin.js:161 Builds a URL for a store.query(type, query) call. Example: app/adapters/application.js import DS from 'ember-data'; export default DS.RESTAdapter.extend({ host: 'https://api.github.com', urlForQuery (query, modelName) { switch(modelName) { case 'repo': return `https://api.github.com/orgs/${query.orgId}/repos`; default: return this._super(...arguments); }

DS.BuildURLMixin#urlForFindMany()

urlForFindMany (ids, modelName, snapshots) String Defined in addon/-private/adapters/build-url-mixin.js:216 Builds a URL for coalesceing multiple store.findRecord(type, id) records into 1 request when the adapter'scoalesceFindRequests` property is true. Example: app/adapters/application.js import DS from 'ember-data'; export default DS.RESTAdapter.extend({ urlForFindMany(ids, modelName) { let baseUrl = this.buildURL(); return `${baseUrl}/coalesce`; } }); Parameters: ids Arr

DS.BuildURLMixin#urlForFindAll()

urlForFindAll (modelName, snapshot) String Defined in addon/-private/adapters/build-url-mixin.js:137 Builds a URL for a store.findAll(type) call. Example: app/adapters/comment.js import DS from 'ember-data'; export default DS.JSONAPIAdapter.extend({ urlForFindAll(id, modelName, snapshot) { return 'data/comments.json'; } }); Parameters: modelName String snapshot DS.SnapshotRecordArray Returns: String url

DS.BuildURLMixin#urlForFindBelongsTo()

urlForFindBelongsTo (id, modelName, snapshot) String Defined in addon/-private/adapters/build-url-mixin.js:271 Builds a URL for fetching a async belongsTo relationship when a url is not provided by the server. Example: app/adapters/application.js import DS from 'ember-data'; export default DS.JSONAPIAdapter.extend({ urlForFindBelongsTo(id, modelName, snapshot) { let baseUrl = this.buildURL(id, modelName); return `${baseUrl}/relationships`; } }); Parameters: id String mod