UNPKG

@polls-platform/core

Version:

Polls Platform core library

19 lines (18 loc) 953 B
import { PollRequest, PollResponse, PollResponseAsync } from '../types'; /** * Creates a poll and instantly provides a Poll URL that can be opened in the browser or inside of a <PollView> component. * This is the simplest way to create a poll. Loading and failure states will be handled by the <PollView> component * @category 2. Create Poll * @param pollRequest * @returns Poll Response containing URL */ export declare function createPoll(pollRequest: PollRequest): PollResponse; /** * Asynchronously creates a poll and provides a Poll URL that can be opened in the browser or inside of a <PollView> component. * When using this function, you must handle loading and failure states. * For a more simple approach, see the `createPoll` function * @category 2. Create Poll * @param pollRequest * @returns Promise: Poll Response containing URL */ export declare function createPollAsync(pollRequest: PollRequest): Promise<PollResponseAsync>;