Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add since tags for methods added in Ember Data 1.13 #4454

Merged
merged 1 commit into from
Jul 25, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions addon/-private/system/model/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ var Model = Ember.Object.extend(Ember.Evented, {
});
```

@since 1.13.0
@property hasDirtyAttributes
@type {Boolean}
@readOnly
Expand Down Expand Up @@ -688,6 +689,7 @@ var Model = Ember.Object.extend(Ember.Evented, {
record.get('name'); // 'Untitled Document'
```

@since 1.13.0
@method rollbackAttributes
*/
rollbackAttributes() {
Expand Down
6 changes: 6 additions & 0 deletions addon/-private/system/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,7 @@ Store = Service.extend({

See [peekRecord](#method_peekRecord) to get the cached version of a record.

@since 1.13.0
@method findRecord
@param {String} modelName
@param {(String|Integer)} id
Expand Down Expand Up @@ -877,6 +878,7 @@ Store = Service.extend({
post.get('id'); // 1
```

@since 1.13.0
@method peekRecord
@param {String} modelName
@param {String|Integer} id
Expand Down Expand Up @@ -1068,6 +1070,7 @@ Store = Service.extend({
This method returns a promise, which is resolved with a `RecordArray`
once the server returns.

@since 1.13.0
@method query
@param {String} modelName
@param {any} query an opaque query to be used by the adapter
Expand Down Expand Up @@ -1180,6 +1183,7 @@ Store = Service.extend({
});
```

@since 1.13.0
@method queryRecord
@param {String} modelName
@param {any} query an opaque query to be used by the adapter
Expand Down Expand Up @@ -1342,6 +1346,7 @@ Store = Service.extend({

See [query](#method_query) to only get a subset of records from the server.

@since 1.13.0
@method findAll
@param {String} modelName
@param {Object} options
Expand Down Expand Up @@ -1422,6 +1427,7 @@ Store = Service.extend({
var localPosts = store.peekAll('post');
```

@since 1.13.0
@method peekAll
@param {String} modelName
@return {DS.RecordArray}
Expand Down
4 changes: 4 additions & 0 deletions addon/adapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,7 @@ export default Ember.Object.extend({
By default this hook returns `false`, as most UIs should not block user
interactions while waiting on data update.

@since 1.13.0
@method shouldReloadRecord
@param {DS.Store} store
@param {DS.Snapshot} snapshot
Expand Down Expand Up @@ -560,6 +561,7 @@ export default Ember.Object.extend({
is empty (meaning that there are no records locally available yet),
otherwise it returns `false`.

@since 1.13.0
@method shouldReloadAll
@param {DS.Store} store
@param {DS.SnapshotRecordArray} snapshotRecordArray
Expand Down Expand Up @@ -598,6 +600,7 @@ export default Ember.Object.extend({
By default this hook returns `true` so the data for the record is updated
in the background.

@since 1.13.0
@method shouldBackgroundReloadRecord
@param {DS.Store} store
@param {DS.Snapshot} snapshot
Expand Down Expand Up @@ -636,6 +639,7 @@ export default Ember.Object.extend({
By default this method returns `true`, indicating that a background reload
should always be triggered.

@since 1.13.0
@method shouldBackgroundReloadAll
@param {DS.Store} store
@param {DS.SnapshotRecordArray} snapshotRecordArray
Expand Down
1 change: 1 addition & 0 deletions addon/adapters/json-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import RESTAdapter from "ember-data/adapters/rest";
import isEnabled from 'ember-data/-private/features';

/**
@since 1.13.0
@class JSONAPIAdapter
@constructor
@namespace DS
Expand Down
6 changes: 6 additions & 0 deletions addon/adapters/rest.js
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,7 @@ var RESTAdapter = Adapter.extend(BuildURLMixin, {

This method performs an HTTP `GET` request with the id provided as part of the query string.

@since 1.13.0
@method findRecord
@param {DS.Store} store
@param {DS.Model} type
Expand Down Expand Up @@ -515,6 +516,7 @@ var RESTAdapter = Adapter.extend(BuildURLMixin, {
The `query` argument is a simple JavaScript object that will be passed directly
to the server as parameters.

@since 1.13.0
@method queryRecord
@param {DS.Store} store
@param {DS.Model} type
Expand Down Expand Up @@ -899,6 +901,7 @@ var RESTAdapter = Adapter.extend(BuildURLMixin, {
returned from the server using the serializer's `extractErrors`
method.

@since 1.13.0
@method handleResponse
@param {Number} status
@param {Object} headers
Expand Down Expand Up @@ -940,6 +943,7 @@ var RESTAdapter = Adapter.extend(BuildURLMixin, {
Default `handleResponse` implementation uses this hook to decide if the
response is a success.

@since 1.13.0
@method isSuccess
@param {Number} status
@param {Object} headers
Expand All @@ -954,6 +958,7 @@ var RESTAdapter = Adapter.extend(BuildURLMixin, {
Default `handleResponse` implementation uses this hook to decide if the
response is a an invalid error.

@since 1.13.0
@method isInvalid
@param {Number} status
@param {Object} headers
Expand Down Expand Up @@ -1157,6 +1162,7 @@ var RESTAdapter = Adapter.extend(BuildURLMixin, {
shortenedPayload].join('\n');
},

// @since 2.5.0
buildQuery(snapshot) {
let query = {};

Expand Down
1 change: 1 addition & 0 deletions addon/serializer.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export default Ember.Object.extend({

http://jsonapi.org/format/#document-structure

@since 1.13.0
@method normalizeResponse
@param {DS.Store} store
@param {DS.Model} primaryModelClass
Expand Down
1 change: 1 addition & 0 deletions addon/serializers/json-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ var dasherize = Ember.String.dasherize;

to the format that the Ember Data store expects.

@since 1.13.0
@class JSONAPISerializer
@namespace DS
@extends DS.JSONSerializer
Expand Down
14 changes: 14 additions & 0 deletions addon/serializers/json.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ var JSONSerializer = Serializer.extend({
});
```

@since 1.13.0
@method normalizeResponse
@param {DS.Store} store
@param {DS.Model} primaryModelClass
Expand Down Expand Up @@ -259,6 +260,7 @@ var JSONSerializer = Serializer.extend({
},

/**
@since 1.13.0
@method normalizeFindRecordResponse
@param {DS.Store} store
@param {DS.Model} primaryModelClass
Expand All @@ -272,6 +274,7 @@ var JSONSerializer = Serializer.extend({
},

/**
@since 1.13.0
@method normalizeQueryRecordResponse
@param {DS.Store} store
@param {DS.Model} primaryModelClass
Expand All @@ -285,6 +288,7 @@ var JSONSerializer = Serializer.extend({
},

/**
@since 1.13.0
@method normalizeFindAllResponse
@param {DS.Store} store
@param {DS.Model} primaryModelClass
Expand All @@ -298,6 +302,7 @@ var JSONSerializer = Serializer.extend({
},

/**
@since 1.13.0
@method normalizeFindBelongsToResponse
@param {DS.Store} store
@param {DS.Model} primaryModelClass
Expand All @@ -311,6 +316,7 @@ var JSONSerializer = Serializer.extend({
},

/**
@since 1.13.0
@method normalizeFindHasManyResponse
@param {DS.Store} store
@param {DS.Model} primaryModelClass
Expand All @@ -324,6 +330,7 @@ var JSONSerializer = Serializer.extend({
},

/**
@since 1.13.0
@method normalizeFindManyResponse
@param {DS.Store} store
@param {DS.Model} primaryModelClass
Expand All @@ -337,6 +344,7 @@ var JSONSerializer = Serializer.extend({
},

/**
@since 1.13.0
@method normalizeQueryResponse
@param {DS.Store} store
@param {DS.Model} primaryModelClass
Expand All @@ -350,6 +358,7 @@ var JSONSerializer = Serializer.extend({
},

/**
@since 1.13.0
@method normalizeCreateRecordResponse
@param {DS.Store} store
@param {DS.Model} primaryModelClass
Expand All @@ -363,6 +372,7 @@ var JSONSerializer = Serializer.extend({
},

/**
@since 1.13.0
@method normalizeDeleteRecordResponse
@param {DS.Store} store
@param {DS.Model} primaryModelClass
Expand All @@ -376,6 +386,7 @@ var JSONSerializer = Serializer.extend({
},

/**
@since 1.13.0
@method normalizeUpdateRecordResponse
@param {DS.Store} store
@param {DS.Model} primaryModelClass
Expand All @@ -389,6 +400,7 @@ var JSONSerializer = Serializer.extend({
},

/**
@since 1.13.0
@method normalizeSaveResponse
@param {DS.Store} store
@param {DS.Model} primaryModelClass
Expand All @@ -402,6 +414,7 @@ var JSONSerializer = Serializer.extend({
},

/**
@since 1.13.0
@method normalizeSingleResponse
@param {DS.Store} store
@param {DS.Model} primaryModelClass
Expand All @@ -415,6 +428,7 @@ var JSONSerializer = Serializer.extend({
},

/**
@since 1.13.0
@method normalizeArrayResponse
@param {DS.Store} store
@param {DS.Model} primaryModelClass
Expand Down