2019-05-09 14:33:26 +00:00
|
|
|
// Package accounts is telephant's account "plugin" system.
|
2017-08-29 05:09:17 +00:00
|
|
|
package accounts
|
|
|
|
|
|
|
|
import "time"
|
|
|
|
|
|
|
|
// Post represents a message.
|
|
|
|
type Post struct {
|
2019-05-01 15:15:56 +00:00
|
|
|
MessageID string
|
2017-08-29 05:09:17 +00:00
|
|
|
Body string
|
|
|
|
Author string
|
2019-05-02 07:23:11 +00:00
|
|
|
AuthorURL string
|
2017-08-29 05:09:17 +00:00
|
|
|
AuthorName string
|
2019-05-06 18:16:20 +00:00
|
|
|
AuthorID string
|
2017-08-29 05:09:17 +00:00
|
|
|
Actor string
|
|
|
|
ActorName string
|
2019-05-10 14:47:26 +00:00
|
|
|
ActorID string
|
2019-05-01 15:15:56 +00:00
|
|
|
ReplyToID string
|
2017-08-29 05:09:17 +00:00
|
|
|
ReplyToAuthor string
|
|
|
|
Avatar string
|
|
|
|
URL string
|
|
|
|
CreatedAt time.Time
|
2019-05-06 20:50:38 +00:00
|
|
|
Liked bool
|
|
|
|
Shared bool
|
2017-08-29 05:09:17 +00:00
|
|
|
}
|
|
|
|
|
2019-05-11 00:48:54 +00:00
|
|
|
// Follow describes an incoming follow event.
|
2019-05-09 01:45:07 +00:00
|
|
|
type Follow struct {
|
|
|
|
Account string
|
|
|
|
Name string
|
|
|
|
Avatar string
|
|
|
|
ProfileURL string
|
|
|
|
ProfileID string
|
|
|
|
Following bool
|
|
|
|
FollowedBy bool
|
|
|
|
}
|
|
|
|
|
2019-05-11 00:48:54 +00:00
|
|
|
// Media describes a media item.
|
2019-05-09 02:29:48 +00:00
|
|
|
type Media struct {
|
|
|
|
Preview string
|
|
|
|
URL string
|
|
|
|
}
|
|
|
|
|
2017-08-29 05:09:17 +00:00
|
|
|
// MessageEvent describes an incoming message event.
|
|
|
|
type MessageEvent struct {
|
|
|
|
Account string
|
|
|
|
Name string
|
|
|
|
Reply bool
|
|
|
|
Forward bool
|
|
|
|
Mention bool
|
|
|
|
Like bool
|
2019-05-09 01:45:07 +00:00
|
|
|
Followed bool
|
2017-08-29 05:09:17 +00:00
|
|
|
Notification bool
|
|
|
|
Post Post
|
2019-05-09 01:45:07 +00:00
|
|
|
Follow Follow
|
2019-05-09 02:29:48 +00:00
|
|
|
Media []Media
|
2017-08-29 05:09:17 +00:00
|
|
|
}
|
|
|
|
|
2019-05-06 18:16:20 +00:00
|
|
|
// ProfileEvent describes a profile event.
|
|
|
|
type ProfileEvent struct {
|
2019-05-08 22:34:27 +00:00
|
|
|
Username string
|
|
|
|
Name string
|
|
|
|
Avatar string
|
|
|
|
ProfileURL string
|
|
|
|
ProfileID string
|
|
|
|
Posts int64
|
|
|
|
FollowCount int64
|
|
|
|
FollowerCount int64
|
2019-05-08 22:59:21 +00:00
|
|
|
Following bool
|
|
|
|
FollowedBy bool
|
2017-08-29 05:09:17 +00:00
|
|
|
}
|
2019-05-06 18:16:20 +00:00
|
|
|
|
|
|
|
// LoginEvent describes a login event.
|
|
|
|
type LoginEvent struct {
|
|
|
|
Username string
|
|
|
|
Name string
|
|
|
|
Avatar string
|
|
|
|
ProfileURL string
|
|
|
|
ProfileID string
|
|
|
|
Posts int64
|
2019-05-08 22:34:27 +00:00
|
|
|
FollowCount int64
|
|
|
|
FollowerCount int64
|
2019-05-06 18:16:20 +00:00
|
|
|
PostSizeLimit int64
|
|
|
|
}
|
2019-05-10 13:45:38 +00:00
|
|
|
|
|
|
|
// ErrorEvent describes an error that occurred.
|
|
|
|
type ErrorEvent struct {
|
|
|
|
Message string
|
|
|
|
Internal bool
|
|
|
|
}
|