public static ListPhotosResponse Unmarshall(UnmarshallerContext context) { ListPhotosResponse listPhotosResponse = new ListPhotosResponse(); listPhotosResponse.HttpResponse = context.HttpResponse; listPhotosResponse.Code = context.StringValue("ListPhotos.Code"); listPhotosResponse.Message = context.StringValue("ListPhotos.Message"); listPhotosResponse.NextCursor = context.StringValue("ListPhotos.NextCursor"); listPhotosResponse.TotalCount = context.IntegerValue("ListPhotos.TotalCount"); listPhotosResponse.RequestId = context.StringValue("ListPhotos.RequestId"); listPhotosResponse.Action = context.StringValue("ListPhotos.Action"); List <ListPhotosResponse.ListPhotos_Photo> listPhotosResponse_photos = new List <ListPhotosResponse.ListPhotos_Photo>(); for (int i = 0; i < context.Length("ListPhotos.Photos.Length"); i++) { ListPhotosResponse.ListPhotos_Photo photo = new ListPhotosResponse.ListPhotos_Photo(); photo.Id = context.LongValue("ListPhotos.Photos[" + i + "].Id"); photo.Title = context.StringValue("ListPhotos.Photos[" + i + "].Title"); photo.FileId = context.StringValue("ListPhotos.Photos[" + i + "].FileId"); photo.State = context.StringValue("ListPhotos.Photos[" + i + "].State"); photo.Md5 = context.StringValue("ListPhotos.Photos[" + i + "].Md5"); photo.IsVideo = context.BooleanValue("ListPhotos.Photos[" + i + "].IsVideo"); photo.Remark = context.StringValue("ListPhotos.Photos[" + i + "].Remark"); photo.Width = context.LongValue("ListPhotos.Photos[" + i + "].Width"); photo.Height = context.LongValue("ListPhotos.Photos[" + i + "].Height"); photo.Ctime = context.LongValue("ListPhotos.Photos[" + i + "].Ctime"); photo.Mtime = context.LongValue("ListPhotos.Photos[" + i + "].Mtime"); listPhotosResponse_photos.Add(photo); } listPhotosResponse.Photos = listPhotosResponse_photos; return(listPhotosResponse); }
public async Task <ActionResult> ListPhotos(string countryKey, string cityKey, string albumKey) { var album = await _travelService.GetAlbum(countryKey, cityKey, albumKey); if (album == null) { return(NotFound()); } SetTitle($"world traveler | {album.CountryName.ToLower()} | {album.CityName.ToLower()} | {album.AlbumName.ToLower()}"); SetKeywords(album.AlbumName, album.CityName, album.CountryName); SetDescription($"Pictures of {album.AlbumName} in {album.CityName}, {album.CountryName}. {album.Description}"); var response = new ListPhotosResponse(album); return(View(response)); }