diff --git a/Mastonet/IMastodonClient.cs b/Mastonet/IMastodonClient.cs index ab292fe..d896011 100644 --- a/Mastonet/IMastodonClient.cs +++ b/Mastonet/IMastodonClient.cs @@ -121,8 +121,10 @@ public interface IMastodonClient /// Update a list. /// /// The title of the list + /// Whether members of this list need to get removed from the “Home” feed + /// One of followed, list, or none. Defaults to list. /// The list updated - Task UpdateList(string listId, string newTitle); + Task UpdateList(string listId, string newTitle, bool exclusive, string replies_policy); /// /// Remove a list. diff --git a/Mastonet/MastodonClient.cs b/Mastonet/MastodonClient.cs index cea31b1..356d9a4 100644 --- a/Mastonet/MastodonClient.cs +++ b/Mastonet/MastodonClient.cs @@ -36,11 +36,11 @@ public MastodonClient(string instance, string accessToken, HttpClient client) /// /// Returns the current Instance. Does not require authentication [Obsolete("This method is deprecated on Mastodon v4. Use GetInstanceV2() instead.")] - public Task GetInstance() + public Task GetInstance() { return this.Get("/api/v1/instance"); } - + /// /// Getting instance information /// @@ -87,11 +87,11 @@ public Task> GetTrendingStatuses(int? offset = null, int? l { var queryParams = ""; - if(offset.HasValue) + if (offset.HasValue) { queryParams = "?offset=" + offset.Value; } - if(limit.HasValue) + if (limit.HasValue) { queryParams += (queryParams != "" ? "&" : "?") + "limit=" + limit.Value; } @@ -248,8 +248,10 @@ public Task CreateList(string title) /// Update a list. /// /// The title of the list + /// Whether members of this list need to get removed from the “Home” feed + /// One of followed, list, or none. Defaults to list. /// The list updated - public Task UpdateList(string listId, string newTitle) + public Task UpdateList(string listId, string newTitle, bool exclusive, string replies_policy = "list") { if (string.IsNullOrEmpty(newTitle)) { @@ -259,6 +261,8 @@ public Task UpdateList(string listId, string newTitle) var data = new List>() { new KeyValuePair("title", newTitle), + new KeyValuePair("exclusive", exclusive.ToString()), + new KeyValuePair("replies_policy", replies_policy) }; return this.Put("/api/v1/lists/" + listId, data);