Create LiveThreadService

Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
This commit is contained in:
Vartan Benohanian
2020-09-15 21:41:12 -04:00
parent 77d0d257d3
commit 359f8126a1
6 changed files with 136 additions and 0 deletions
+8
View File
@@ -17,6 +17,7 @@ const (
kindTrophyList = "TrophyList"
kindUserList = "UserList"
kindMore = "more"
kindLiveThread = "LiveUpdateEvent"
kindModAction = "modaction"
kindMulti = "LabeledMulti"
kindMultiDescription = "LabeledMultiDescription"
@@ -89,6 +90,8 @@ func (t *thing) UnmarshalJSON(b []byte) error {
v = new(Post)
case kindSubreddit:
v = new(Subreddit)
case kindLiveThread:
v = new(LiveThread)
case kindModAction:
v = new(ModAction)
case kindMulti:
@@ -152,6 +155,11 @@ func (t *thing) Subreddit() (v *Subreddit, ok bool) {
return
}
func (t *thing) LiveThread() (v *LiveThread, ok bool) {
v, ok = t.Data.(*LiveThread)
return
}
func (t *thing) ModAction() (v *ModAction, ok bool) {
v, ok = t.Data.(*ModAction)
return