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:
parent
152a0a1c2c
commit
7226460e05
4 changed files with 131 additions and 66 deletions
53
profile.go
53
profile.go
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue