Is there an API call to list blocked users and for muting a user?

Jun 13, 2014 at 1:51 PM
Coordinator
Jun 13, 2014 at 5:56 PM
Hi there,

These 2 features are not currently implemented in Tweetinvi. I can put them at the top of the priority and release them within Tweetinvi 0.9.4.0.

As the first endpoint returns multiple information here is how you need to extract the data until the feature is released :
// Get json
 var json = TwitterAccessor.ExecuteJsonGETQuery("https://api.twitter.com/1.1/blocks/list.json");

// Get Tweetinvi Object
var jobject = TweetinviContainer.Resolve<ITwitterAccessor>().ExecuteGETQuery("https://api.twitter.com/1.1/blocks/list.json");
var blockedUsersDTO = TweetinviContainer.Resolve<IJObjectStaticWrapper>().ToObject<IEnumerable<IUserDTO>>(jobject["users"]);
var blockedUsers = User.UserFactory.GenerateUsersFromDTO(blockedUsersDTO);
I was not able to find the url https://dev.twitter.com/docs/api/1.1/post/mutes/ that you posted that your referenced here.

Hope this serves you well.
Linvi
Marked as answer by linvi on 8/23/2014 at 4:33 PM
Jun 13, 2014 at 7:17 PM
As always you rock! the mute calls are:

https://dev.twitter.com/docs/api/1.1/post/mutes/users/create
https://dev.twitter.com/docs/api/1.1/post/mutes/users/destroy
https://dev.twitter.com/docs/api/1.1/get/mutes/users/list

I'm refactoring a whole PowerShell module using this library and the quick help has been awesome. Thanks