如何在Web项目中使用OMBD API?

时间:2016-11-24 19:01:11

标签: html json

首先,感谢大家!

现在,关于手头的问题。对于我的网络编程项目,我的合作伙伴和我决定使用OMBD API,它是一个"做你想做的任何事情"因为我们的第一个项目本质上是类似的,所以我们决定创建类似于烂番茄网站的东西,除了使用微软认知服务这个项目将进一步扩展。

查看ombdiapi网站的用法非常简单,您将感兴趣的特定查询传递给url,并根据指定的返回类型返回json或xml文件。我想知道的是如何设置网址,执行它,然后通过网络项目获取数据?

我们从未使用任何外部api,只使用框架,但使用简单的cdn很容易设置。任何例子将不胜感激。

查询之前:http://www.omdbapi.com/?t=the+matrix&r=json

返回:

{"Title":"The Matrix","Year":"1999","Rated":"R","Released":"31 Mar 1999","Runtime":"136 min","Genre":"Action, Sci-Fi","Director":"Lana Wachowski, Lilly Wachowski","Writer":"Lilly Wachowski, Lana Wachowski","Actors":"Keanu Reeves, Laurence Fishburne, Carrie-Anne Moss, Hugo Weaving","Plot":"A computer hacker learns from mysterious rebels about the true nature of his reality and his role in the war against its controllers.","Language":"English","Country":"USA","Awards":"Won 4 Oscars. Another 33 wins & 43 nominations.","Poster":"https://images-na.ssl-images-amazon.com/images/M/MV5BMDMyMmQ5YzgtYWMxOC00OTU0LWIwZjEtZWUwYTY5MjVkZjhhXkEyXkFqcGdeQXVyNDYyMDk5MTU@._V1_SX300.jpg","Metascore":"73","imdbRating":"8.7","imdbVotes":"1,244,275","imdbID":"tt0133093","Type":"movie","Response":"True"}

0 个答案:

没有答案