feat(types): extend Twitter profile data structures

- Add new fields to Profile struct (IsBlueVerified, MediaCount, etc.)
- Extend legacyUser struct with additional Twitter API fields
- Add new types for extended profile, verification and highlights info
- Update profile parsing to include new metrics
This commit is contained in:
Brendan Playford 2025-01-22 11:05:38 -08:00
parent 152a0a1c2c
commit 7226460e05
No known key found for this signature in database
GPG key ID: 663CFC091C1BDFBD
4 changed files with 131 additions and 66 deletions

View file

@ -14,29 +14,36 @@ var cacheIDs sync.Map
// Profile of twitter user.
type Profile struct {
Avatar string
Banner string
Biography string
Birthday string
FollowersCount int
FollowingCount int
FriendsCount int
IsPrivate bool
IsVerified bool
Joined *time.Time
LikesCount int
ListedCount int
Location string
Name string
PinnedTweetIDs []string
TweetsCount int
URL string
UserID string
Username string
Website string
Sensitive bool
Following bool
FollowedBy bool
Avatar string
Banner string
Biography string
Birthday string
FollowersCount int
FollowingCount int
FriendsCount int
IsPrivate bool
IsVerified bool
IsBlueVerified bool
Joined *time.Time
LikesCount int
ListedCount int
Location string
Name string
PinnedTweetIDs []string
TweetsCount int
URL string
UserID string
Username string
Website string
Sensitive bool
Following bool
FollowedBy bool
MediaCount int
FastFollowersCount int
NormalFollowersCount int
ProfileImageShape string
HasGraduatedAccess bool
CanHighlightTweets bool
}
type user struct {