使用具有多个参数的 YQL 获取 flickr 照片
我正在尝试创建一个 Flex 应用程序,以从 flickr(使用 YQL)获取给定邮政编码附近的“某物”的照片,并按兴趣排序。
我不知道怎么办。我在 http://developer.yahoo.com/yql/console/ 并且我看到有不同的表:flickr.photos.search、flickr.photos.interestigness 等。我想我必须进行 sql 连接才能过滤照片,但我不知道它们包含哪些列。
你能帮我吗?
谢谢
I'm trying to create a Flex app to get photos from flickr(using YQL) of "something" near a given ZIPCODE and ordered by interestigness.
I can't figure out how. I'm on http://developer.yahoo.com/yql/console/ and i see that there are different tables: flickr.photos.search, flickr.photos.interestigness etc.I guess i have to make an sql join in order to filter the photos but i dpn't know what columns they contain.
Can you please help me?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
搜索的关键表是
flickr.photos.search
,它允许您使用多种过滤器搜索照片,并根据需要按兴趣程度对结果进行排序。一个简单的查询,在美国加利福尼亚州比佛利山庄 20 公里半径范围内的照片中搜索单词“hill”,并按兴趣度对结果进行排序,可能如下所示。
» 在控制台中尝试此操作
使用控制台时,每个表应该有一个关联的 URL,指向该表提供的服务的文档。该链接以及有关表的其他信息(例如所需参数)可以通过执行
desc 形式的查询来找到。例如,YQL 控制台中的查询
desc flickr.photos.search
显示:那个
documentationURL
(此处)会将您带到flickr.photos.search
API 方法的 Flickr 文档页面,其中显示了可以使用的所有可用参数。您将看到我们用于搜索比佛利山庄附近照片的 YQL 查询中的where
子句参数的说明。The key table to search on is
flickr.photos.search
, which allows you to search photos with numerous filters and to sort the results by interestingness as you want.A simple query which searches photos within a 20km radius of Beverly Hills, CA, USA for the word "hill" and orders the results by interestingness might look like the following.
» Try this in the console
When using the console, each table should have an associated URL pointing to the documentation for the service that that table provides. That link, and other information about the table (e.g. required parameters), can be found by executing a query of the form
desc <table name>
. For example, the querydesc flickr.photos.search
in the YQL console shows:That
documentationURL
(here) takes you to Flickr's documentation page for theflickr.photos.search
API method, which shows all of the available parameters that can be used. You'll see descriptions for thewhere
clause parameters from the YQL query we used to search for photos near Beverly Hills.