Hi there,
I get it simply go not add a movie to my Movie List
my code:
Dim apiKey As String = "475a861fb396xxxxxxxxxxxxxxxx"
Dim sessionID As String = "b47xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
Dim jsonEncoding As String = "{" & vbLf & " ""media_id"": 127585," & vbLf & "}"
Try
Dim client As New Net.WebClient
client.Headers.Add("Content-Type", "application/json")
client.Headers.Add("Accept", "application/json")
client.Headers.Add("api_key", apiKey)
client.Headers.Add("session_id", sessionID)
Dim url As String = "https://api.themoviedb.org/3/list/53d1fbeb0e0a265dea00e3d7/add_item?api_key=" & apiKey & "&session_id=" & sessionID
Dim responsebytes = client.UploadData(url, "POST", System.Text.Encoding.UTF8.GetBytes(jsonEncoding))
Catch webex As WebException
MsgBox(webex.Message)
Catch ex As Exception
MsgBox(ex.Message)
End Try
Nevari atrast filmu vai TV pārraidi? Jāpiesakās, lai to izveidotu.
Vēlies novērtēt šo vienumu vai pievienot to sarakstam?
Neesi dalībnieks?
Atbilde no Travis Bell
on jūlijs 29, 2014 at 11:59 AM
Hi Askerion,
What's the specific error (and response) you're receiving from that request?
Atbilde no Askerion
on jūlijs 30, 2014 at 2:41 AM
Hi,
I've found the error. Dim jsonEncoding As String = "{" & vbLf & "" "media_id" "127585," & vbLf & "}"
In the Media ID, I had a comma and should not be
Dim jsonEncoding As String = "{" & vbLf & "" "media_id" "127585" & vbLf & "}" that's right
regards