@@ -4,7 +4,8 @@ import Library from './Library';
4
4
5
5
export default class Client {
6
6
constructor ( { auth, api = new Particle ( ) } ) {
7
- Object . assign ( this , { auth, api } ) ;
7
+ this . auth = auth ;
8
+ this . api = api ;
8
9
}
9
10
10
11
ready ( ) {
@@ -84,8 +85,9 @@ export default class Client {
84
85
85
86
/**
86
87
* Delete an entire published library
87
- * @param {String } $0.name Name of the library to delete
88
- * @param {String } $0.force Key to force deleting a public library
88
+ * @param {object } params Specific params of the library to delete
89
+ * @param {string } params.name Name of the library to delete
90
+ * @param {string } params.force Key to force deleting a public library
89
91
* @returns {Promise } A promise
90
92
*/
91
93
deleteLibrary ( { name, force } ) {
@@ -117,8 +119,9 @@ export default class Client {
117
119
}
118
120
119
121
/**
120
- * @param {String } $0.deviceId Device ID or Name
121
- * @param {Boolean } $0.signal Signal on or off
122
+ * @param {object } params
123
+ * @param {string } params.deviceId Device ID or Name
124
+ * @param {boolean } params.signal Signal on or off
122
125
* @returns {Promise } A promise
123
126
* @deprecated Will be removed in 6.5
124
127
*/
@@ -156,7 +159,7 @@ export default class Client {
156
159
} , ( ) => { } ) ;
157
160
}
158
161
159
- trackingIdentity ( { full= false , context } = { } ) {
162
+ trackingIdentity ( { full = false , context = undefined } = { } ) {
160
163
return this . api . trackingIdentity ( { full, context, auth : this . auth } )
161
164
. then ( payload => {
162
165
return payload . body ;
0 commit comments