Beispiel #1
0
 public void AddPhoto(Album album, Photo photo, PhotoData data)
 {
     Uri postUri = new Uri(PicasaQuery.CreatePicasaUri(username, album.Id));
     using (Stream s = new MemoryStream(data.Data))
     {
         PicasaEntry newentry = (PicasaEntry)service.Insert(postUri, s, data.Mime, photo.Name);
     }
 }
Beispiel #2
0
 public static PhotoData GetPhotoData(Photo photo)
 {
     using (WebClient client = new WebClient())
     {
         PhotoData data = new PhotoData()
         {
             Data = DownloadData(client, new Uri(photo.Url), NUMBER_OF_TRIES),
             Mime = client.ResponseHeaders["Content-Type"]
         };
         return data;
     }
 }
Beispiel #3
0
 public void AddPhoto(string album, Photo photo, PhotoData data)
 {
     Album a = GetAlbum(album);
     AddPhoto(a, photo, data);
 }