Class BuildURLMixin
public
Defined in:
../adapter/src/-private/build-url-mixin.ts:120
Module:
@ember-data/adapter
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
import Adapter, { BuildURLMixin } from '@ember-data/adapter';
export default class ApplicationAdapter extends Adapter.extend(BuildURLMixin) {
findRecord(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