按人从 Picasa 获取所有照片 [英] Get all photos from Picasa by person

查看:37
本文介绍了按人从 Picasa 获取所有照片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以通过 Picasa 网络相册数据 API 按人名获取所有照片?

我能找到的所有例子都展示了如何通过相册获取照片.

All examples I can find, shows how to get photos by an albumid.

推荐答案

通过设置默认",即使用该代码检索当前用户,您可以检索特定相册中的用户照片

by setting "default" that mean retrieving current user with that code you can retrive the user photos in specific album

PhotoQuery query = new PhotoQuery(PicasaQuery.CreatePicasaUri("default", albumId));
        PicasaFeed feed = picasaService.Query(query);

        foreach (var entry in feed.Entries)
        {
            PhotoAccessor photoAccessor = new PhotoAccessor((PicasaEntry)entry);
            Photo photo = new Photo();

            photo.Title = photoAccessor.PhotoTitle;
            photo.Summary = photoAccessor.PhotoSummary;
            photo.MediaUri = entry.Content.AbsoluteUri;
            photo.Id = photoAccessor.Id;
            photo.AlbumId = photoAccessor.AlbumId;

            photos.Add(photo);
        }

这篇关于按人从 Picasa 获取所有照片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆