我试图了解如何根据DVD发布日期从themoviedb.org API获取电影。我只想退还DVD发行版而不是剧院中的电影。
我在某处读到他们现在支持digital release dates
。查看有关其API的信息,我发现了以下内容......
/movie/id/release_dates
Get the release dates, certifications and related information by country for a specific movie id.
The results are keyed by iso_3166_1 code and contain a type value which on our system, maps to:
1. Premiere
2. Theatrical (limited)
3. Theatrical
4. Digital
5. Physical
6. TV
Required Parameters
api_key
Optional Parameters
append_to_response Comma separated, any movie method
有人知道怎么做吗?我希望有一个示例URL来告诉我要使用什么。感谢您提供的任何帮助!
答案 0 :(得分:0)
我不确定我是否正确,但我也在为我的项目使用TMDB api。要获得数字版本,请将release_dates
添加到网址。所以在我的情况下它会这样:
https://api.themoviedb.org/3/movie/271110?api_key= ** f7039633f2065942cd8a28d7cadad4&安培; append_to_response = release_dates&安培;回调= 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
}
]
}
]
}
}
这里有很多数据,但我们正在寻找类型: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/
然后是电影的内容:
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!