Request Approval

Create, view, and vote on polls.

Uploaded By: Matthew Millican (cs294s-spr18)

Commands

  • GET: a list of active polls
  • GET: create poll asking ____ (question)
  • GET: create poll asking ____ (question) and post as ____ (author)
  • GET: results for a poll
  • GET: results for poll ____ (poll id)
  • GET: poll ____ (poll id) exists
  • GET: summary for poll
  • GET: summary for poll ____ (poll id)
  • GET: list of polls
  • GET: poll list
  • GET: create a poll
  • GET: get all polls
  • GET: get open polls
  • GET: get closed polls
  • GET: polls asking ____ (keyword)
  • GET: polls related to ____ (keyword)
  • GET: polls with at least ____ (votes) votes
  • GET: poll exists
  • GET: poll with id ____ (poll id) exists
  • GET: does poll with id ____ (poll id) exist
  • GET: does poll exist
  • GET: results for poll with id ____ (poll id)
  • GET: poll results
  • GET: create poll asking the question ____ (question)
  • GET: header for poll
  • GET: information about poll
  • GET: info about poll
  • GET: information about poll with id ____ (poll id)
  • GET: information about poll ____ (poll id)
  • DO: add choice to poll
  • DO: add a choice to poll ____ (poll id)
  • DO: add the choice ____ (choice) to poll ____ (poll id)
  • DO: vote on a poll
  • DO: vote on poll ____ (poll id)
  • DO: vote for choice ____ (choice id) on poll ____ (poll id)
  • DO: close a poll
  • DO: close poll ____ (poll id)
  • DO: delete a poll
  • DO: delete poll ____ (poll id)
  • DO: vote on poll with id ____ (poll id)
  • DO: vote for choice with id ____ (choice id) on the poll with id ____ (poll id)
  • DO: delete poll with id ____ (poll id)
  • DO: close poll with id ____ (poll id)
  • DO: add option to poll
  • DO: add option to poll with id ____ (poll id)
  • DO: add option ____ (choice) to poll with id ____ (poll id)

Queries

  • poll_list(out id :Number,
    out question :String,
    out total_votes :Number,
    out open :Boolean)
    Get a list of polls
  • poll_exists(in req poll_id :Number,
    out answer :String)
    Get whether a poll exists
  • poll_results(in req poll_id :Number,
    out choice_id :Number,
    out choice_text :String,
    out choice_votes :String)
    Get results for a poll.
  • create_poll(in req question :String,
    in opt post_as :String,
    out poll_id :Number)
    Create a poll with given question and author.
  • poll_summary(in req poll_id :Number,
    out author :String,
    out date :Date,
    out question :String,
    out votes :String,
    out status :String,
    out nchoices :String)
    Get an overview of a poll

Actions

  • delete_poll(in req poll_id :Number)Delete the poll with given name.
  • vote(in req poll_id :Number,
    in req choice_id :String)
    Vote for a given option on a given poll
  • add_choice(in req poll_id :Number,
    in req choice :String)
    Add a choice with given name to the given poll.
  • close_poll(in req poll_id :Number)Close the poll with given id.