kenany / strawpoll

Create and get polls on Straw Poll
MIT License
7 stars 0 forks source link

Add a poll GET function #13

Closed rfox90 closed 8 years ago

rfox90 commented 8 years ago

This required some restructuring of the exports but functionality wise it behaves the same. Tests are included.

Let me know if you'd like any changes that resolve conflicts with the way you want things to work.

kenany commented 8 years ago

Hmm I think I would prefer this:

function create(options) {

}

function get(id) {

}

create.create = create;
create.get = get;

module.exports = create;

Althought create.create = create looks really weird but looks like it is perfectly valid syntax, lol.

rfox90 commented 8 years ago

There you go.

Im also working on voting as per https://github.com/KenanY/strawpoll/issues/2 for you, i'll throw a separate PR to you later.

kenany commented 8 years ago

@rfox90 Great work :) landed as https://github.com/KenanY/strawpoll/commit/b96711d0e09ea9e61871f9961ba31aaa63f0dc5c. Adding you as a collaborator (just follow these guidelines).