BoxKite.Twitter.FriendsFollowersExtensions.ChangeFriendship C# (CSharp) Метод

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

Allows one to enable or disable retweets and device notifications from the specified user.
ref: https://dev.twitter.com/docs/api/1.1/post/friendships/update
public static ChangeFriendship ( this session, string screenName = "", int user_id, bool device = false, bool retweets = false ) : Task
session this
screenName string The screen name of the user
user_id int The ID of the user
device bool Enable/disable device notifications from the target user.
retweets bool Enable/disable retweets from the target user.
Результат Task
        public async static Task<UserStatus> ChangeFriendship(this IUserSession session, string screenName = "",
            int user_id = 0, bool device=false, bool retweets=false)
        {
            var parameters = new TwitterParametersCollection();
            parameters.Create(screen_name: screenName, user_id: user_id,device:device,retweets:retweets);
            
            if (parameters.EnsureEitherOr("screen_name", "user_id").IsFalse())
            {
                return session.MapParameterError<UserStatus>(
                        "Either screen_name or user_id required");
            }

            return await session.PostAsync(TwitterApi.Resolve("/1.1/friendships/update.json"), parameters)
                          .ContinueWith(c => c.MapToSingle<UserStatus>());
        }