Supporto The Movie Database

Hello,

I have a problem , so i try to remove selected movie from watch list using following call "POST /account/{account_id}/watchlist". In last parameter in request body i pass "false", as i understood that's mean that i remove item from list , but actually item doesn't remove.

Below you can see the response: { "status_code": 12, "status_message": "The item/record was updated successfully." }

In params i pass : "session_id" and "api_key" In header Content-Type : "application/json" In request body : "media_id" as String value, "media_type" also as String value and "favorite" as Boolean value.

My end point: https://api.themoviedb.org/3/account/11/favorite?session_id=XXXXXXXXXXXXXXXX&api_key=XXXXXXXXXXXXXXX

Thank you in advance for help, Kind regards, Brad.

4 risposte (nella pagina 1 di 1)

Jump to last post

Hi Brad,

I just gave this a spin and had no problems adding and removing items from my favourite list. Here's an example request to remove the item from my favourite list:

https://api.themoviedb.org/3/account/11/favorite?session_id=###&api_key=###

POST Body:

{ "media_type": "movie", "media_id": 284054, "favorite": false }

Are you making sure your values for media_id and favorite are a integer and boolean?

HI Travis,

That how look my endpoint :
https://api.themoviedb.org/3/account/11/favorite?session_id=######&api_key=#######

And i have the same body as you wrote above but actually i receive The same message as in previous time.

{ "media_type": "movie", "media_id": 284054, "favorite": false }

I can mark movie as favorite, but i can remove it from favorite, but the main difference between two calls is last value of the body, we have to change just boolean value from TRUE to FALSE.

But it's not working ... May bу there are anything else can be wrong? Kind regards, Brad.

Are you able to run these cURL commands? Here's the 4 that I just ran that are working properly:

Add to my favourite list:

$ curl -X POST \
>   "https://api.themoviedb.org/3/account/548/favorite?api_key=###&session_id=###" \
>   -H 'Content-Type: application/json' \
>   -d '{ "media_type": "movie", "media_id": 284054, "favorite": true }'

{
  "status_code": 12,
  "status_message": "The item/record was updated successfully."
}

Check my favourite list, notice 284054 is first in my list. Also note that I added a sort_by=created_at.desc param to make sure I am getting items sorted that are newest added first.

$ curl -X GET \
>   "https://api.themoviedb.org/3/account/548/favorite/movies?api_key=###&session_id=###&sort_by=created_at.desc"

{
  "page": 1,
  "results": [
    {
      "adult": false,
      "backdrop_path": "/b6ZJZHUdMEFECvGiDpJjlfUWela.jpg",
      "genre_ids": [
        28,
        12,
        14,
        878
      ],
      "id": 284054,
      "original_language": "en",
      "original_title": "Black Panther",
      "overview": "King T'Challa returns home from America to the reclusive, technologically advanced African nation of Wakanda to serve as his country's new leader. However, T'Challa soon finds that he is challenged for the throne by factions within his own country as well as without. Using powers reserved to Wakandan kings, T'Challa assumes the Black Panther mantel to join with girlfriend Nakia, the queen-mother, his princess-kid sister, members of the Dora Milaje (the Wakandan 'special forces') and an American secret agent, to prevent Wakanda from being dragged into a world war.",
      "poster_path": "/uxzzxijgPIY7slzFvMotPv8wjKA.jpg",
      "release_date": "2018-02-13",
      "title": "Black Panther",
      "video": false,
      "vote_average": 7.3,
      "vote_count": 9139,
      "popularity": 44.814
    },
    {
      "adult": false,
      "backdrop_path": "/mVr0UiqyltcfqxbAUcLl9zWL8ah.jpg",
      "genre_ids": [
        9648,
        878,
        53
      ],
      "id": 335984,
      "original_language": "en",
      "original_title": "Blade Runner 2049",
      "overview": "Thirty years after the events of the first film, a new blade runner, LAPD Officer K, unearths a long-buried secret that has the potential to plunge what's left of society into chaos. K's discovery leads him on a quest to find Rick Deckard, a former LAPD blade runner who has been missing for 30 years.",
      "poster_path": "/gajva2L0rPYkEWjzgFlBXCAVBE5.jpg",
      "release_date": "2017-10-04",
      "title": "Blade Runner 2049",
      "video": false,
      "vote_average": 7.3,
      "vote_count": 5636,
      "popularity": 31.401
    },
    ...
  ],
  "total_pages": 4,
  "total_results": 79
}

Then I remove the item:

$ curl -X POST \
>   "https://api.themoviedb.org/3/account/548/favorite?api_key=###&session_id=###" \
>   -H 'Content-Type: application/json' \
>   -d '{ "media_type": "movie", "media_id": 284054, "favorite": false }'

{
  "status_code": 13,
  "status_message": "The item/record was deleted successfully."
}

And finally call my list one last time to see that the item is removed:

$ curl -X GET \
>   "https://api.themoviedb.org/3/account/548/favorite/movies?api_key=###&session_id=###&sort_by=created_at.desc"

{
  "page": 1,
  "results": [
    {
      "adult": false,
      "backdrop_path": "/mVr0UiqyltcfqxbAUcLl9zWL8ah.jpg",
      "genre_ids": [
        9648,
        878,
        53
      ],
      "id": 335984,
      "original_language": "en",
      "original_title": "Blade Runner 2049",
      "overview": "Thirty years after the events of the first film, a new blade runner, LAPD Officer K, unearths a long-buried secret that has the potential to plunge what's left of society into chaos. K's discovery leads him on a quest to find Rick Deckard, a former LAPD blade runner who has been missing for 30 years.",
      "poster_path": "/gajva2L0rPYkEWjzgFlBXCAVBE5.jpg",
      "release_date": "2017-10-04",
      "title": "Blade Runner 2049",
      "video": false,
      "vote_average": 7.3,
      "vote_count": 5636,
      "popularity": 31.401
    },
    ...
  ],
  "total_pages": 4,
  "total_results": 78
}

I have the same issue, I just change the favorite to false for removing the specific movie from my favorite movies list but it is not working... can you help me out in it?

Non riesci a trovare un film o una serie Tv? Accedi per crearlo.

Globale

s focalizza la barra di ricerca
p apri menu profilo
esc chiudi una finestra aperta
? apri finestra scorciatoia tastiera

Su tutte le pagine di media

b torna indietro (o al precedente quando applicabile)
e vai alla pagina di modifica

Nelle pagine delle stagioni TV

(freccia destra) vai alla stagione successiva
(freccia sinistra) vai alla stagione precedente

Nelle pagine degli episodi TV

(freccia destra) vai all'episodio successivo
(freccia sinistra) vai all'episodio precedente

Su tutte le pagine di immagini

a apri finestra aggiungi immagine

Su tutte le pagine di modifica

t apri selettore traduzione
ctrl+ s invia modulo

Sulle pagine di discussione

n crea nuova discussione
w segna come visto/non visto
p cambia publico/privato
c cambia chiuso/aperto
a apri attivita
r rispondi alla discussione
l vai all'ultima risposta
ctrl+ enter invia il tuo messaggio
(freccia destra) pagina successiva
(freccia sinistra) pagina precedente

Impostazioni

Vuoi valutare o aggiungere quest'elemento a una lista?

Accedi