diff --git a/accounts.go b/accounts.go index 1e9abb3..56890f6 100644 --- a/accounts.go +++ b/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. diff --git a/mastodon.go b/mastodon.go index 1ca8d6e..68db1ba 100644 --- a/mastodon.go +++ b/mastodon.go @@ -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 }