Advertisement
samjudson

FlickrNet in Windows 8 - VB.Net

Nov 24th, 2012
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 1.09 KB | None | 0 0
  1. ' This sample can be placed in the standard Windows 8 Grid project template with no other changes
  2. ' and it will produce a complete functioning application. Place inside the SampleDataSource New method
  3.  
  4. ' Be sure to replace the APIKEY below with your own api key.
  5.  
  6. Dim flickr As New Flickr(APIKEY)
  7.  
  8. flickr.PhotosetsGetListAsync("41888973@N00",
  9.      1,
  10.      10, Sub(r)
  11.              For Each photoset In r.Result
  12.                  Dim group As New SampleDataGroup(photoset.PhotosetId, photoset.Title, Nothing, photoset.PhotosetSmallUrl, photoset.Description)
  13.                  AllGroups.Add(group)
  14.  
  15.                  flickr.PhotosetsGetPhotosAsync(photoset.PhotosetId,
  16.                         PhotoSearchExtras.Description Or PhotoSearchExtras.AllUrls Or PhotoSearchExtras.OwnerName Or PhotoSearchExtras.DateTaken,
  17.                         1,
  18.                         20,
  19.                         Sub(r2)
  20.                             For Each Photo In r2.Result
  21.                                 Dim content = String.Format("By {0}, taken on {1}", Photo.OwnerName, Photo.DateTaken.ToString())
  22.                                 group.Items.Add(New SampleDataItem(Photo.PhotoId, Photo.Title, Nothing, Photo.MediumUrl, Photo.Description, content, group))
  23.                             Next
  24.                         End Sub)
  25.              Next
  26.          End Sub)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement