我正试图找出如何根据DVD发行日期从themoviedb.org API获取电影。我只想退DVD,而不是还在电影院上映的电影。
我在某处读到他们现在支持digital release dates
。查看他们的API信息,我发现如下…
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来告诉我该使用什么。谢谢你提供的任何帮助!
我不确定我是否得到了这个正确的,但我正在使用TMDB api为我的项目以及。要获得数字版本,请将release_dates
添加到url中。在我的例子中,它是这样的:
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(如果你有访问权限),因为蓝光。com说它即将到来的Sep 13, 2016 (5 Days)
或者也许我做错了:)
//编辑。我只是更改了数字发行日期,所以它和亚马逊是一样的:)。简而言之,你需要做的就是创建url加上release_dates:
标准信息:
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!