Add missing fields in Account.
See https://github.com/tootsuite/documentation/blob/master/Using-the-API/API.md#account Also fixes a spurious pagination-related error.
This commit is contained in:
parent
48920165ef
commit
61705d1f2b
11
accounts.go
11
accounts.go
|
@ -25,6 +25,17 @@ type Account struct {
|
|||
AvatarStatic string `json:"avatar_static"`
|
||||
Header string `json:"header"`
|
||||
HeaderStatic string `json:"header_static"`
|
||||
Emojis []Emoji `json:"emojis"`
|
||||
Moved *Account `json:"moved"`
|
||||
Fields []Field `json:"fields"`
|
||||
Bot bool `json:"bot"`
|
||||
}
|
||||
|
||||
// Field is a Mastodon account profile field.
|
||||
type Field struct {
|
||||
Name string `json:"name"`
|
||||
Value string `json:"value"`
|
||||
VerifiedAt time.Time `json:"verified_at"`
|
||||
}
|
||||
|
||||
// GetAccount return Account.
|
||||
|
|
|
@ -258,7 +258,12 @@ func getPaginationID(rawurl, key string) (ID, error) {
|
|||
return "", err
|
||||
}
|
||||
|
||||
id, err := strconv.ParseInt(u.Query().Get(key), 10, 64)
|
||||
val := u.Query().Get(key)
|
||||
if val == "" {
|
||||
return "", nil
|
||||
}
|
||||
|
||||
id, err := strconv.ParseInt(val, 10, 64)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user