diff options
author | r <r@freesoftwareextremist.com> | 2020-02-09 13:42:16 +0000 |
---|---|---|
committer | r <r@freesoftwareextremist.com> | 2020-02-09 13:42:16 +0000 |
commit | cfec7879e3b3fc38956f2dce0acbbeb8a578f4c1 (patch) | |
tree | 5da9a9371fd10667cd6ee68bbd07f7f0f9d8d3d3 /service/service.go | |
parent | a68a09a83ef2eb411e2a7a66e919f27c040c0b6a (diff) | |
download | bloat-cfec7879e3b3fc38956f2dce0acbbeb8a578f4c1.tar.gz bloat-cfec7879e3b3fc38956f2dce0acbbeb8a578f4c1.zip |
Add poll support
Currenlty only voting is possible.
Diffstat (limited to 'service/service.go')
-rw-r--r-- | service/service.go | 10 |
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 |