Json 和 Flickr API
我已经浏览了 http://css-tricks.com/examples/BuildYourSocialPage/ 这很棒,但我只想使用 API 自定义它引入 (6) 的 Flickr 图像数量。
我知道我可以设置一个带有 Overflow:hidden 的 div 来显示所需的数量,但我不希望代码变得很糟糕。
有人可以帮忙吗?
另外,我想显示我的 last.fm 最新专辑,有谁知道哪里可以获取 API 来执行此操作?
谢谢
Paul
P.SI 知道你可以获取预制插件并通过 wordpress 完成所有这些工作,但我不想这样做。这只是一个测试想法的小实验页面。
I've gone through the http://css-tricks.com/examples/BuildYourSocialPage/ which is great, but I just want to customise the amount of Flickr images it pulls in(6) with the API.
I know I could set a div with overflow:hidden to show the desired amount, but I don't want the code to be hacky.
Can anyone help?
Also I'd like to display my last.fm latest albums, does anyone know where you can get the API to do this?
Thanks
Paul
P.S I know you can get premade plugins and do all this through wordpress, but I don't want to do that. It's just a small expirmental page to test ideas.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
需要注意的一件事是,示例页面实际上并未使用完整的 Flickr API——它使用一个简单的提要来检索照片。
这提供了较少的控制——我相信这些提要中的项目数量固定为 20。
我可以想到几种不同的方法可以从这里开始。
您可以:
YQL 尤其非常酷而且非常强大,尤其是在处理雅虎自己的服务(如 Flickr)时。看到你说你正在玩弄想法,我想我应该给你一些有趣的想法:)
One thing to note is that the example page is not actually using the full-on Flickr API -- it's using a simple feed to retrieve the photos.
This gives less control -- I believe the number of items from these feeds are fixed at 20.
I can think of a few different ways you can go from here.
You could:
YQL in particular is very cool and very powerful, especially when dealing with Yahoo's own services like Flickr. Seeing as you say you're playing with ideas, I figured I'd give you some interesting ones to play with :)
Flickr Feed 服务不允许此类参数化,但您可以更改显示它们的 JavaScript 代码以仅过滤前 6 个
Last.fm Api => user.getWeeklyAlbumChart
The Flickr Feeds Service do not allow such parameterization, but you could change the JavaScript code that displays them to filter only the first 6
Last.fm Api => user.getWeeklyAlbumChart