strawpoll.js
A simple javascript interface/nodejs package to the www.strawpoll.me API.
Install
Node (Coming soon)
npm install strawpoll --save
Usage
Node
Creating a poll
const strawpoll = require('strawpoll')
var poll = strawpoll.create({
title: 'My first poll',
options: [
'wow',
'awesome',
'amazing',
'nice'
],
multi: false,
dupcheck: 'normal',
captcha: false
})
poll.then((response) => {
console.log(response)
}).catch((error) => {
console.log(error)
})
Getting the state/information about a poll
const strawpoll = require('strawpoll')
var poll = strawpoll.get(11822190)
poll.then((response) => {
console.log(response)
}).catch((error) => {
console.log(error)
})