Quick Start

Add the following script tags to your page:

    <script
      src="https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/7.0.0/polyfill.min.js"
      integrity="sha256-KLt4XkpH4F3e5FHHsQMk9iPOhen2S4g/Lpu4nanttL0="
      crossorigin="anonymous"
    ></script>
    <script
      src="https://cdn.jsdelivr.net/npm/lodash@4.17.11/lodash.min.js"
      integrity="sha256-7/yoZS3548fXSRXqc/xYzjsmuW3sFKzuvOCHd06Pmps="
      crossorigin="anonymous"
    ></script>
    <script
      src="https://cdnjs.cloudflare.com/ajax/libs/taffydb/2.7.3/taffy-min.js"
      integrity="sha256-fKCEY8Tw1ywvNmNo7LXWhLLCkh+AP8ABrNR5S3SmSvs="
      crossorigin="anonymous"
    ></script>
    <script src="https://unpkg.com/axios@0.18.0/dist/axios.min.js"></script>
    <script src="https://cdn.jsdelivr.net/gh/conceptsauce/syrup@v1.0.0/dist/syrup.min.js"></script>

Now use the window.syrup.fetchRespondentData method to load a given respondents data set. The doc exmples use the following:

// projectID: '8fcbb2dc-8093-40d7-6c41-88ecccdcb2aa'
// questionID: 'b8b70dca-a5b8-4a1a-4a8f-f60254fea95c'
// respondentID: 'HNTEST12'
//
var r = await syrup.fetchRespondentData({
  projectID: '8fcbb2dc-8093-40d7-6c41-88ecccdcb2aa',
  pageID: 'b8b70dca-a5b8-4a1a-4a8f-f60254fea95c',
  respondentID: 'HNTEST12',
})

For production use please select an exact version for the syrup script tag so as to avoid potential issues when we update the library.

To see a list of all releases head on over to https://github.com/conceptsauce/syrup/releases

Also note, breaking changes happen. We use semantic versioning to indicate this.

For more information start with Concepts.