The Movie Database-ondersteuning

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 antwoorde (op blad 1 van 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!

Kan ’n rolprent of TV-program nie vind nie? Teken aan om dit te skep.

Globaal

s fokus op soekbalk
p open profielkieslys
esc sluit ’n oop venster
? open sneltoetsvenster

Op mediablaaie

b gaan terug (na ouer waar van toepassing)
e gaan na wysigblad

Op TV-seisoenblaaie

(regterpyl) gaan na volgende seisoen
(linkerpyl) gaan na vorige seisoen

Op TV-episodeblaaie

(regterpyl) gaan na volgende episode
(linkerpyl) gaan na vorige episode

Op alle beeldblaaie

a open beeldtoevoegvenster

Op alle wysigingsblaaie

t open vertaalkieser
ctrl+ s dien form in

Op besprekingsblaaie

n skep nuwe bespreking
w tokkel kykstatus
p tokkel openbaar/privaat
c tokkel maak oop/toe
a open aktiwiteit
r reageer op bespreking
l gaan na laaste reaksie
ctrl+ enter dien u boodskap in
(regterpyl) volgende blad
(linkerpyl) vorige blad

Instellings

Wil u hierdie item gradeer of tot ’n lys toevoeg?

Teken aan