Skip to content
Snippets Groups Projects
_baseAdapter.js 1017 B
Newer Older
Mathis Neumann's avatar
Mathis Neumann committed
/**
 * Adapters will automatically be used for API/EmberData interaction, using adapters which
 * are have the same name as the model, with a fallback to Application adapter
 * @module adapters
 */
import Ember from 'ember';
import RESTAdapter from 'ember-data/adapters/rest';
Mathis Neumann's avatar
Mathis Neumann committed
// import FixtureAdapter from 'ember-data-fixture-adapter';
import ENV from 'iobserve-ui/config/environment';
Mathis Neumann's avatar
Mathis Neumann committed
/**
 * basic adapter for non-system based APIs (currently just System)
 *
 * @class BaseAdapter
 * @extends DS.RESTAdapter
 */
Mathis Neumann's avatar
Mathis Neumann committed
export default RESTAdapter.extend({
Mathis Neumann's avatar
Mathis Neumann committed
    /**
     * the hostname of the api
     *
     * @property host
     * @type {String}
     */
Mathis Neumann's avatar
Mathis Neumann committed

    /**
     * the namespace is a path prefix, used as a version prefix

     * @property host
     * @type {String}
     * @default v1
     */
    namespace: 'v1',
Mathis Neumann's avatar
Mathis Neumann committed

    /**
     * the injected session which stores the system id

     * @property host
     * @type {Session}
     * @readonly
     */
    session: Ember.inject.service()
});