BoxKite.Twitter.UsersExtensions.GetUserProfile C# (CSharp) Метод

GetUserProfile() публичный статический Метод

Returns a variety of information about the user specified by the required user_id or screen_name parameter. The author's most recent Tweet will be returned inline when possible.
public static GetUserProfile ( this session, string screenName = "", long userId ) : Task
session this
screenName string The screen name of the user for whom to return results for. Either a id or screen_name is required for this method.
userId long The ID of the user for whom to return results for. Either an id or screen_name is required for this method.
Результат Task
        public static async Task<User> GetUserProfile(this ITwitterSession session, string screenName="", long userId=0)
        {
            var parameters = new TwitterParametersCollection();
            parameters.Create(screen_name:screenName,include_entities:true,user_id:userId);

            if (parameters.EnsureEitherOr("screen_name", "user_id").IsFalse())
            {
                return session.MapParameterError<User>(
                        "Either screen_name or user_id required");
            }

            return await session.GetAsync(TwitterApi.Resolve("/1.1/users/show.json"), parameters)
                          .ContinueWith(c => c.MapToSingle<User>());
        }