Quantcast
Channel: Tweetinvi a friendly Twitter C# library
Viewing all articles
Browse latest Browse all 4126

New Post: Blocking users

$
0
0
Hi,

This method is not yet implemented but you can use the TwitterAccessor like this :
// var queryWithUserId = "https://api.twitter.com/1.1/users/report_spam.json?user_id=YOUR_USER_ID";var queryWithScreenName = "https://api.twitter.com/1.1/users/report_spam.json?screen_name=YOUR_USER_SCREEN_NAME";
var spamReportedSuccessfully = TwitterAccessor.TryExecutePOSTQuery(queryWithScreenName);
Concerning user list this is a bit more complicated, here is the code you need:
publicclass BlockedUsersContainer
{
    public IEnumerable<IUserDTO> Users { get; set; }

    public IEnumerable<IUser> BlockedUsers
    {
        get { return User.GenerateUsersFromDTO(Users); }
    }
}

// Invoke the reques in your codevar blockedUsersQuery = "https://api.twitter.com/1.1/blocks/list.json?skip_status=true";
var blockedUsers = TwitterAccessor.ExecuteGETQuery<BlockedUsersContainer>(blockedUsersQuery).BlockedUsers;
I can see how the 2 posts are related but please try to open news posts if the features are different.

Regards,
Linvi

Viewing all articles
Browse latest Browse all 4126

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>