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

remove deprecated functions #190

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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
22 changes: 0 additions & 22 deletions src/Client.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,28 +136,6 @@ class Client {
return this.api.listDevices({ auth: this.auth });
}

/**
* @returns {Promise} A promise
* @deprecated Will be removed in 6.5
*/
listBuildTargets(){
return this.api.listBuildTargets({ onlyFeatured: true, auth: this.auth })
.then(payload => {
let targets = [];
for (let target of payload.body.targets){
for (let platform of target.platforms){
targets.push({
version: target.version,
platform: platform,
prerelease: target.prereleases.indexOf(platform) > -1,
firmware_vendor: target.firmware_vendor
});
}
}
return targets;
}, () => {});
}

trackingIdentity({ full = false, context = undefined }={}){
return this.api.trackingIdentity({ full, context, auth: this.auth })
.then(payload => {
Expand Down
48 changes: 0 additions & 48 deletions test/Client.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,54 +145,6 @@ describe('Client', () => {
});
});

describe('listBuildTargets', () => {
it('delegates to api', () => {
const response = {
targets: [
{
platforms: [0, 6],
prereleases: [],
version: '1.2.3',
firmware_vendor: 'Foo'
}, {
platforms: [6, 8],
prereleases: [6],
version: '4.5.6',
firmware_vendor: 'Bar'
}
]
};
const expected = [
{
version: '1.2.3',
platform: 0,
prerelease: false,
firmware_vendor: 'Foo'
}, {
version: '1.2.3',
platform: 6,
prerelease: false,

firmware_vendor: 'Foo'
}, {
version: '4.5.6',
platform: 6,
prerelease: true,
firmware_vendor: 'Bar'
}, {
version: '4.5.6',
platform: 8,
prerelease: false,
firmware_vendor: 'Bar'
},
];
api.listBuildTargets = () => {
return Promise.resolve({ body: response });
};
return expect(client.listBuildTargets()).to.eventually.eql(expected);
});
});

describe('trackingIdentity', () => {
it('delegates to api and unpacks the body', () => {
api.trackingIdentity = ({ auth, full, context }) => {
Expand Down