title: How to use a JSON API?
body: <p>I know this is probably a bit to "large" question to ask, but I have this JSON API I want to use and I have never used an API before and don't exactly know how to use it, I have read a bit on how to use JSON APIs and also tried around a bit so I have a vague idea of how to use it, but I cant get it to work. </p>
  
  <p>So now to the question If I wanted to create a "ticker" of the last/latest price using this API: <a href="https://github.com/ralphtheninja/goxstream" rel="nofollow">https://github.com/ralphtheninja/goxstream</a></p>
  
  <p><a href="https://en.bitcoin.it/wiki/MtGox/API/Streaming" rel="nofollow">https://en.bitcoin.it/wiki/MtGox/API/Streaming</a></p>
  
  <p>How would I do that?</p>
  
  <p>I know I'm probably stretching my luck trying to get this question answered, but I have tried for a bit to long now and I'm not really getting anywhere, so would really appreciate all help I can get.</p>
  
  <p>EDIT:
  CODE</p>
  
  <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
  &lt;title&gt;Untitled Document&lt;/title&gt;
  &lt;script src="index.js"&gt;&lt;/script&gt;
  
  
  &lt;script type="text/javascript"&gt;
  
  var ticker = require('goxtick')('USD')
  
  ticker.on('ticker', function (data) {
    window.alert('ticker data:', data)
  })
  
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>