我不确定我是否正确,但我也在为我的项目使用 TMDB api。要获得数字版本,请添加release_dates
到 url。所以在我的情况下,它会是这样的:
https://api.themoviedb.org/3/movie/271110?api_key= **f7039633f2065942cd8a28d7cadad4&append_to_response=release_dates&callback=angular.callbacks._1
注意append_to_response=release_dates
这会像这样返回 json:
{
"adult":false,
"backdrop_path":"/rqAHkvXldb9tHlnbQDwOzRi0yVD.jpg",
"belongs_to_collection":{
"id":131295,
"name":"Captain America Collection",
"poster_path":"/2tOgiY533JSFp7OrVlkeRJvsZpI.jpg",
"backdrop_path":"/nZSYqitBkAvmoq5IrsGsSWuhSC8.jpg"
},
"budget":250000000,
"genres":[
{
"id":28,
"name":"Action"
},
{
"id":53,
"name":"Thriller"
},
{
"id":878,
"name":"Science Fiction"
}
],
"homepage":"http://marvel.com/captainamericapremiere",
"id":271110,
"imdb_id":"tt3498820",
"original_language":"en",
"original_title":"Captain America: Civil War",
"overview":"Following the events of Age of Ultron, the collective governments of the world pass an act designed to regulate all superhuman activity. This polarizes opinion amongst the Avengers, causing two factions to side with Iron Man or Captain America, which causes an epic battle between former allies.",
"popularity":59.186478,
"poster_path":"/5N20rQURev5CNDcMjHVUZhpoCNC.jpg",
"production_companies":[
{
"name":"Marvel Studios",
"id":420
}
],
"production_countries":[
{
"iso_3166_1":"US",
"name":"United States of America"
}
],
"release_date":"2016-04-27",
"revenue":1152000000,
"runtime":146,
"spoken_languages":[
{
"iso_639_1":"ro",
"name":"Română"
},
{
"iso_639_1":"en",
"name":"English"
},
{
"iso_639_1":"de",
"name":"Deutsch"
},
{
"iso_639_1":"ru",
"name":"Pусский"
}
],
"status":"Released",
"tagline":"Divided We Fall",
"title":"Captain America: Civil War",
"video":false,
"vote_average":6.9,
"vote_count":2740,
"release_dates":{
"results":[
{
"iso_3166_1":"BR",
"release_dates":[
{
"certification":"12",
"iso_639_1":"pt",
"note":"",
"release_date":"2016-05-05T00:00:00.000Z",
"type":3
}
]
},
{
"iso_3166_1":"IN",
"release_dates":[
{
"certification":"UA",
"iso_639_1":"en",
"note":"",
"release_date":"2016-05-06T00:00:00.000Z",
"type":3
}
]
},
{
"iso_3166_1":"TH",
"release_dates":[
{
"certification":"PG-13",
"iso_639_1":"",
"release_date":"2016-04-27T00:00:00.000Z",
"type":3
}
]
},
{
"iso_3166_1":"GB",
"release_dates":[
{
"certification":"12A",
"iso_639_1":"en",
"note":"",
"release_date":"2016-04-29T00:00:00.000Z",
"type":3
}
]
},
{
"iso_3166_1":"PH",
"release_dates":[
{
"certification":"",
"iso_639_1":"",
"note":"",
"release_date":"2016-05-04T00:00:00.000Z",
"type":3
}
]
},
{
"iso_3166_1":"IE",
"release_dates":[
{
"certification":"",
"iso_639_1":"",
"note":"",
"release_date":"2016-04-29T00:00:00.000Z",
"type":3
}
]
},
{
"iso_3166_1":"KZ",
"release_dates":[
{
"certification":"",
"iso_639_1":"",
"note":"",
"release_date":"2016-05-05T00:00:00.000Z",
"type":3
}
]
},
{
"iso_3166_1":"RO",
"release_dates":[
{
"certification":"",
"iso_639_1":"",
"note":"",
"release_date":"2016-05-06T00:00:00.000Z",
"type":3
}
]
},
{
"iso_3166_1":"AR",
"release_dates":[
{
"certification":"",
"iso_639_1":"",
"note":"",
"release_date":"2016-04-28T00:00:00.000Z",
"type":3
}
]
},
{
"iso_3166_1":"IL",
"release_dates":[
{
"certification":"",
"iso_639_1":"",
"note":"",
"release_date":"2016-05-06T00:00:00.000Z",
"type":3
}
]
},
{
"iso_3166_1":"GR",
"release_dates":[
{
"certification":"",
"iso_639_1":"",
"note":"",
"release_date":"2016-05-05T00:00:00.000Z",
"type":3
}
]
},
{
"iso_3166_1":"ES",
"release_dates":[
{
"certification":"",
"iso_639_1":"",
"note":"",
"release_date":"2016-04-29T00:00:00.000Z",
"type":3
}
]
},
{
"iso_3166_1":"CA",
"release_dates":[
{
"certification":"PG",
"iso_639_1":"",
"note":"",
"release_date":"2016-05-06T00:00:00.000Z",
"type":3
}
]
},
{
"iso_3166_1":"SG",
"release_dates":[
{
"certification":"",
"iso_639_1":"",
"note":"",
"release_date":"2016-05-05T00:00:00.000Z",
"type":3
}
]
},
{
"iso_3166_1":"PT",
"release_dates":[
{
"certification":"",
"iso_639_1":"",
"note":"",
"release_date":"2016-05-05T00:00:00.000Z",
"type":3
}
]
},
{
"iso_3166_1":"TR",
"release_dates":[
{
"certification":"",
"iso_639_1":"",
"note":"",
"release_date":"2016-05-06T00:00:00.000Z",
"type":3
}
]
},
{
"iso_3166_1":"DK",
"release_dates":[
{
"certification":"11",
"iso_639_1":"",
"note":"",
"release_date":"2016-05-05T00:00:00.000Z",
"type":3
}
]
},
{
"iso_3166_1":"BY",
"release_dates":[
{
"certification":"",
"iso_639_1":"",
"note":"",
"release_date":"2016-05-05T00:00:00.000Z",
"type":3
}
]
},
{
"iso_3166_1":"CL",
"release_dates":[
{
"certification":"",
"iso_639_1":"",
"note":"",
"release_date":"2016-04-28T00:00:00.000Z",
"type":3
}
]
},
{
"iso_3166_1":"FI",
"release_dates":[
{
"certification":"",
"iso_639_1":"",
"note":"",
"release_date":"2016-04-29T00:00:00.000Z",
"type":3
}
]
},
{
"iso_3166_1":"CH",
"release_dates":[
{
"certification":"",
"iso_639_1":"",
"note":"",
"release_date":"2016-04-27T00:00:00.000Z",
"type":3
}
]
},
{
"iso_3166_1":"FR",
"release_dates":[
{
"certification":"",
"iso_639_1":"",
"note":"Paris",
"release_date":"2016-04-18T00:00:00.000Z",
"type":1
},
{
"certification":"",
"iso_639_1":"",
"note":"",
"release_date":"2016-04-27T00:00:00.000Z",
"type":3
}
]
},
{
"iso_3166_1":"IT",
"release_dates":[
{
"certification":"",
"iso_639_1":"",
"note":"",
"release_date":"2016-05-04T00:00:00.000Z",
"type":3
}
]
},
{
"iso_3166_1":"RU",
"release_dates":[
{
"certification":"16+",
"iso_639_1":"",
"release_date":"2016-05-05T00:00:00.000Z",
"type":1
},
{
"certification":"",
"iso_639_1":"",
"note":"",
"release_date":"2016-05-05T00:00:00.000Z",
"type":3
},
{
"certification":"",
"iso_639_1":"ru",
"note":"BD-50, DVD-9",
"release_date":"2016-08-02T00:00:00.000Z",
"type":5
}
]
},
{
"iso_3166_1":"NO",
"release_dates":[
{
"certification":"",
"iso_639_1":"",
"note":"",
"release_date":"2016-04-29T00:00:00.000Z",
"type":3
}
]
},
{
"iso_3166_1":"SE",
"release_dates":[
{
"certification":"",
"iso_639_1":"",
"note":"",
"release_date":"2016-04-29T00:00:00.000Z",
"type":3
}
]
},
{
"iso_3166_1":"HU",
"release_dates":[
{
"certification":"",
"iso_639_1":"",
"note":"",
"release_date":"2016-05-12T00:00:00.000Z",
"type":3
}
]
},
{
"iso_3166_1":"EE",
"release_dates":[
{
"certification":"",
"iso_639_1":"",
"note":"",
"release_date":"2016-05-06T00:00:00.000Z",
"type":3
}
]
},
{
"iso_3166_1":"NZ",
"release_dates":[
{
"certification":"",
"iso_639_1":"",
"note":"",
"release_date":"2016-04-29T00:00:00.000Z",
"type":3
}
]
},
{
"iso_3166_1":"MX",
"release_dates":[
{
"certification":"",
"iso_639_1":"",
"note":"",
"release_date":"2016-04-28T00:00:00.000Z",
"type":3
}
]
},
{
"iso_3166_1":"BG",
"release_dates":[
{
"certification":"",
"iso_639_1":"",
"note":"",
"release_date":"2016-04-29T00:00:00.000Z",
"type":3
}
]
},
{
"iso_3166_1":"DE",
"release_dates":[
{
"certification":"12",
"iso_639_1":"",
"note":"Berlin",
"release_date":"2016-04-21T00:00:00.000Z",
"type":1
},
{
"certification":"12",
"iso_639_1":"de",
"note":"",
"release_date":"2016-04-28T00:00:00.000Z",
"type":3
}
]
},
{
"iso_3166_1":"AU",
"release_dates":[
{
"certification":"M",
"iso_639_1":"",
"note":"",
"release_date":"2016-04-28T00:00:00.000Z",
"type":3
}
]
},
{
"iso_3166_1":"PL",
"release_dates":[
{
"certification":"",
"iso_639_1":"",
"note":"",
"release_date":"2016-05-06T00:00:00.000Z",
"type":3
}
]
},
{
"iso_3166_1":"AZ",
"release_dates":[
{
"certification":"",
"iso_639_1":"",
"note":"",
"release_date":"2016-05-05T00:00:00.000Z",
"type":3
}
]
},
{
"iso_3166_1":"NL",
"release_dates":[
{
"certification":"",
"iso_639_1":"",
"note":"",
"release_date":"2016-04-28T00:00:00.000Z",
"type":3
}
]
},
{
"iso_3166_1":"MY",
"release_dates":[
{
"certification":"",
"iso_639_1":"",
"note":"",
"release_date":"2016-05-05T00:00:00.000Z",
"type":3
}
]
},
{
"iso_3166_1":"JP",
"release_dates":[
{
"certification":"",
"iso_639_1":"",
"note":"",
"release_date":"2016-04-29T00:00:00.000Z",
"type":3
}
]
},
{
"iso_3166_1":"US",
"release_dates":[
{
"certification":"PG-13",
"iso_639_1":"en",
"note":"Los Angeles, California",
"release_date":"2016-04-12T00:00:00.000Z",
"type":1
},
{
"certification":"PG-13",
"iso_639_1":"",
"note":"",
"release_date":"2016-05-06T00:00:00.000Z",
"type":3
},
{
"certification":"PG-13",
"iso_639_1":"",
"release_date":"2016-09-02T00:00:00.000Z",
"type":4
},
{
"certification":"PG-13",
"iso_639_1":"",
"release_date":"2016-09-13T00:00:00.000Z",
"type":5
}
]
}
]
}
}
这里有很多数据,但我们正在寻找 type: 4. Digital
。因此,查看它显示的数据:
{
"certification":"PG-13",
"iso_639_1":"",
"release_date":"2016-09-02T00:00:00.000Z",
"type":4
},
所以看起来在这种情况下的发布日期2016-09-02
对我来说似乎是错误的。因此,也许可以在 API 上更改它(如果您有访问权限),因为 blu-ray.com 说它即将推出,Sep 13, 2016 (5 Days)
或者我做错了:)
// 编辑。我刚刚更改了数字发布日期,所以它与亚马逊相同:)。所以简而言之,您需要做的是通过附加 release_dates 创建 url:
标准信息:
https://api.themoviedb.org/3/movie/
然后是电影的id:
271110
然后你的 api 密钥 ?api_key=**f7039633f2065942cd8a28d7cadad4
然后 append_to
&append_to_response=release_dates
有趣的事实是,您(现在)可以附加多个“事物”!而不是进行 5 次不同的调用。所以你可以做这样的事情:
https://api.themoviedb.org/3/movie/271110?api_key=**f7039633f2065942cd8a28d7cadad4&append_to_response=credits,images,videos,release_dates
这也将演员、图像和视频添加到 json 中。这么棒的api!