Podpora The Movie Database

Hi! I am working with /person/popular and looking for a way to get that response sorted by most popular, descending/ascending? I don't see any sort query params in the docs. I can get pages, but page items are not sorted by popularity.

https://api.themoviedb.org/3/person/popular?api_key=<>&language=en-US&page=1

Thanks!

4 odpovědí (na stránce 1 z 1)

Jump to last post

Hi @Torbjor,

The /*/popular methods are indeed sorted by popularity, can you show me what you're seeing when they're not?

2.1.5 :001 > require 'rest_client'
2.1.5 :002 > api_key = "XXX"
2.1.5 :003 > request = RestClient.get 'http://api.themoviedb.org/3/person/popular', { :accept => 'application/json', :params => { :api_key => api_key } }
2.1.5 :004 > parsed_request = JSON.parse(request)
2.1.5 :005 > parsed_request['results'].map { |result| result['popularity'] }
 => [55.193624, 36.873281, 36.340025, 36.016189, 30.976805, 29.763182, 26.366653, 25.500246, 25.305701, 25.089034, 22.588007, 22.029472, 21.889838, 21.838433, 21.055364, 20.255858, 19.558332, 19.48768, 19.225475, 19.2007]

Thanks for the reply! Soon after I sent this I realized I wasn't asking the right question. You are right. What I'd like to ask is, how do you measure popularity? For example, 'Wonder Woman' is in first place today with a popularity score of 106 but 'Beauty and the Beast' is in second place with 65.

Popularity is calculated by a variety of things like page views, the number of ratings and favourites/watchlist additions per day and then release date.

Thanks!

Nemůžete nalézt film nebo seriál? Přihlaste se pro jeho vytvoření.

Globální

s zaměřit panel hledání
p otevřít nabídku profilu
esc zavřít otevřené okno
? otevřít okno klávesových zkratek

Na stránkách médií

b zpět (nebo na nadřazený záznam, pokud to jde)
e na stránku úprav

Na stránkách sezón

(šipka vpravo) na další sezónu
(šipka vlevo) na předchozí sezónu

Na stránkách epizod

(šipka vpravo) na další epizodu
(šipka vlevo) na předchozí epizodu

Na všech stránkách obrázků

a otevřít okno přidání obrázku

Na všech stránkách úprav

t otevřít výběr překladu
ctrl+ s odeslat formulář

Na stránkách diskusí

n vytvořit novou diskusi
w přepnout stav zhlédnutí
p přepnout veřejný a soukromý
c přepnout zavřít a otevřít
a otevřít aktivitu
r odpovědět na diskusi
l na poslední odpověď
ctrl+ enter odeslat zprávu
(šipka vpravo) další stránka
(šipka vlevo) předchozí stránka

Nastavení

Want to rate or add this item to a list?

Přihlásit se