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