feat: [2/3]: add poll vote functionality
This commit is contained in:
7 files changed
+124
-42
No files matched your search
@@ -1020,4 +1020,14 @@ export class PiefedClient implements BaseClient {
|
||||
async listMedia(): ReturnType<BaseClient['listMedia']> {
|
||||
throw new Error('unsupported')
|
||||
}
|
||||
|
||||
async voteOnPoll(
|
||||
params: NullableFnArg<BaseClient['voteOnPoll']>[0],
|
||||
): NullableFnReturn<BaseClient['voteOnPoll']> {
|
||||
const response = (
|
||||
await this.#client.POST('/api/alpha/post/poll_vote', { body: params })
|
||||
).data!
|
||||
|
||||
return toPostView(response)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user