aboutsummaryrefslogtreecommitdiff
path: root/service/service.go
diff options
context:
space:
mode:
Diffstat (limited to 'service/service.go')
-rw-r--r--service/service.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/service/service.go b/service/service.go
index d762842..ecd0d3f 100644
--- a/service/service.go
+++ b/service/service.go
@@ -42,6 +42,7 @@ type Service interface {
UnLike(ctx context.Context, c *model.Client, id string) (count int64, err error)
Retweet(ctx context.Context, c *model.Client, id string) (count int64, err error)
UnRetweet(ctx context.Context, c *model.Client, id string) (count int64, err error)
+ Vote(ctx context.Context, c *model.Client, id string, choices []string) (err error)
Follow(ctx context.Context, c *model.Client, id string) (err error)
UnFollow(ctx context.Context, c *model.Client, id string) (err error)
Mute(ctx context.Context, c *model.Client, id string) (err error)
@@ -843,6 +844,15 @@ func (svc *service) UnRetweet(ctx context.Context, c *model.Client, id string) (
return
}
+func (svc *service) Vote(ctx context.Context, c *model.Client, id string,
+ choices []string) (err error) {
+ _, err = c.Vote(ctx, id, choices)
+ if err != nil {
+ return
+ }
+ return
+}
+
func (svc *service) Follow(ctx context.Context, c *model.Client, id string) (err error) {
_, err = c.AccountFollow(ctx, id)
return