Running one off queries using the cRest class get it now
Why would you need to do one off calls
How to do one off calls
- sRestURL – the URL of the one off query
- sResponseResults – the description of where to find the reponse data
- bTreeSearch – as described in Adding to the rest library this will modify the behavior when searching for a column match between the worksheet column names and the response.
This means we can call it with appropriate arguments, in this example to do a patent search on the term “excel”
Public Sub testOneOff() Dim cr As cRest Set cr = restQuery("patent", , "excel", , _ "https://ajax.googleapis.com/ajax/services/search/patent?v=1.0&rsz=8&q=", _ "responseData.results", False) End Sub
WIth patents as a preset in the library, This would be equivalent to
Public Sub testLibrary() Dim cr As cRest Set cr = restQuery("patent","google patents" , "excel") End Sub
- find the Rest URl , try it out, and understand what the response looks like
- call restQuery() with appropriate arguments
- You should consider committing that research to the library at this point in case you need it again
- Why not submit it to our forum for inclusion in the library so that others can benefit from your research.