SS:
I don’t know how you could have written all that code without even having a valid APIkey to test it out!
I already spent half the day trying to figure out how to Deserialize the JSON response into an Array of SearchSeriesResult with no luck. I made a new copy of your SearchSeriesName function that returns a JSON string instead of a Deserialized object so that I could see what was going on.
Code:
Public Function SearchSeriesByName(ByVal jwt As String, ByVal searchTerm As String) As String
Dim restClient As New RestClient()
Dim url As String = "https://api.thetvdb.com/search/series"
Dim parameters As New Dictionary(Of String, String)()
parameters.Add("name", searchTerm)
Dim responseJson As String = restClient.GetWithJwt(url, jwt, parameters)
Return responseJson
End Function
I then try calling with the following code to display the JSON string followed by my attempt to load an array of the Deserialized string and display an item. I am having no luck.
Code:
Dim searchResults As String = tvDbApi.SearchSeriesName(jwt, TextBox2.Text)
TextBox1.Text = TextBox1.Text & vbCrLf & searchResults
Dim responseObject = JsonConvert.DeserializeObject(Of List(Of SearchSeriesResult))(searchResults)
TextBox1.Text = TextBox1.Text & vbCrLf & responseObject(1).id
If I wanted to convert the JSON to XML how would I go about that? Would I convert the JSON response string or the Deserialized array (Once I have a valid array).
Jim

Originally Posted by
Sitten Spynne
Look at you, you're catching
my errors. Fast learner!
I'm not sure how to search for a partial show name. I'd sort of expect that by default, but the documentation didn't make that clear. Maybe they've got a wildcard format? I hope there's an answer to that.
Also:
This is spot on and I missed it from the documentation:
I was looking for [] around the "model" if it was an array. Whoops!
I forgot to mention it, but 90% of "writing a client" for one of these is being
almost right and hacking out all the little wrinkles
