Skip to content

Commit 188074f

Browse files
authored
Remove Backbone options documentation (parse-community#1239)
Old backbone styles (options.success, options.errors) are only used in linkWith authentication and object.set validation now.
1 parent 13b47ca commit 188074f

File tree

4 files changed

+2
-46
lines changed

4 files changed

+2
-46
lines changed

src/ParseGeoPoint.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,6 @@ class ParseGeoPoint {
195195

196196
/**
197197
* Creates a GeoPoint with the user's current location, if available.
198-
* Calls options.success with a new GeoPoint instance or calls options.error.
199198
* @static
200199
*/
201200
static current() {

src/ParseObject.js

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1237,26 +1237,9 @@ class ParseObject {
12371237
options = arg3;
12381238
}
12391239

1240-
// TODO: safely remove me
1241-
// Support save({ success: function() {}, error: function() {} })
1242-
if (!options && attrs) {
1243-
options = {};
1244-
if (typeof attrs.success === 'function') {
1245-
options.success = attrs.success;
1246-
delete attrs.success;
1247-
}
1248-
if (typeof attrs.error === 'function') {
1249-
options.error = attrs.error;
1250-
delete attrs.error;
1251-
}
1252-
}
1253-
12541240
if (attrs) {
12551241
const validation = this.validate(attrs);
12561242
if (validation) {
1257-
if (options && typeof options.error === 'function') {
1258-
options.error(this, validation);
1259-
}
12601243
return Promise.reject(validation);
12611244
}
12621245
this.set(attrs, options);

src/ParseQuery.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -554,8 +554,7 @@ class ParseQuery {
554554

555555
/**
556556
* Constructs a Parse.Object whose id is already known by fetching data from
557-
* the server. Either options.success or options.error is called when the
558-
* find completes. Unlike the <code>first</code> method, it never returns undefined.
557+
* the server. Unlike the <code>first</code> method, it never returns undefined.
559558
*
560559
* @param {String} objectId The id of the object to be fetched.
561560
* @param {Object} options
@@ -599,8 +598,6 @@ class ParseQuery {
599598

600599
/**
601600
* Retrieves a list of ParseObjects that satisfy this query.
602-
* Either options.success or options.error is called when the find
603-
* completes.
604601
*
605602
* @param {Object} options Valid options
606603
* are:<ul>
@@ -697,8 +694,6 @@ class ParseQuery {
697694

698695
/**
699696
* Counts the number of objects that match this query.
700-
* Either options.success or options.error is called when the count
701-
* completes.
702697
*
703698
* @param {Object} options
704699
* Valid options are:<ul>
@@ -826,8 +821,7 @@ class ParseQuery {
826821
/**
827822
* Retrieves at most one Parse.Object that satisfies this query.
828823
*
829-
* Either options.success or options.error is called when it completes.
830-
* success is passed the object if there is one. otherwise, undefined.
824+
* Returns the object if there is one, otherwise undefined.
831825
*
832826
* @param {Object} options Valid options are:<ul>
833827
* <li>useMasterKey: In Cloud Code and Node only, causes the Master Key to

src/ParseUser.js

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -398,9 +398,6 @@ class ParseUser extends ParseObject {
398398
*
399399
* <p>A username and password must be set before calling signUp.</p>
400400
*
401-
* <p>Calls options.success or options.error on completion.</p>
402-
*
403-
404401
* @param {Object} attrs Extra fields to set on the new user, or null.
405402
* @param {Object} options
406403
* @return {Promise} A promise that is fulfilled when the signup
@@ -432,9 +429,6 @@ class ParseUser extends ParseObject {
432429
*
433430
* <p>A username and password must be set before calling logIn.</p>
434431
*
435-
* <p>Calls options.success or options.error on completion.</p>
436-
*
437-
438432
* @param {Object} options
439433
* @return {Promise} A promise that is fulfilled with the user when
440434
* the login is complete.
@@ -601,9 +595,6 @@ class ParseUser extends ParseObject {
601595
* session in localStorage so that you can access the user using
602596
* {@link #current}.
603597
*
604-
* <p>Calls options.success or options.error on completion.</p>
605-
*
606-
607598
* @param {String} username The username (or email) to sign up with.
608599
* @param {String} password The password to sign up with.
609600
* @param {Object} attrs Extra fields to set on the new user.
@@ -625,9 +616,6 @@ class ParseUser extends ParseObject {
625616
* saves the session to disk, so you can retrieve the currently logged in
626617
* user using <code>current</code>.
627618
*
628-
* <p>Calls options.success or options.error on completion.</p>
629-
*
630-
631619
* @param {String} username The username (or email) to log in with.
632620
* @param {String} password The password to log in with.
633621
* @param {Object} options
@@ -661,9 +649,6 @@ class ParseUser extends ParseObject {
661649
* to disk, so you can retrieve the currently logged in user using
662650
* <code>current</code>.
663651
*
664-
* <p>Calls options.success or options.error on completion.</p>
665-
*
666-
667652
* @param {String} sessionToken The sessionToken to log in with.
668653
* @param {Object} options
669654
* @static
@@ -755,9 +740,6 @@ class ParseUser extends ParseObject {
755740
* associated with the user account. This email allows the user to securely
756741
* reset their password on the Parse site.
757742
*
758-
* <p>Calls options.success or options.error on completion.</p>
759-
*
760-
761743
* @param {String} email The email address associated with the user that
762744
* forgot their password.
763745
* @param {Object} options
@@ -781,8 +763,6 @@ class ParseUser extends ParseObject {
781763
/**
782764
* Request an email verification.
783765
*
784-
* <p>Calls options.success or options.error on completion.</p>
785-
*
786766
* @param {String} email The email address associated with the user that
787767
* forgot their password.
788768
* @param {Object} options

0 commit comments

Comments
 (0)