Beispiel #1
0
        /// <summary>
        /// Asynchronously remove a relationship between a user and another user or subreddit.
        /// OAuth2 use requires appropriate scope based on the 'type' of the relationship:
        /// moderator: Use "moderator_invite"
        /// moderator_invite: modothers
        /// contributor: modcontributors
        /// banned: modcontributors
        /// muted: modcontributors
        /// wikibanned: modcontributors and modwiki
        /// wikicontributor: modcontributors and modwiki
        /// friend: Use /api/v1/me/friends/{username}
        /// enemy: Use /api/block
        /// Complement to POST_friend
        /// </summary>
        /// <param name="usersUnfriendInput">A valid UsersUnfriendInput instance</param>
        /// <param name="subreddit">A subreddit</param>
        public async Task RemoveRelationshipAsync(UsersUnfriendInput usersUnfriendInput, string subreddit = null)
        {
            usersUnfriendInput.name = Name;

            await Dispatch.Users.UnfriendAsync(usersUnfriendInput, subreddit);
        }
Beispiel #2
0
 /// <summary>
 /// Remove a relationship between a user and another user or subreddit asynchronously.
 /// The user can either be passed in by name (nuser) or by fullname (iuser).
 /// If type is friend or enemy, 'container' MUST be the current user's fullname; for other types, the subreddit must be set via URL (e.g., /r/funny/api/unfriend).
 /// OAuth2 use requires appropriate scope based on the 'type' of the relationship:
 /// moderator: modothers
 /// moderator_invite: modothers
 /// contributor: modcontributors
 /// banned: modcontributors
 /// muted: modcontributors
 /// wikibanned: modcontributors and modwiki
 /// wikicontributor: modcontributors and modwiki
 /// friend: Use /api/v1/me/friends/{username}
 /// enemy: Use /api/block
 /// Complement to POST_friend
 /// </summary>
 /// <param name="usersUnfriendInput">A valid UsersUnfriendInput instance</param>
 /// <param name="subreddit">A subreddit</param>
 public async Task UnfriendAsync(UsersUnfriendInput usersUnfriendInput, string subreddit = null)
 {
     await SendRequestAsync <object>(Sr(subreddit) + "api/unfriend", usersUnfriendInput, Method.POST);
 }
Beispiel #3
0
        /// <summary>
        /// Remove a relationship between a user and another user or subreddit.
        /// If type is friend or enemy, 'container' MUST be the current user's fullname; for other types, the subreddit must be set via URL (e.g., /r/funny/api/unfriend).
        /// OAuth2 use requires appropriate scope based on the 'type' of the relationship:
        /// moderator: Use "moderator_invite"
        /// moderator_invite: modothers
        /// contributor: modcontributors
        /// banned: modcontributors
        /// muted: modcontributors
        /// wikibanned: modcontributors and modwiki
        /// wikicontributor: modcontributors and modwiki
        /// friend: Use /api/v1/me/friends/{username}
        /// enemy: Use /api/block
        /// Complement to POST_friend
        /// </summary>
        /// <param name="usersUnfriendInput">A valid UsersUnfriendInput instance</param>
        /// <param name="subreddit">A subreddit</param>
        public void RemoveRelationship(UsersUnfriendInput usersUnfriendInput, string subreddit = null)
        {
            usersUnfriendInput.name = Name;

            Dispatch.Users.Unfriend(usersUnfriendInput, subreddit);
        }
Beispiel #4
0
 /// <summary>
 /// Remove a relationship between a user and another user or subreddit.
 /// The user can either be passed in by name (nuser) or by fullname (iuser).
 /// If type is friend or enemy, 'container' MUST be the current user's fullname; for other types, the subreddit must be set via URL (e.g., /r/funny/api/unfriend).
 /// OAuth2 use requires appropriate scope based on the 'type' of the relationship:
 /// moderator: modothers
 /// moderator_invite: modothers
 /// contributor: modcontributors
 /// banned: modcontributors
 /// muted: modcontributors
 /// wikibanned: modcontributors and modwiki
 /// wikicontributor: modcontributors and modwiki
 /// friend: Use /api/v1/me/friends/{username}
 /// enemy: Use /api/block
 /// Complement to POST_friend
 /// </summary>
 /// <param name="usersUnfriendInput">A valid UsersUnfriendInput instance</param>
 /// <param name="subreddit">A subreddit</param>
 public void Unfriend(UsersUnfriendInput usersUnfriendInput, string subreddit = null)
 {
     SendRequest <object>(Sr(subreddit) + "api/unfriend", usersUnfriendInput, Method.POST);
 }