像在IMDB中一样检索电影定价

时间:2014-11-11 12:20:20

标签: ios

我需要知道,我们如何获得任何有效的特定电影的定价清单。在iTunes中有许多电影应用程序,它为所有网站提供实时流媒体的定价。如何检索定价清单。

1 个答案:

答案 0 :(得分:2)

如果我正确理解您的问题,您希望获得 iTunes Store电影元数据,其中包括定价。您可以使用 iTunes Store Search API ,这也会返回iTunes定价。

https://itunes.apple.com/search?term=ventura&media=movie

此API调用将返回带有以下数据的JSON响应:

{"wrapperType":"track", "kind":"feature-movie", "trackId":271495352, "artistName":"Steve Oedekerk", "trackName":"Ace Ventura: When Nature Calls", "trackCensoredName":"Ace Ventura: When Nature Calls", "trackViewUrl":"https://itunes.apple.com/us/movie/ace-ventura-when-nature-calls/id271495352?uo=4", "previewUrl":"http://a1567.v.phobos.apple.com/us/r1000/035/Video/39/3b/c3/mzm.idnfqvpl..720w.h264lc.D2.p.m4v", "artworkUrl30":"http://a5.mzstatic.com/us/r30/Video/61/32/8b/mzl.vpqgqzrg.30x30-50.jpg", "artworkUrl60":"http://a2.mzstatic.com/us/r30/Video/61/32/8b/mzl.vpqgqzrg.60x60-50.jpg", "artworkUrl100":"http://a5.mzstatic.com/us/r30/Video/61/32/8b/mzl.vpqgqzrg.100x100-75.jpg", "collectionPrice":9.99, "trackPrice":9.99, "trackRentalPrice":2.99000, "collectionHdPrice":14.99000, "trackHdPrice":14.99000, "trackHdRentalPrice":3.99000, "releaseDate":"2013-10-02T07:00:00Z", "collectionExplicitness":"notExplicit", "trackExplicitness":"notExplicit", "trackTimeMillis":5641183, "country":"USA", "currency":"USD", "primaryGenreName":"Comedy", "contentAdvisoryRating":"PG-13", 
"longDescription":"Africa's the place and Ace is on the case, setting out to rescue an animal he loathes: a bat! Jim Carrey (Batman Forever) returns as Ace, the alligator-wrasslin', elephant-calling, monkey-shining, loogie-launching, burning coals-crossing, disguise-mastering pet detective. If you're ready to laugh like a pack of hyenas, if you want more fun than an industrial-sized barrel of monkeys, you know what to do. Heed the call.", "radioStationUrl":"https://itunes.apple.com/station/idra.271495352"}

注意以下参数:

  • collectionPrice
  • trackPrice
  • trackRentalPrice
  • collectionHdPrice
  • trackHdPrice
  • trackHdRentalPrice

如果您正在寻找其他网站流媒体价格,我会尝试在服务端寻找能够为您提供此信息的特定API。

更成熟的服务通常提供REST API来访问它的信息。您要做的基本上是 - 在所有可用API之上创建抽象定价层。虽然这个答案在每项服务上都会详细说明,但我可以为您提到的网站提供一些信息:

虽然这些链接无法解决您的问题,但您应该能够从他们那里获得足够的信息,以便真正了解您可以做些什么。