Logo Search packages:      
Sourcecode: f-spot version File versions  Download package

Person.cs

using System;
using System.Xml.Serialization;
using System.Xml.Schema;

namespace FlickrNet
{

      /// <summary>
      /// The <see cref="Person"/> class contains details returned by the <see cref="Flickr.PeopleGetInfo"/>
      /// method.
      /// </summary>
      [System.Serializable]
00013       public class Person
      {
            /// <summary>The user id of the user.</summary>
            /// <remarks/>
            [XmlAttribute("nsid", Form=XmlSchemaForm.Unqualified)]
00018             public string UserId;
    
            /// <summary>Is the user an administrator. 
            /// 1 = admin, 0 = normal user.</summary>
            /// <remarks></remarks>
            [XmlAttribute("isadmin", Form=XmlSchemaForm.Unqualified)]
00024             public int IsAdmin;

            /// <summary>Does the user posses a pro account.
            /// 0 = free acouunt, 1 = pro account holder.</summary>
            [XmlAttribute("ispro", Form=XmlSchemaForm.Unqualified)]
00029             public int IsPro;
      
            /// <summary>Does the user posses a pro account.
            /// 0 = free acouunt, 1 = pro account holder.</summary>
            [XmlAttribute("iconserver", Form=XmlSchemaForm.Unqualified)]
00034             public int IconServer;
      
            /// <summary>The users username, also known as their screenname.</summary>
            [XmlElement("username", Form=XmlSchemaForm.Unqualified)]
00038             public string UserName;
      
            /// <summary>The users real name, as entered in their profile.</summary>
            [XmlElement("realname", Form=XmlSchemaForm.Unqualified)]
00042             public string RealName;
      
            /// <summary>Consists of your current location followed by country.</summary>
            /// <example>e.g. Newcastle, UK.</example>
            [XmlElement("location", Form=XmlSchemaForm.Unqualified)]
00047             public string Location;

            /// <summary>Sub element containing a summary of the users photo information.</summary>
            /// <remarks/>
            [XmlElement("photos", Form=XmlSchemaForm.Unqualified)]
00052             public PersonPhotosSummary PhotosSummary;

            /// <summary>
            /// The users photo location on Flickr
            /// http://www.flickr.com/photos/username/
            /// </summary>
            [XmlElement("photosurl",Form=XmlSchemaForm.Unqualified)]
00059             public string PhotosUrl;

            /// <summary>
            /// The users profile location on Flickr
            /// http://www.flickr.com/people/username/
            /// </summary>
            [XmlElement("profileurl",Form=XmlSchemaForm.Unqualified)]
00066             public string ProfileUrl;

            /// <summary>
            /// Returns the <see cref="Uri"/> for the users Buddy Icon.
            /// </summary>
            [XmlIgnore()]
            public Uri BuddyIconUrl
00073             {
                  get
                  {
                        if( IconServer == 0 )
                              return new Uri("http://www.flickr.com/images/buddyicon.jpg");
                        else
                              return new Uri(String.Format("http://static.flickr.com/{0}/buddyicons/{1}.jpg", IconServer, UserId));
                  }
            }
      }

      /// <summary>
      /// A summary of a users photos.
      /// </summary>
      [System.Serializable]
00088       public class PersonPhotosSummary
      {
            /// <summary>The first date the user uploaded a picture, converted into <see cref="DateTime"/> format.</summary>
            [XmlIgnore()]
            public DateTime FirstDate
00093             {
                  get { return Utils.UnixTimestampToDate(firstdate_raw); }
            }

            /// <summary>The first date the user took a picture, converted into <see cref="DateTime"/> format.</summary>
            [XmlIgnore()]
            public DateTime FirstTakenDate
00100             {
                  get { return Utils.UnixTimestampToDate(firsttakendate_raw); }
            }

            /// <summary>The total number of photos for the user.</summary>
            /// <remarks/>
            [XmlElement("count", Form=XmlSchemaForm.Unqualified)]
00107             public int PhotoCount;

            /// <remarks>The unix timestamp of the date the first photo was uploaded.</remarks>
            [XmlElement("firstdate", Form=XmlSchemaForm.Unqualified)]
00111             public string firstdate_raw;

            /// <remarks>The unix timestamp of the date the first photo was uploaded.</remarks>
            [XmlElement("firsttakendate", Form=XmlSchemaForm.Unqualified)]
00115             public string firsttakendate_raw;

      }
}

Generated by  Doxygen 1.6.0   Back to index