From 4d442f2d81d211a556e6c5079c3280a22129f88f Mon Sep 17 00:00:00 2001 From: Tee Date: Mon, 22 Mar 2021 22:23:14 -0400 Subject: [PATCH] Add card method deprication notices --- src/classes/card.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/classes/card.ts b/src/classes/card.ts index 08c6f14..78ffdf0 100644 --- a/src/classes/card.ts +++ b/src/classes/card.ts @@ -42,6 +42,9 @@ export class Card implements ICard { return "cards"; } + /** + * @deprecated `Card.find` is renamed to `findCardById` 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 { return QueryBuilder.find(this, id) .then((response) => { @@ -50,6 +53,9 @@ export class Card implements ICard { .catch((error) => Promise.reject(error)); } + /** + * @deprecated `Card.all` is renamed to `getAllCards` 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 { return QueryBuilder.all(this) .then((response) => { @@ -58,6 +64,9 @@ export class Card implements ICard { .catch((error) => Promise.reject(error)); } + /** + * @deprecated `Card.where` is renamed to `findCardsByQueries` 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 { return QueryBuilder.where(this, params) .then((response) => {