I am trying to build Excel page from iTunes query data. An example for Angry Birds app my query would look like: https://itunes.apple.com/lookup?id=343200656&country=AL checking Albania iTunes https://itunes.apple.com/lookup?id=343200656&country=DZ checking Algeria iTunes ... 150 more stores
My question is the most efficient way to do this query and parse response. I only know how to to xmlhttp query. Please enlighten me as the better way to do this. I have read some documentation for VB-JSON, Json.net, CDataSet, fastJSON, but cannot figure out how to get started trying those tools. Anyone have more VBA code examples pulling JSON or way to explain usage of these frameworks to a newb?
Dim innerHTML As Object
Dim myText As String
JsonCheck = ""
Set innerHTML = CreateObject("Microsoft.XMLHTTP")
With innerHTML
.Open "GET", iTunesAPI_link, False
.send
myText = .responsetext
End With
Set innerHTML = Nothing
If InStr(myText, ":0") = 20 Then 'no results found
result = "Down"
ElseIf InStr(myText, "Your request produced an error.") = 46 Then 'link error
result = HTMLCheck(human iTunes link)
Else 'found the app
result = call function which parses myText for desired fields
Endif