diff --git a/src/api/user.ts b/src/api/user.ts index 6d03c36..7cbc488 100644 --- a/src/api/user.ts +++ b/src/api/user.ts @@ -21,6 +21,7 @@ const populateUserProperties = async ( apiUser.screen_name = user.legacy.screen_name; apiUser.description = user.legacy.description; apiUser.location = user.legacy.location; + /* if (user.is_blue_verified) { apiUser.verified = 'blue'; } else if (user.legacy.verified) { @@ -32,9 +33,11 @@ const populateUserProperties = async ( apiUser.verified = 'legacy'; } } + if (apiUser.verified === 'government') { apiUser.verified_label = user.affiliates_highlighted_label?.label?.description || ''; } + */ apiUser.avatar_url = user.legacy.profile_image_url_https; apiUser.joined = user.legacy.created_at; if (user.legacy_extended_profile?.birthdate) { diff --git a/src/types/types.d.ts b/src/types/types.d.ts index cb995bf..6582f02 100644 --- a/src/types/types.d.ts +++ b/src/types/types.d.ts @@ -155,8 +155,8 @@ interface APIUser extends BaseUser { location: string; url: string; protected: boolean; - verified: 'legacy' | 'blue'| 'business' | 'government'; - verified_label: string; + // verified: 'legacy' | 'blue'| 'business' | 'government'; + // verified_label: string; followers: number; following: number; tweets: number; diff --git a/test/index.test.ts b/test/index.test.ts index a05da47..44ab781 100644 --- a/test/index.test.ts +++ b/test/index.test.ts @@ -264,7 +264,7 @@ test('API fetch user', async () => { // The official twitter account will never be following as many people as it has followers expect(user.following).not.toEqual(user.followers); expect(user.likes).toEqual(expect.any(Number)); - expect(user.verified).toEqual('business'); + // expect(user.verified).toEqual('business'); expect(user.joined).toEqual('Tue Feb 20 14:35:54 +0000 2007'); expect(user.birthday.day).toEqual(21); expect(user.birthday.month).toEqual(3);