Exemplo n.º 1
0
        /// <summary>
        /// Returns the URL for a particular picture.
        /// Typically you call GetPhotosInSet first and then this method to get
        /// the complete URL for a picture in the set in a particular size.
        /// </summary>
        /// <param name="photo">Details of the photo</param>
        /// <param name="size">The size requested for the picture</param>
        /// <returns>URL as a string</returns>
        public static string GetPhotoUrl(FlickrInfo photo, PhotoSizeEnum size)
        {
            string baseUrl = string.Format("http://farm{0}.static.flickr.com", photo.Farm);
            string url     = string.Format("{0}/{1}/{2}_{3}{4}.jpg", baseUrl, photo.Server, photo.Id, photo.Secret, size.Description());

            return(url);
        }
Exemplo n.º 2
0
        public static string GetPhotoUrl(S3Info photo, PhotoSizeEnum size)
        {
            string baseUrl = photo.MediaUrl;

            string url = string.Format("{0}?{1}", baseUrl, size.Description());

            return(url);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Returns the URL for a particular picture. 
        /// Typically you call GetPhotosInSet first and then this method to get 
        /// the complete URL for a picture in the set in a particular size.
        /// </summary>
        /// <param name="photo">Details of the photo</param>
        /// <param name="size">The size requested for the picture</param>
        /// <returns>URL as a string</returns>
        public static string GetPhotoUrl(FlickrInfo photo, PhotoSizeEnum size)
        {
            string baseUrl = string.Format("http://farm{0}.static.flickr.com", photo.Farm);
            string url = string.Format("{0}/{1}/{2}_{3}{4}.jpg", baseUrl, photo.Server, photo.Id, photo.Secret, size.Description());

            return url;
        }