Using VBA to consume a rest blister query

In Getting lists as a restquery I showed how to get JSON back by querying the scriptDB directly. Here's how to consume that in VBA. This example is general purpose - it can be used for any scriptdb, and will adapt as required. It uses Rest to Excel library and can be downloaded in the latest cDataSet.xlsm workbook.

The restlibrary entry

As with all restlibrary examples, we need to create an entry in the restlibrary - it looks like this
        With .add("blister")
            .add "restType", erRestType.erSingleQuery
            .add "url", "https://script.google.com/a/macros/mcpher.com/s/AKfycbzhzIDmgY9BNeBu87puxMVUlMkJ4UkD_Yvjdt5MhOxR1R6RG88/exec?type=jsonp&source=scriptdb&module=blister&library="
            .add "results", "results"
            .add "treeSearch", True
            .add "ignore", vbNullString
            .add "append", "&query="
        End With

The code


It will ask for the name of the library (probably "blister") and the listName - in this case below "airlines", and produce something that starts like this.


Obviously this could be easily consumed by anything that can interpret JSON
All comments, suggestions, assistance, good lists are welcome as I develop this capability. You can get me on Google plus, Twitter or this forum.


For help and more information join our forum,follow the blog or follow me on twitter .


Comments