PeopleFindByUsername() public method

Returns a FoundUser object matching the screen name.
A FlickrException is raised if the email address is not found.
public PeopleFindByUsername ( string username ) : FoundUser
username string The screen name or username of the user.
return FoundUser
Exemplo n.º 1
0
        internal static FlickrNet.FoundUser FindUserByEmailOrName(FlickrNet.Flickr flickrProxy, string criteria)
        {
            FlickrNet.FoundUser user;

            Regex rxp = new Regex("(?<user>[^@]+)@(?<host>.+)");

            if (rxp.IsMatch(criteria))
            {
                user = flickrProxy.PeopleFindByEmail(criteria);
            }
            else
            {
                user = flickrProxy.PeopleFindByUsername(criteria);
            }

            return(user);
        }