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

chore(unsplash.avatar): deprecate #1062

Merged
merged 10 commits into from
Jun 16, 2022
12 changes: 11 additions & 1 deletion src/modules/image/providers/unsplash.ts
Original file line number Diff line number Diff line change
@@ -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/`.
Expand Down Expand Up @@ -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
ST-DDT marked this conversation as resolved.
Show resolved Hide resolved
*/
// 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: 'v7.3.0',
until: 'v8.0.0',
ST-DDT marked this conversation as resolved.
Show resolved Hide resolved
});
return this.faker.internet.avatar();
}

Expand Down