Embed legacy user type
This commit is contained in:
parent
a8089a552e
commit
d50bd429d2
2 changed files with 25 additions and 28 deletions
26
api.go
26
api.go
|
|
@ -15,7 +15,31 @@ type user struct {
|
||||||
Data struct {
|
Data struct {
|
||||||
User struct {
|
User struct {
|
||||||
RestID string `json:"rest_id"`
|
RestID string `json:"rest_id"`
|
||||||
Legacy User `json:"legacy"`
|
Legacy struct {
|
||||||
|
CreatedAt string `json:"created_at"`
|
||||||
|
Description string `json:"description"`
|
||||||
|
Entities struct {
|
||||||
|
URL struct {
|
||||||
|
Urls []struct {
|
||||||
|
ExpandedURL string `json:"expanded_url"`
|
||||||
|
} `json:"urls"`
|
||||||
|
} `json:"url"`
|
||||||
|
} `json:"entities"`
|
||||||
|
FavouritesCount int `json:"favourites_count"`
|
||||||
|
FollowersCount int `json:"followers_count"`
|
||||||
|
FriendsCount int `json:"friends_count"`
|
||||||
|
IDStr string `json:"id_str"`
|
||||||
|
ListedCount int `json:"listed_count"`
|
||||||
|
Name string `json:"name"`
|
||||||
|
Location string `json:"location"`
|
||||||
|
PinnedTweetIdsStr []string `json:"pinned_tweet_ids_str"`
|
||||||
|
ProfileBannerURL string `json:"profile_banner_url"`
|
||||||
|
ProfileImageURLHTTPS string `json:"profile_image_url_https"`
|
||||||
|
Protected bool `json:"protected"`
|
||||||
|
ScreenName string `json:"screen_name"`
|
||||||
|
StatusesCount int `json:"statuses_count"`
|
||||||
|
Verified bool `json:"verified"`
|
||||||
|
} `json:"legacy"`
|
||||||
} `json:"user"`
|
} `json:"user"`
|
||||||
} `json:"data"`
|
} `json:"data"`
|
||||||
Errors []struct {
|
Errors []struct {
|
||||||
|
|
|
||||||
27
types.go
27
types.go
|
|
@ -39,33 +39,6 @@ type (
|
||||||
Error error
|
Error error
|
||||||
}
|
}
|
||||||
|
|
||||||
// User type.
|
|
||||||
User struct {
|
|
||||||
CreatedAt string `json:"created_at"`
|
|
||||||
Description string `json:"description"`
|
|
||||||
Entities struct {
|
|
||||||
URL struct {
|
|
||||||
Urls []struct {
|
|
||||||
ExpandedURL string `json:"expanded_url"`
|
|
||||||
} `json:"urls"`
|
|
||||||
} `json:"url"`
|
|
||||||
} `json:"entities"`
|
|
||||||
FavouritesCount int `json:"favourites_count"`
|
|
||||||
FollowersCount int `json:"followers_count"`
|
|
||||||
FriendsCount int `json:"friends_count"`
|
|
||||||
IDStr string `json:"id_str"`
|
|
||||||
ListedCount int `json:"listed_count"`
|
|
||||||
Name string `json:"name"`
|
|
||||||
Location string `json:"location"`
|
|
||||||
PinnedTweetIdsStr []string `json:"pinned_tweet_ids_str"`
|
|
||||||
ProfileBannerURL string `json:"profile_banner_url"`
|
|
||||||
ProfileImageURLHTTPS string `json:"profile_image_url_https"`
|
|
||||||
Protected bool `json:"protected"`
|
|
||||||
ScreenName string `json:"screen_name"`
|
|
||||||
StatusesCount int `json:"statuses_count"`
|
|
||||||
Verified bool `json:"verified"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// timeline JSON
|
// timeline JSON
|
||||||
timeline struct {
|
timeline struct {
|
||||||
GlobalObjects struct {
|
GlobalObjects struct {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue