Friday 28 March 2014

Email To Hoist

I mentioned in jest to the Hoist Product Manager that there should be a way that you can email data to Hoist, but my mind would not let it rest.

So I bring to you a not so finished method of sending an email to get data into Hoist.

There was nearly some code reuse from mailthrottler so I am very pleased with myself.

Now if I can just find a use case!

Saturday 25 January 2014

Creating a simple voting site with Hoist

I needed to create a simple site (2 page) that would let people vote on when my baby would be born.
Not wanting the trouble of hosting the database or creating the api to store the data, I turned to Hoist

With the easy to use javascript library found at I was quickly able to create the voting app I needed. 

Here how:

To Vote:
var rawvote = {} = $("#date-here").text();
rawvote.voterName = $("#voter-name").val();
rawvote.babyName = $("#baby-name").val();
Hoist.apiKey("MYAPIKEY");"vote", rawvote, 
  function (data) 
    window.location.href = "/voted.html";

To get the Votes back:
var votes = Hoist("vote");
votes.get(function(data) { 
  html = []
  for(var i=0;i<data.length;i++) {
    html.push('<div class="row">');
    html.push('<div class="col-md-6">'+ data[i].date + '</div>');
    html.push('<div class="col-md-6">'+ data[i].babyName +'</div>');
As simple as that!