
Originally Posted by
JimAvanti
Sorry, I guess I missed that one.
Jim,
You might have also missed how you were supposed to alter your Class definitions amidst Sitten's daily anti VB rant....
The syntax for declaring a Property as an array requires that the parentheses are placed after the name of the Type, not after the name of the Property.
So lines like:
Code:
Public Property aliases() As String
Public Property genre() As String
Public Property invalidFilters() As String
should be:
Code:
Public Property aliases As String()
Public Property genre As String()
Public Property invalidFilters As String()
There are also a couple of typos in the names you are using for the Properties:
'imbId' should be 'imdbId', and 'netwirkId' should be 'networkId'.
And the documentation for the API seems to be a little off.
For the /series/{id} endpoint, the object named "seriesId" seems to be returning a String, not a Long as documented.
They have also added an 'addedBy' object.
With this in mind, the following is my take on how you may want to define your Classes. I have highlighted the changes from your original code:
Code:
Public Class SearchSeriesResults
Public Property data As SearchSeriesResult()
End Class
Public Class SearchSeriesResult
Public Property aliases As String()
Public Property banner As String
Public Property firstAired As String
Public Property id As Long
Public Property network As String
Public Property overview As String
Public Property seriesName As String
Public Property status As String
End Class
Code:
Public Class SeriesResults
Public Property data As SeriesResult
Public Property errors As SeriesError
End Class
Public Class SeriesResult
Public Property added As String
Public Property addedBy As Nullable(Of Long)
Public Property airsDayOfWeek As String
Public Property airsTime As String
Public Property aliases As String()
Public Property banner As String
Public Property firstAired As String
Public Property genre As String()
Public Property id As Long
Public Property imdbId As String
Public Property lastUpdated As Long
Public Property network As String
Public Property networkId As String
Public Property overview As String
Public Property rating As String
Public Property runtime As String
Public Property seriesID As String ' documentation has this as Long
Public Property seriesName As String
Public Property siteRating As Long
Public Property siteRatingCount As Long
Public Property status As String
Public Property zap2itId As String
End Class
Public Class SeriesError
Public Property invalidFilters As String()
Public Property invalidLanguage As String
Public Property invalidQueryParams As String()
End Class