Class DS.BuildURLMixin
Defined in: | addon/-private/adapters/build-url-mixin.js:6 |
---|---|
Module: | ember-data |
WARNING: This interface is likely to change in order to accomodate https://github.com/emberjs/rfcs/pull/4
Using BuildURLMixin
To use url building, include the mixin when extending an adapter, and call buildURL
where needed. The default behaviour is designed for RESTAdapter.
Example
export default DS.Adapter.extend(BuildURLMixin, { findRecord: function(store, type, id, snapshot) { var url = this.buildURL(type.modelName, id, snapshot, 'findRecord'); return this.ajax(url, 'GET'); } });
Attributes
The host
and namespace
attributes will be used if defined, and are optional.
Methods
- buildURL
- pathForType
- urlForCreateRecord
- urlForDeleteRecord
- urlForFindAll
- urlForFindBelongsTo
- urlForFindHasMany
- urlForFindMany
- urlForFindRecord
- urlForQuery
- urlForQueryRecord
- urlForUpdateRecord
Properties
No documented items
Events
No documented items
© 2020 Yehuda Katz, Tom Dale and Ember.js contributors
Licensed under the MIT License.
https://api.emberjs.com/ember-data/2.18/classes/DS.BuildURLMixin