SlackResponse Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents a response from the Slack Web API.
public class SlackResponse : Microsoft.Agents.Extensions.Slack.Api.SlackModel
type SlackResponse = class
inherit SlackModel
Public Class SlackResponse
Inherits SlackModel
- Inheritance
Remarks
Named properties cover the fields common to every Slack API response. Any additional fields returned by a specific method are accessible via the AdditionalProperties dictionary or via dot-notation path using Get<T>(String) and TryGet<T>(String, T).
SlackResponse r = await slackApi.CallAsync("chat.postMessage", options, token);
string channel = r.Get<string>("channel");
string msgTs = r.Get<string>("message.ts");
Constructors
| Name | Description |
|---|---|
| SlackResponse() | |
Properties
| Name | Description |
|---|---|
| AdditionalProperties |
Catch-all for any response fields not explicitly modelled above. |
| error |
Error code returned by Slack when ok is |
| ok |
Whether the API call succeeded. |
| response_metadata |
Gets or sets the metadata associated with the response. |
| ts |
Message timestamp, present on methods that create or update messages. |
| warning |
Warning code returned alongside a successful response. |
Methods
| Name | Description |
|---|---|
| Get<T>(String) |
Gets a value at the given dot-notation path. Supports dot-separated property
access and bracket array indexing (e.g. |
| GetData() |
Returns the JsonObject used for path navigation.
The default implementation lazily serializes this instance via
|
| NormalizePath(String) |
Normalizes a caller-supplied path before it is passed to the navigator. Override to remap C# property-name aliases to their JSON field names. The default implementation returns the path unchanged. (Inherited from SlackModel) |
| TryGet<T>(String, T) |
Tries to get a value at the given dot-notation path.
Returns |