These are chat archives for logandaniels/hacktothefuture

27th
Sep 2014
Mitchell Sternke
@MitchellSternke
Sep 27 2014 00:24
testing
Logan Daniels
@logandaniels
Sep 27 2014 00:25
it lets us integrate with a repo
so it probably notifies in chat with commits in stuff i guess that's cool
or actually here is the git url
Mitchell Sternke
@MitchellSternke
Sep 27 2014 03:25

Data Model

  • list : product

product

  • list : pro_con
  • id : number

pro_con

  • is_pro : bool
  • message : string
  • votes : integer
Mitchell Sternke
@MitchellSternke
Sep 27 2014 03:41

Backend API Methods

Get Methods

GET: /products/{id}/gettoppros
GET: /products/{id}/gettopcons
GET: /products/{id}/getpros
GET: /products/{id}/getcons

Post Methods

POST: /products/{id}/addpro?message=
POST: /products/{id}/addcon?message=
POST: /products/{id}/voteup?proconid=
POST: /products/{id}/votedown?proconid=

Mitchell Sternke
@MitchellSternke
Sep 27 2014 04:40
mackenziemikkelsen
@mackenziemikkelsen
Sep 27 2014 05:28
Logan Daniels
@logandaniels
Sep 27 2014 06:05
ConnorMcMahon
@ConnorMcMahon
Sep 27 2014 14:36

<script>
jQuery('.proText').click(function() {
var command = jQuery('.proText').attr('value');
jQuery.ajax({
type: "POST",
data: {message : command},
url: "/product/(insert id here)/add_pro_message"
});
});

jQuery('.conText').click(function() {
    var command = jQuery('.conText').attr('value');
    jQuery.ajax({
        type: "POST",
        data: {message : command},
        url: "/product/(insert id here)/add_con_message"
    });
});

<script>

<body>
<input type="text" name="proText">
<input type="text" name="conText">

<body>