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
Non podes atopar unha película ou serie? Inicia sesión para creala.
Queres valorar ou engadir o elemento a unha listaxe?
Non es membro?
Resposta de Travis Bell
no 29 de xullo do 2014 ás 11:59AM
Hi Askerion,
What's the specific error (and response) you're receiving from that request?
Resposta de Askerion
no 30 de xullo do 2014 ás 2:41AM
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