Поддръжка на 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 отговора (на страница 1 от общо 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?

Не можете да откриете филм или сериал? Влезте, за да го създадете.

Глобални

s фокусиране на лентата за търсене
p отваряне на меню "Профил"
esc затваряне на отворен прозорец
? отваряне на прозореца за клавишните комбинации

На страниците за медиите

b връщане назад
e към страницата за редактиране

На страниците за сезони

(стрелка надясно) към следващ сезон
(стрелка наляво) към предишния сезон

На страниците за епизоди

(стрелка надясно) към следващ епизод
(стрелка наляво) предишен епизод

На всички страници за изображения

a отваряне на прозорец за добавяне на изображение

На всички страници за редактиране

t меню за избор на език, на превода
ctrl+ s изпращане на форма

На страниците за дискусия

n създаване на нова дискусия
w статус на наблюдаване
p публична/лична
c затваряне/отваряне
a отваряне на действия
r отговаряне в дискусия
l към последния отговор
ctrl+ enter изпращане на вашето съобщение
(стрелка надясно) следваща страница
(стрелка наляво) предишна страница

Настройки

Искате ли да го оцените или добавите към списък?

Вход