Skip to content

m3talstorm/strawpoll

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

strawpoll.js

Build Status Downloads Npm Version Node Version Issues

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)
})

Releases

No releases published

Packages

No packages published