Create UserHandle type
This commit is contained in:
parent
90e5fdb8b1
commit
74ef2e4193
@ -6,11 +6,12 @@ import (
|
||||
)
|
||||
|
||||
type UserID string
|
||||
type UserHandle string
|
||||
|
||||
type User struct {
|
||||
ID UserID
|
||||
DisplayName string
|
||||
Handle string
|
||||
Handle UserHandle
|
||||
Bio string
|
||||
FollowingCount int
|
||||
FollowersCount int
|
||||
@ -32,7 +33,7 @@ func (u User) String() string {
|
||||
func ParseSingleUser(apiUser APIUser) (ret User, err error) {
|
||||
ret.ID = UserID(apiUser.IDStr)
|
||||
ret.DisplayName = apiUser.Name
|
||||
ret.Handle = apiUser.ScreenName
|
||||
ret.Handle = UserHandle(apiUser.ScreenName)
|
||||
ret.Bio = apiUser.Description
|
||||
ret.FollowingCount = apiUser.FriendsCount
|
||||
ret.FollowersCount = apiUser.FollowersCount
|
||||
|
Loading…
x
Reference in New Issue
Block a user