58 lines
1.5 KiB
Go
58 lines
1.5 KiB
Go
package linkedin
|
|
|
|
type UserInfo struct {
|
|
Id string `json:"id"`
|
|
LocalizedFirstName string `json:"localizedFirstName"`
|
|
LocalizedHeadline string `json:"localizedHeadline"`
|
|
VanityName string `json:"vanityName"`
|
|
LocalizedLastName string `json:"localizedLastName"`
|
|
Firstname UserInfoFirstName `json:"firstName"`
|
|
Lastname UserInfoLastName `json:"lastName"`
|
|
Headline UserInfoHeadline `json:"headline"`
|
|
ProfilePicture UserInfoProfilePicture `json:"profilePicture"`
|
|
}
|
|
|
|
type UserInfoFirstName struct {
|
|
Localized Localized `json:"localized"`
|
|
PreferredLocale PreferredLocale `json:"preferredLocale"`
|
|
}
|
|
|
|
type UserInfoLastName struct {
|
|
Localized Localized `json:"localized"`
|
|
PreferredLocale PreferredLocale `json:"preferredLocale"`
|
|
}
|
|
|
|
type Localized struct {
|
|
EnUS string `json:"en_US"`
|
|
}
|
|
|
|
type PreferredLocale struct {
|
|
Country string `json:"country"`
|
|
Language string `json:"language"`
|
|
}
|
|
|
|
type UserInfoHeadline struct {
|
|
Localized Localized `json:"localized"`
|
|
PreferredLocale PreferredLocale `json:"preferredLocale"`
|
|
}
|
|
|
|
type UserInfoProfilePicture struct {
|
|
DisplayImage string `json:"displayImage"`
|
|
}
|
|
|
|
func (u UserInfo) ID() string {
|
|
return u.Id
|
|
}
|
|
|
|
func (u UserInfo) Email() string {
|
|
return ""
|
|
}
|
|
|
|
func (u UserInfo) FirstName() string {
|
|
return u.Firstname.Localized.EnUS
|
|
}
|
|
|
|
func (u UserInfo) LastName() string {
|
|
return u.Lastname.Localized.EnUS
|
|
}
|