Skip to content
This repository was archived by the owner on Mar 5, 2023. It is now read-only.

Commit 2998b2c

Browse files
authored
feat: add UpdateWatchStatus function (bwmarrin#1291)
This commit adds the UpdateWatchStatus method
1 parent f73d3a2 commit 2998b2c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

wsapi.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,14 @@ func (s *Session) UpdateGameStatus(idle int, name string) (err error) {
361361
return s.UpdateStatusComplex(*newUpdateStatusData(idle, ActivityTypeGame, name, ""))
362362
}
363363

364+
// UpdateWatchStatus is used to update the user's watch status.
365+
// If idle>0 then set status to idle.
366+
// If name!="" then set movie/stream.
367+
// if otherwise, set status to active, and no activity.
368+
func (s *Session) UpdateWatchStatus(idle int, name string) (err error) {
369+
return s.UpdateStatusComplex(*newUpdateStatusData(idle, ActivityTypeWatching, name, ""))
370+
}
371+
364372
// UpdateStreamingStatus is used to update the user's streaming status.
365373
// If idle>0 then set status to idle.
366374
// If name!="" then set game.

0 commit comments

Comments
 (0)