Skip to content

ulyssesz/strawpoll-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

strawpoll-python

Python Wrapper to Automate Making a StrawPoll

Requirements: Built on Python 2.7

Uses built-in modules, requests and re (regex)

Usage

#####Create new poll

from strawpoll import StrawPoll

s = StrawPoll.new("new poll", ["Option 1", "Option 2"])

#####Get old poll by id

t = StrawPoll.fromID(142857)

#####Get old poll by url

v = StrawPoll.fromURL("http://strawpoll.me/314159")

#####Access results

s = StrawPoll.new("new poll", ["Option 1", "Option 2"])
print s.url
print s.title
print s.results
print s.totalVotes

#####Update results Call this to update values. Note: The poll is updated upon initialization.

s.updateResults()

About

Python Wrapper to Automate Making a StrawPoll

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages