Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9f319da

Browse files
committed
add downloadManufacturingBackup command to wrap api-service method
1 parent ce5a38f commit 9f319da

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/Particle.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1717,6 +1717,26 @@ class Particle {
17171717
});
17181718
}
17191719

1720+
/**
1721+
* Download a tachyon manufacturing backup files
1722+
* @param {Object} options Options for this API call
1723+
* @param {Number} options.deviceId Device ID
1724+
* @param {String} [options.auth] The access token. Can be ignored if provided in constructor
1725+
* @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
1726+
* @param {Object} [options.context] Request context
1727+
* @returns {Promise<RequestResponse, RequestError>} A promise with a zip file that contains all manufacturing backup files for the specific device.
1728+
*/
1729+
downloadManufacturingBackup({ deviceId, auth, headers, context }) {
1730+
return this.request({
1731+
uri:`/v1/devices/${deviceId}/backup_files`,
1732+
method: 'put',
1733+
auth,
1734+
headers,
1735+
context,
1736+
isBuffer: true
1737+
});
1738+
}
1739+
17201740
/**
17211741
* Release a product firmware version as the default version
17221742
* @param {Object} options Options for this API call

0 commit comments

Comments
 (0)