public async Task ListUserPhotosTest() { var username = "******"; var client = new UnsplasharpClient(Credentials.ApplicationId); var userPhotos = await client.ListUserPhotos(username, perPage : 40); var userPhotosCustomParam = await client.ListUserPhotos(username, page : 2, perPage : 2, stats : true); Assert.IsNotNull(userPhotos); Assert.IsTrue(userPhotos.Count > 0); }
private async void GetAuthorsPhotos(string author, int page) { EnableControls(false); _photos = await _client.ListUserPhotos(author, page, 4); DisplayPhotos(); }
public async void getImage() { //var photoWidthHeight = await client.GetPhoto(id: "CPsdlpiqiog", width:150,height:150); //string url = photoWidthHeight.Urls.Full; //url=System.Uri.EscapeUriString(url); var userPhotos = await client.ListUserPhotos("tiqdesign"); foreach (var VARIABLE in userPhotos) { SunsplashImage img_user = new SunsplashImage(); string url = VARIABLE.Urls.Full; url = System.Uri.EscapeUriString(url); img_user.url = url; img_user.description = VARIABLE.Description; list_collection.Add(img_user); } lw_img.ItemsSource = list_collection; }