使用json增加flickr中的照片数量

时间:2010-04-23 09:21:27

标签: jquery json flickr

是否可以从flickr获取更多照片。什么是标准/默认号码?

$(document).ready(function(){
    $.getJSON("http://api.flickr.com/services/feeds/photos_public.gne?id=48719970@N07&lang=en-us&format=json&jsoncallback=?", function(data){
        $.each(data.items, function(i, item){
            var newurl = 'url(' + item.media.m + ')';
            $("<div class='images'/>").css('background', newurl).css('backgroundPosition','top center').css('backgroundRepeat','no-repeat').appendTo("#images").wrap("<a target=\"_blank\ href='" + item.link + "'></a>");
        })
        $("#title").html(data.title);
        $("#description").html(data.description);
        $("#link").html("<a href='" + data.link + "' target=\"_blank\">Visit the Viget Inspiration Pool!</a>");
        //Notice that the object here is "data" because that information sits outside of "items" in the JSON feed

        $('.jcycleimagecarousel').cycle({
            fx: 'fade',
            speed: 300,
            timeout: 3000,
            next: '#next',
            prev: '#prev',
            pause: 1,
            random: 1
        });
    });
});

1 个答案:

答案 0 :(得分:1)

我猜http://www.flickr.com/services/feeds/docs/photos_public/只会返回20项照片/视频!