The Movie Database サポート

Here I see the list of Genres with id numbers: https://developers.themoviedb.org/3/genres/get-movie-list

(1) So for example, looking at the snippet below, I wanted to know why the genre id numbers are random, why not make the genre id's number follow an order like 1,2,3,4,5 etc. why make random numbers? ... I am learning so I am trying to understand why its like this.

{
  "genres": [
    {
      "id": 28,
      "name": "Action"
    },
    {
      "id": 12,
      "name": "Adventure"
    },
    {
      "id": 16,
      "name": "Animation"
    },
    {
      "id": 35,
      "name": "Comedy"
    }, ...

(2) I know that I would use an API call like (https://api.themoviedb.org/3/movie/437557?api_key=KEY ) to get the details of one particular movie, and inside of that details object we have the genres of that one particular movie. So what situation would someone want to call just - https://api.themoviedb.org/3/genre/movie/list?api_key=KEY , and just get a list of the generic genres object we have above ?

Thank you for your help! :-)

2 replies (on page 1 of 1)

Jump to last post

Hi there,

So for example, looking at the snippet below, I wanted to know why the genre id numbers are random, why not make the genre id's number follow an order like 1,2,3,4,5 etc. why make random numbers?

They aren't really random, there's lots of genres that have either been deleted or disabled over the years. The table started at 1 and incremented up.

So what situation would someone want to call just - https://api.themoviedb.org/3/genre/movie/list?api_key=KEY , and just get a list of the generic genres object we have above?

While it's true that the get details method returns a human readable name, none of the list methods do (popular, top rated, discover, etc...) So the usual practice would be to store the genres locally and then you can reference them like any other linked object.

Thank you.

映画やテレビ番組が見つかりませんか?ログインして作成してください。

全般

s 検索バーに移動する
p プロファイルメニューを開く
esc 開いているウィンドウを閉じる
? キーボードショートカットウィンドウを開く

メディアのページ

b 戻る(または該当する場合は親に)
e 編集ページに行く

テレビ番組のシーズンのページ

(右矢印)次のシーズンに行く
(左矢印)前のシーズンに戻る

テレビ番組のエピソードのページ

(右矢印)次のエピソードに進む
(左矢印)前のエピソードに戻る

全ての画像のページ

a 画像追加ウィンドウを開く

全ての編集ページ

t 翻訳選択を開く
ctrl+ s フォームを送信する

ディスカッションのページ

n 新しいディスカッションを作成する
w 監視ステータスを切り替える
p 公開/非公開を切り替える
c 閉じる/開くを切り替える
a アクティビティを開く
r ディスカッションに返信
l 最後の返事に行く
ctrl+ enter メッセージを送信する
(右矢印)次のページ
(左矢印)前のページ

設定

このアイテムを評価したり、リストに追加したりしたいですか?

ログイン

メンバーではありませんか?

登録してコミュニティに参加