Add set deprication noticess

This commit is contained in:
Tee
2021-03-22 22:23:29 -04:00
parent 4d442f2d81
commit c5d48dba11

View File

@ -20,6 +20,9 @@ export class Set implements ISet {
return 'sets';
}
/**
* @deprecated `Set.find` is renamed to `findSetById` in version 2. See the **[migration guide](https://github.com/acupoftee/pokemon-tcg-sdk-typescript/blob/master/MIGRATING.md)** for more info.
*/
static async find(id: string): Promise<Set> {
return QueryBuilder.find(this, id)
.then(response => {
@ -28,6 +31,9 @@ export class Set implements ISet {
.catch(error => Promise.reject(error));
}
/**
* @deprecated `Set.all` is renamed to `getAllSets` in version 2. See the **[migration guide](https://github.com/acupoftee/pokemon-tcg-sdk-typescript/blob/master/MIGRATING.md)** for more info.
*/
static async all(): Promise<Set[]> {
return QueryBuilder.all(this)
.then(response => {
@ -36,6 +42,9 @@ export class Set implements ISet {
.catch(error => Promise.reject(error));
}
/**
* @deprecated `Set.where` is renamed to `findSetsByQueries` in version 2. See the **[migration guide](https://github.com/acupoftee/pokemon-tcg-sdk-typescript/blob/master/MIGRATING.md)** for more info.
*/
static async where(params: IQuery[]): Promise<Set[]> {
return QueryBuilder.where(this, params)
.then(response => {
@ -43,4 +52,4 @@ export class Set implements ISet {
})
.catch(error => Promise.reject(error));
}
}
}