-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding MessageSearchResult class for search results
- Loading branch information
Showing
3 changed files
with
32 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
using SlackNet.Events; | ||
|
||
namespace SlackNet.WebApi; | ||
namespace SlackNet.WebApi; | ||
|
||
public class MessageSearchResponse | ||
{ | ||
public string Query { get; set; } | ||
public SearchResults<MessageEvent> Messages { get; set; } | ||
public SearchResults<MessageSearchResult> Messages { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using System.Collections.Generic; | ||
using Newtonsoft.Json; | ||
using SlackNet.Blocks; | ||
|
||
namespace SlackNet.WebApi; | ||
|
||
public class MessageSearchResult | ||
{ | ||
public string Iid { get; set; } | ||
public string Team { get; set; } | ||
public double Score { get; set; } | ||
public Conversation Channel { get; set; } | ||
public string Type { get; set; } | ||
public string User { get; set; } | ||
public string Username { get; set; } | ||
public string Ts { get; set; } | ||
public IList<Block> Blocks { get; set; } = new List<Block>(); | ||
public string Text { get; set; } | ||
public string Permalink { get; set; } | ||
public bool NoReactions { get; set; } | ||
|
||
/// <summary> | ||
/// Anything that Slack includes in the search result that isn't covered by other properties can be accessed through this property. | ||
/// If you find anything here, please raise an issue at https://github.com/soxtoby/SlackNet/issues so we can add it to the library. | ||
/// </summary> | ||
[JsonExtensionData] | ||
public Dictionary<string, object> ExtraProperties { get; set; } = new(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
using SlackNet.Events; | ||
|
||
namespace SlackNet.WebApi; | ||
namespace SlackNet.WebApi; | ||
|
||
public class SearchResponse | ||
{ | ||
public string Query { get; set; } | ||
public SearchResults<MessageEvent> Messages { get; set; } | ||
public SearchResults<MessageSearchResult> Messages { get; set; } | ||
public SearchResults<File> Files { get; set; } | ||
} |