aboutsummaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorLeyla Jähnig <[email protected]>2022-06-16 19:37:41 +0200
committerGitHub <[email protected]>2022-06-16 17:37:41 +0000
commit86bb94e7368d327ed9c19451672dafc1be983c92 (patch)
treec694d5633fd6aa6056565d6b7227574a9ef76ba9 /src/modules
parent804bf7080ca0f62d6c193cc23af96f5a19b946d9 (diff)
downloadfaker-86bb94e7368d327ed9c19451672dafc1be983c92.tar.xz
faker-86bb94e7368d327ed9c19451672dafc1be983c92.zip
chore(unsplash.avatar): deprecate (#1062)
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/image/providers/unsplash.ts12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/modules/image/providers/unsplash.ts b/src/modules/image/providers/unsplash.ts
index 45bd815c..2b66bca3 100644
--- a/src/modules/image/providers/unsplash.ts
+++ b/src/modules/image/providers/unsplash.ts
@@ -1,4 +1,5 @@
import type { Faker } from '../../..';
+import { deprecated } from '../../../internal/deprecated';
/**
* Module to generate links to random images on `https://source.unsplash.com/`.
@@ -30,12 +31,21 @@ export class Unsplash {
/**
* Returns a random avatar url.
*
+ * @see faker.internet.avatar
+ *
* @example
* faker.internet.avatar()
* // 'https://cloudflare-ipfs.com/ipfs/Qmd3W5DuhgHirLHGVixi6V76LhCkZUz6pnFt5AJBiyvHye/avatar/315.jpg'
+ *
+ * @deprecated
*/
- // TODO ST-DDT 2022-03-11: Deprecate this method as it is duplicate and has nothing to do with unsplash.
avatar(): string {
+ deprecated({
+ deprecated: 'faker.image.unsplash.avatar()',
+ proposed: 'faker.internet.avatar()',
+ since: '7.3',
+ until: '8.0',
+ });
return this.faker.internet.avatar();
}