JavaScript SDK

GitHub version Version Build Status Coverage

The official PredictHQ JavaScript Client provides a consistent JavaScript interface to our API.


npm install predicthq

Example Usage

Common JS

var Client = require('predicthq')

var phq = new Client({access_token: "ACCESS_TOKEN"}){q: 'Madonna', rank_level: 5, country:'AU', 'start.gte' : '2016-01-01'})
        var events = results.toArray()
        for(var i=0; i < events.length; i++)
  [i].rank, events[i].category, events[i].title, events[i].start, events[i].location )


import Client from 'predicthq'

let phq = new Client({access_token=:"ACCESS_TOKEN"})
        for (let event of results)

Found a Bug?

Please log an issue on our GitHub repository.