add following & followed by to profile
This commit is contained in:
parent
cf6de782e0
commit
5dee67c2da
3 changed files with 5 additions and 0 deletions
|
|
@ -34,6 +34,8 @@ type Profile struct {
|
|||
Username string
|
||||
Website string
|
||||
Sensitive bool
|
||||
Following bool
|
||||
FollowedBy bool
|
||||
}
|
||||
|
||||
type user struct {
|
||||
|
|
|
|||
1
types.go
1
types.go
|
|
@ -171,6 +171,7 @@ type (
|
|||
}
|
||||
|
||||
legacyUserV2 struct {
|
||||
FollowedBy bool `json:"followed_by"`
|
||||
Following bool `json:"following"`
|
||||
CanDm bool `json:"can_dm"`
|
||||
CanMediaTag bool `json:"can_media_tag"`
|
||||
|
|
|
|||
2
util.go
2
util.go
|
|
@ -387,6 +387,8 @@ func parseProfileV2(user userResult) Profile {
|
|||
UserID: user.ID,
|
||||
Username: u.ScreenName,
|
||||
Sensitive: u.PossiblySensitive,
|
||||
Following: u.Following,
|
||||
FollowedBy: u.FollowedBy,
|
||||
}
|
||||
|
||||
tm, err := time.Parse(time.RubyDate, u.CreatedAt)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue