Create LiveThreadService
Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user