Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Marked obsolete methods and types with guidance on how to migrate. #274

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions SlackAPI/RPCMessages/ChannelListResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace SlackAPI
{
[Obsolete]
[RequestPath("channels.list")]
public class ChannelListResponse : Response
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SlackAPI
{
[Obsolete]
[RequestPath("im.list")]
public class DirectMessageConversationListResponse : Response
{
Expand Down
2 changes: 2 additions & 0 deletions SlackAPI/SlackClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ public void GetConversationsList(Action<ConversationsListResponse> callback, str
APIRequestWithToken(callback, parameters.ToArray());
}

[Obsolete("Use GetConversationsListAsync instead")]
public void GetChannelList(Action<ChannelListResponse> callback, bool ExcludeArchived = true)
{
APIRequestWithToken(callback, new Tuple<string, string>("exclude_archived", ExcludeArchived ? "1" : "0"));
Expand All @@ -166,6 +167,7 @@ public void GetGroupsList(Action<GroupListResponse> callback, bool ExcludeArchiv
APIRequestWithToken(callback, new Tuple<string, string>("exclude_archived", ExcludeArchived ? "1" : "0"));
}

[Obsolete("Use JoinDirectMessageChannelAsync instead")]
public void GetDirectMessageList(Action<DirectMessageConversationListResponse> callback)
{
APIRequestWithToken(callback);
Expand Down
4 changes: 2 additions & 2 deletions SlackAPI/SlackTaskClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public Task<ChannelInviteResponse> ChannelsInviteAsync(string userId, string cha
return APIRequestWithTokenAsync<ChannelInviteResponse>(parameters.ToArray());
}

public Task<ConversationsListResponse> GetConversationsListAsync(string cursor = "", bool ExcludeArchived = true, int limit = 100, string[] types = null)
public Task<ConversationsListResponse> GetConversationsListAsync(string cursor = "", bool ExcludeArchived = true, int limit = 1000, string[] types = null)
{
List<Tuple<string, string>> parameters = new List<Tuple<string, string>>()
{
Expand Down Expand Up @@ -608,7 +608,7 @@ public Task<UpdateResponse> UpdateAsync(string ts,

public Task<JoinDirectMessageChannelResponse> JoinDirectMessageChannelAsync(string user)
{
var param = new Tuple<string, string>("user", user);
var param = new Tuple<string, string>("users", user);
return APIRequestWithTokenAsync<JoinDirectMessageChannelResponse>(param);
}

Expand Down