Class Sender
Utility helper for sending Wolf Client messages.
Namespace: TehGM.Wolfringo
Assembly: Wolfringo.Utilities.dll
Syntax
public static class Sender
Remarks
Sender utility is designed to abstract most common actions from the message and response objects.
Methods are designed to make use of cached entities where possible.
This utility does not support any custom message or response classes designed by the developer.
Methods
| Improve this Doc View SourceAddContactAsync(IWolfClient, UInt32, CancellationToken)
Add contact.
Declaration
public static Task AddContactAsync(this IWolfClient client, uint userID, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the request with. |
UInt32 | userID | ID of user to add. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task |
Remarks
Before adding, it's recommended to check if user is already a contact. Adding user that's already in contacts list will result in an exception being thrown.
See Also
AdminUserAsync(IWolfClient, UInt32, UInt32, CancellationToken)
Admin a group member.
Declaration
public static Task AdminUserAsync(this IWolfClient client, uint userID, uint groupID, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to perform the admin action with. |
UInt32 | userID | User ID of group member to admin. |
UInt32 | groupID | ID of group to admin the user in. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task |
See Also
BanUserAsync(IWolfClient, UInt32, UInt32, CancellationToken)
Ban a group member.
Declaration
public static Task BanUserAsync(this IWolfClient client, uint userID, uint groupID, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to perform the admin action with. |
UInt32 | userID | User ID of group member to ban. |
UInt32 | groupID | ID of group to ban the user from. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task |
See Also
BlockUserAsync(IWolfClient, UInt32, CancellationToken)
Block user.
Declaration
public static Task BlockUserAsync(this IWolfClient client, uint userID, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the request with. |
UInt32 | userID | ID of user to block. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task |
See Also
ClearNotificationsAsync(IWolfClient, CancellationToken)
Clear notifications list.
Declaration
public static Task ClearNotificationsAsync(this IWolfClient client, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the request with. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task |
See Also
CreateGroupAsync(IWolfClient, String, String, Action<GroupCreateMessage.Builder>, CancellationToken)
Creates a new group.
Declaration
public static async Task<WolfGroup> CreateGroupAsync(this IWolfClient client, string groupName, string groupDescription, Action<GroupCreateMessage.Builder> groupSettings, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the request with. |
String | groupName | Name of group to create. |
String | groupDescription | Short description for the group. |
Action<GroupCreateMessage.Builder> | groupSettings | Group profile settings to apply. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task<WolfGroup> | Profile of created group. |
See Also
CreateGroupAsync(IWolfClient, String, String, CancellationToken)
Creates a new group.
Declaration
public static Task<WolfGroup> CreateGroupAsync(this IWolfClient client, string groupName, string groupDescription, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the request with. |
String | groupName | Name of group to create. |
String | groupDescription | Short description for the group. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task<WolfGroup> | Profile of created group. |
See Also
DeleteChatMessageAsync(IWolfClient, ChatMessage, CancellationToken)
Requests chat message to be deleted.
Declaration
public static Task<ChatUpdateResponse> DeleteChatMessageAsync(this IWolfClient client, ChatMessage message, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the message with. |
ChatMessage | message | Chat message to delete. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task<ChatUpdateResponse> | Message updating result. |
DeleteContactAsync(IWolfClient, UInt32, CancellationToken)
Delete contact.
Declaration
public static Task DeleteContactAsync(this IWolfClient client, uint userID, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the request with. |
UInt32 | userID | ID of user to add. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task |
See Also
GetAchievementAsync(IWolfClient, WolfLanguage, UInt32, CancellationToken)
Retrieve achievement by ID.
Declaration
public static async Task<WolfAchievement> GetAchievementAsync(this IWolfClient client, WolfLanguage language, uint id, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the request with. |
WolfLanguage | language | Language to retrieve achievements in. |
UInt32 | id | ID of achievement to retrieve. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task<WolfAchievement> | Retrieved achievement. |
Remarks
Achievement already cached will be retrieved from cache.
Due to the construction of the protocol, if achievement is not cached, the client will request all achievements again.
See Also
GetAchievementsAsync(IWolfClient, WolfLanguage, IEnumerable<UInt32>, CancellationToken)
Retrieve achievements by their IDs.
Declaration
public static async Task<IEnumerable<WolfAchievement>> GetAchievementsAsync(this IWolfClient client, WolfLanguage language, IEnumerable<uint> achievementIDs, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the request with. |
WolfLanguage | language | Language to retrieve achievements in. |
IEnumerable<UInt32> | achievementIDs | IDs of achievements to retrieve. Null or empty to get all achievements. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task<IEnumerable<WolfAchievement>> | Enumerable of retrieved achievements. |
Remarks
Achievements already cached will be retrieved from cache.
Due to the construction of the protocol, if any achievement is not cached, the client will request all achievements again.
All child achievements will be surfaced to the top level, so can be accessed by direct enumerable queries.
See Also
GetAllAchievementsAsync(IWolfClient, WolfLanguage, CancellationToken)
Retrieve all achievements.
Declaration
public static async Task<IEnumerable<WolfAchievement>> GetAllAchievementsAsync(this IWolfClient client, WolfLanguage language, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the request with. |
WolfLanguage | language | Language to retrieve achievements in. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task<IEnumerable<WolfAchievement>> | Enumerable of retrieved achievements. |
Remarks
This method skips cache completely, and all achievements will be downloaded from the server.
All child achievements will be surfaced to the top level, so can be accessed by direct enumerable queries.
See Also
GetAllCharmsAsync(IWolfClient, CancellationToken)
Retrieve all charms.
Declaration
public static Task<IEnumerable<WolfCharm>> GetAllCharmsAsync(this IWolfClient client, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the request with. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task<IEnumerable<WolfCharm>> | Enumerable of retrieved charms. |
Remarks
Charms already cached will be retrieved from cache. Others will be requested from the server.
See Also
GetBlockedUsersAsync(IWolfClient, CancellationToken)
Get users blocked by current user.
Declaration
public static async Task<IEnumerable<WolfUser>> GetBlockedUsersAsync(this IWolfClient client, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the request with. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task<IEnumerable<WolfUser>> | Enumerable of profiles of blocked users. |
Remarks
Users already cached will be retrieved from cache. Others will be requested from the server.
See Also
GetCharmAsync(IWolfClient, UInt32, CancellationToken)
Get charm by ID.
Declaration
public static async Task<WolfCharm> GetCharmAsync(this IWolfClient client, uint charmID, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the request with. |
UInt32 | charmID | ID of charm to retrieve. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task<WolfCharm> | Retrieved charm. |
Remarks
If charm is already cached, cached instance will be returned. Otherwise a request to the server will be made.
See Also
GetCharmsAsync(IWolfClient, IEnumerable<UInt32>, CancellationToken)
Retrieve charms by their IDs.
Declaration
public static async Task<IEnumerable<WolfCharm>> GetCharmsAsync(this IWolfClient client, IEnumerable<uint> charmIDs, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the request with. |
IEnumerable<UInt32> | charmIDs | IDs of charms to retrieve. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task<IEnumerable<WolfCharm>> | Enumerable of retrieved charms. |
Remarks
Charms already cached will be retrieved from cache. Others will be requested from the server.
See Also
GetContactListAsync(IWolfClient, CancellationToken)
Get current user's contact list.
Declaration
public static async Task<IEnumerable<WolfUser>> GetContactListAsync(this IWolfClient client, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the request with. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task<IEnumerable<WolfUser>> | Enumerable of profiles of all contacts. |
Remarks
Users already cached will be retrieved from cache. Others will be requested from the server.
See Also
GetCurrentUserAsync(IWolfClient, CancellationToken)
Get profile of currently logged in user.
Declaration
public static Task<WolfUser> GetCurrentUserAsync(this IWolfClient client, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the request with. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task<WolfUser> | Currently logged in user. |
Remarks
If user is already cached, cached instance will be returned. Otherwise a request to the server will be made.
Exceptions
Type | Condition |
---|---|
InvalidOperationException | Not logged in. |
See Also
GetCurrentUserGroupsAsync(IWolfClient, CancellationToken)
Retrieve profiles of groups current user is in.
Declaration
public static async Task<IEnumerable<WolfGroup>> GetCurrentUserGroupsAsync(this IWolfClient client, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the request with. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task<IEnumerable<WolfGroup>> | Enumerable of retrieved groups. |
Remarks
Groups already cached will be retrieved from cache. Others will be requested from the server.
Groups will be retrieved with members list populated.
See Also
GetGroupAchievementsAsync(IWolfClient, UInt32, WolfLanguage, CancellationToken)
Retrieve groups's achievements.
Declaration
public static Task<IReadOnlyDictionary<WolfAchievement, DateTime?>> GetGroupAchievementsAsync(this IWolfClient client, uint groupID, WolfLanguage language, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the request with. |
UInt32 | groupID | ID of group to retrieve achievements of. |
WolfLanguage | language | Language to retrieve achievements in. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task<IReadOnlyDictionary<WolfAchievement, Nullable<DateTime>>> | Dictionary of group achievements, with keys being achievement and value being unlock time. |
Remarks
Achievements already cached will be retrieved from cache.
All child achievements will be surfaced to the top level, so can be accessed by direct enumerable queries.
See Also
GetGroupAsync(IWolfClient, String, CancellationToken)
Get profile of specified group.
Declaration
public static async Task<WolfGroup> GetGroupAsync(this IWolfClient client, string groupName, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the request with. |
String | groupName | ID of group to retrieve. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task<WolfGroup> | Retrieved group. |
Remarks
If group is already cached, cached instance will be returned. Otherwise a request to the server will be made.
Group will be retrieved with members list populated.
See Also
GetGroupAsync(IWolfClient, UInt32, CancellationToken)
Get profile of specified group.
Declaration
public static async Task<WolfGroup> GetGroupAsync(this IWolfClient client, uint groupID, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the request with. |
UInt32 | groupID | ID of group to retrieve. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task<WolfGroup> | Retrieved group. |
Remarks
If group is already cached, cached instance will be returned. Otherwise a request to the server will be made.
Group will be retrieved with members list populated.
See Also
GetGroupMessageHistoryAsync(IWolfClient, UInt32, Boolean, CancellationToken)
Retrieve group messages history, starting with most recent message.
Declaration
public static Task<IEnumerable<IChatMessage>> GetGroupMessageHistoryAsync(this IWolfClient client, uint groupID, bool oldestFirst, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the request with. |
UInt32 | groupID | ID of group to get message history from. |
Boolean | oldestFirst | Whether to order retrieved messages from oldest to newest. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task<IEnumerable<IChatMessage>> | Enumerable of retrieved messages. |
See Also
| Improve this Doc View SourceGetGroupMessageHistoryAsync(IWolfClient, UInt32, Nullable<WolfTimestamp>, Boolean, CancellationToken)
Retrieve group messages history.
Declaration
public static async Task<IEnumerable<IChatMessage>> GetGroupMessageHistoryAsync(this IWolfClient client, uint groupID, WolfTimestamp? beforeTime, bool oldestFirst, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the request with. |
UInt32 | groupID | ID of group to get message history from. |
Nullable<WolfTimestamp> | beforeTime | Timestamp of oldest already retrieved message; null to retrieve from newest. |
Boolean | oldestFirst | Whether to order retrieved messages from oldest to newest. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task<IEnumerable<IChatMessage>> | Enumerable of retrieved messages. |
See Also
| Improve this Doc View SourceGetGroupMessageHistoryAsync(IWolfClient, UInt32, Nullable<WolfTimestamp>, CancellationToken)
Retrieve group messages history, ordered from newest to oldest.
Declaration
public static Task<IEnumerable<IChatMessage>> GetGroupMessageHistoryAsync(this IWolfClient client, uint groupID, WolfTimestamp? beforeTime, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the request with. |
UInt32 | groupID | ID of group to get message history from. |
Nullable<WolfTimestamp> | beforeTime | Timestamp of oldest already retrieved message; null to retrieve from newest. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task<IEnumerable<IChatMessage>> | Enumerable of retrieved messages. |
See Also
| Improve this Doc View SourceGetGroupMessageHistoryAsync(IWolfClient, UInt32, CancellationToken)
Retrieve group messages history, ordered from newest to oldest, starting with most recent message.
Declaration
public static Task<IEnumerable<IChatMessage>> GetGroupMessageHistoryAsync(this IWolfClient client, uint groupID, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the request with. |
UInt32 | groupID | ID of group to get message history from. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task<IEnumerable<IChatMessage>> | Enumerable of retrieved messages. |
See Also
| Improve this Doc View SourceGetGroupsAsync(IWolfClient, IEnumerable<UInt32>, CancellationToken)
Retrieve profiles of groups by their IDs.
Declaration
public static async Task<IEnumerable<WolfGroup>> GetGroupsAsync(this IWolfClient client, IEnumerable<uint> groupIDs, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the request with. |
IEnumerable<UInt32> | groupIDs | IDs of groups to retrieve. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task<IEnumerable<WolfGroup>> | Enumerable of retrieved groups. |
Remarks
Groups already cached will be retrieved from cache. Others will be requested from the server.
Groups will be retrieved with members list populated.
See Also
GetGroupStatisticsAsync(IWolfClient, UInt32, CancellationToken)
Gets statistics of a group.
Declaration
public static async Task<WolfGroupStatistics> GetGroupStatisticsAsync(this IWolfClient client, uint groupID, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the request with. |
UInt32 | groupID | ID of group to retrieve statistics for. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task<WolfGroupStatistics> | Retrieved group statistics. |
See Also
GetLinkMetadataAsync(IWolfClient, String, CancellationToken)
Requests metadata of the link, as seen by WOLF servers.
Declaration
public static Task<UrlMetadataResponse> GetLinkMetadataAsync(this IWolfClient client, string url, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the message with. |
String | url | URL to get metadata of. |
CancellationToken | cancellationToken |
|
Returns
Type | Description |
---|---|
Task<UrlMetadataResponse> | Link metadata. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | URL is null. |
ArgumentException | URL is empty, whitespace, or otherwise invalid. |
GetMessageTipsDetailsAsync(IWolfClient, ChatMessage, CancellationToken)
Requests tips details for messages.
Declaration
public static async Task<IEnumerable<WolfTip>> GetMessageTipsDetailsAsync(this IWolfClient client, ChatMessage message, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the request with. |
ChatMessage | message | Message to get tips statistics for. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task<IEnumerable<WolfTip>> | Collection of tips details. |
GetMessageTipsSummaryAsync(IWolfClient, IEnumerable<ChatMessage>, CancellationToken)
Requests tips summaries for messages.
Declaration
public static async Task<IReadOnlyDictionary<WolfTimestamp, IEnumerable<WolfTip>>> GetMessageTipsSummaryAsync(this IWolfClient client, IEnumerable<ChatMessage> messages, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the request with. |
IEnumerable<ChatMessage> | messages | Messages to get tips statistics for. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task<IReadOnlyDictionary<WolfTimestamp, IEnumerable<WolfTip>>> | Dictionary, where key is message timestamp, and value is collection of its tips summaries. |
GetMessageTipsSummaryAsync(IWolfClient, ChatMessage, CancellationToken)
Requests tips summaries for a message.
Declaration
public static async Task<IEnumerable<WolfTip>> GetMessageTipsSummaryAsync(this IWolfClient client, ChatMessage message, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the request with. |
ChatMessage | message | Message to get tips statistics for. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task<IEnumerable<WolfTip>> | Collection of message's tips summaries. |
GetMessageTipsSummaryAsync(IWolfClient, WolfTimestamp, UInt32, CancellationToken)
Requests tips summaries for a message.
Declaration
public static async Task<IEnumerable<WolfTip>> GetMessageTipsSummaryAsync(this IWolfClient client, WolfTimestamp messageTimestamp, uint groupID, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the request with. |
WolfTimestamp | messageTimestamp | Timestamp of the message to get tips statistics for. |
UInt32 | groupID | ID of the group where the message was sent in. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task<IEnumerable<WolfTip>> | Collection of message's tips summaries. |
GetNotificationsAsync(IWolfClient, CancellationToken)
Get current user's notifications in English.
Declaration
public static Task<IEnumerable<WolfNotification>> GetNotificationsAsync(this IWolfClient client, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the request with. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task<IEnumerable<WolfNotification>> | Enumerable of retrieved notifications. |
See Also
GetNotificationsAsync(IWolfClient, WolfLanguage, WolfDevice, CancellationToken)
Get current user's notifications.
Declaration
public static async Task<IEnumerable<WolfNotification>> GetNotificationsAsync(this IWolfClient client, WolfLanguage language, WolfDevice device, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the request with. |
WolfLanguage | language | Language to get notifications in. |
WolfDevice | device | Device to use. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task<IEnumerable<WolfNotification>> | Enumerable of retrieved notifications. |
See Also
GetPrivateMessageHistoryAsync(IWolfClient, UInt32, Boolean, CancellationToken)
Retrieve private messages history, starting with most recent message.
Declaration
public static Task<IEnumerable<IChatMessage>> GetPrivateMessageHistoryAsync(this IWolfClient client, uint userID, bool oldestFirst, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the request with. |
UInt32 | userID | ID of user to get message history with. |
Boolean | oldestFirst | Whether to order retrieved messages from oldest to newest. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task<IEnumerable<IChatMessage>> | Enumerable of retrieved messages. |
See Also
| Improve this Doc View SourceGetPrivateMessageHistoryAsync(IWolfClient, UInt32, Nullable<WolfTimestamp>, Boolean, CancellationToken)
Retrieve private messages history.
Declaration
public static async Task<IEnumerable<IChatMessage>> GetPrivateMessageHistoryAsync(this IWolfClient client, uint userID, WolfTimestamp? beforeTime, bool oldestFirst, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the request with. |
UInt32 | userID | ID of user to get message history with. |
Nullable<WolfTimestamp> | beforeTime | Timestamp of oldest already retrieved message; null to retrieve from newest. |
Boolean | oldestFirst | Whether to order retrieved messages from oldest to newest. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task<IEnumerable<IChatMessage>> | Enumerable of retrieved messages. |
See Also
| Improve this Doc View SourceGetPrivateMessageHistoryAsync(IWolfClient, UInt32, Nullable<WolfTimestamp>, CancellationToken)
Retrieve private messages history, ordered from newest to oldest.
Declaration
public static Task<IEnumerable<IChatMessage>> GetPrivateMessageHistoryAsync(this IWolfClient client, uint userID, WolfTimestamp? beforeTime, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the request with. |
UInt32 | userID | ID of user to get message history with. |
Nullable<WolfTimestamp> | beforeTime | Timestamp of oldest already retrieved message; null to retrieve from newest. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task<IEnumerable<IChatMessage>> | Enumerable of retrieved messages. |
See Also
| Improve this Doc View SourceGetPrivateMessageHistoryAsync(IWolfClient, UInt32, CancellationToken)
Retrieve private messages history, ordered from newest to oldest, starting with most recent message.
Declaration
public static Task<IEnumerable<IChatMessage>> GetPrivateMessageHistoryAsync(this IWolfClient client, uint userID, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the request with. |
UInt32 | userID | ID of user to get message history with. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task<IEnumerable<IChatMessage>> | Enumerable of retrieved messages. |
See Also
| Improve this Doc View SourceGetRecentConversationsAsync(IWolfClient, CancellationToken)
Retrieve list of most recent messages.
Declaration
public static async Task<IEnumerable<IChatMessage>> GetRecentConversationsAsync(this IWolfClient client, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the request with. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task<IEnumerable<IChatMessage>> | Enumerable with most recent messages. |
GetUserAchievementsAsync(IWolfClient, UInt32, WolfLanguage, CancellationToken)
Retrieve user's achievements.
Declaration
public static Task<IReadOnlyDictionary<WolfAchievement, DateTime?>> GetUserAchievementsAsync(this IWolfClient client, uint userID, WolfLanguage language, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the request with. |
UInt32 | userID | ID of user to retrieve achievements of. |
WolfLanguage | language | Language to retrieve achievements in. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task<IReadOnlyDictionary<WolfAchievement, Nullable<DateTime>>> | Dictionary of user achievements, with keys being achievement and value being unlock time. |
Remarks
Achievements already cached will be retrieved from cache.
All child achievements will be surfaced to the top level, so can be accessed by direct enumerable queries.
See Also
GetUserActiveCharmsAsync(IWolfClient, UInt32, CancellationToken)
Get user's currently owned charms.
Declaration
public static async Task<IEnumerable<WolfCharmSubscription>> GetUserActiveCharmsAsync(this IWolfClient client, uint userID, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the request with. |
UInt32 | userID | ID of user to retrieve owned charms of. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task<IEnumerable<WolfCharmSubscription>> | Enumerable of owned charms subscriptions. |
See Also
GetUserAsync(IWolfClient, UInt32, CancellationToken)
Get profile of specified user.
Declaration
public static async Task<WolfUser> GetUserAsync(this IWolfClient client, uint userID, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the request with. |
UInt32 | userID | ID of user to retrieve. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task<WolfUser> | Retrieved user. |
Remarks
If user is already cached, cached instance will be returned. Otherwise a request to the server will be made.
See Also
GetUserCharmStatsAsync(IWolfClient, UInt32, CancellationToken)
Get user's charm statistics.
Declaration
public static Task<CharmStatisticsResponse> GetUserCharmStatsAsync(this IWolfClient client, uint userID, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the request with. |
UInt32 | userID | ID of user to retrieve charm statistics of. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task<CharmStatisticsResponse> | User's charm statistics. |
See Also
GetUserCurrentCharmAsync(IWolfClient, UInt32, CancellationToken)
Get user's selected charm.
Declaration
public static async Task<WolfCharm> GetUserCurrentCharmAsync(this IWolfClient client, uint userID, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the request with. |
UInt32 | userID | ID of user to retrieve selected charm of. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task<WolfCharm> | User's currently selected charm. |
Remarks
If charm is already cached, cached instance will be returned. Otherwise a request to the server will be made.
If user is already cached, cached instance will be returned. Otherwise a request to the server will be made.
See Also
GetUserExpiredCharmsAsync(IWolfClient, UInt32, CancellationToken)
Get user's expired charms.
Declaration
public static async Task<IEnumerable<WolfCharmSubscription>> GetUserExpiredCharmsAsync(this IWolfClient client, uint userID, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the request with. |
UInt32 | userID | ID of user to retrieve expired charms of. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task<IEnumerable<WolfCharmSubscription>> | Enumerable of expired charms subscriptions. |
See Also
GetUsersAsync(IWolfClient, IEnumerable<UInt32>, CancellationToken)
Retrieve profiles of users by their IDs.
Declaration
public static async Task<IEnumerable<WolfUser>> GetUsersAsync(this IWolfClient client, IEnumerable<uint> userIDs, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the request with. |
IEnumerable<UInt32> | userIDs | IDs of users to retrieve. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task<IEnumerable<WolfUser>> | Enumerable of retrieved users. |
Remarks
Users already cached will be retrieved from cache. Others will be requested from the server.
See Also
JoinGroupAsync(IWolfClient, String, String, CancellationToken)
Join group.
Declaration
public static async Task<WolfGroup> JoinGroupAsync(this IWolfClient client, string groupName, string password, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the request with. |
String | groupName | ID of the group to join. |
String | password | Password to use when joining. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task<WolfGroup> | Joined group's profile. |
See Also
JoinGroupAsync(IWolfClient, String, CancellationToken)
Join a group.
Declaration
public static Task<WolfGroup> JoinGroupAsync(this IWolfClient client, string groupName, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the request with. |
String | groupName | Name of the group to join. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task<WolfGroup> | Joined group's profile. |
See Also
JoinGroupAsync(IWolfClient, UInt32, String, CancellationToken)
Join a group.
Declaration
public static async Task<WolfGroup> JoinGroupAsync(this IWolfClient client, uint groupID, string password, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the request with. |
UInt32 | groupID | ID of group to join. |
String | password | Password to use when joining. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task<WolfGroup> | Joined group's profile. |
See Also
JoinGroupAsync(IWolfClient, UInt32, CancellationToken)
Join a group.
Declaration
public static Task<WolfGroup> JoinGroupAsync(this IWolfClient client, uint groupID, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the request with. |
UInt32 | groupID | ID of group to join. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task<WolfGroup> | Joined group's profile. |
See Also
KickUserAsync(IWolfClient, UInt32, UInt32, CancellationToken)
Kick a group member.
Declaration
public static Task KickUserAsync(this IWolfClient client, uint userID, uint groupID, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to perform the admin action with. |
UInt32 | userID | User ID of group member to kick. |
UInt32 | groupID | ID of group to kick the user from. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task |
See Also
LeaveGroupAsync(IWolfClient, UInt32, CancellationToken)
Leave a group.
Declaration
public static Task LeaveGroupAsync(this IWolfClient client, uint groupID, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the request with. |
UInt32 | groupID | ID of group to leave. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task |
See Also
LoginAsync(IWolfClient, String, String, CancellationToken)
Log in, using Email login type.
Declaration
public static Task<LoginResponse> LoginAsync(this IWolfClient client, string login, string password, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | The client to login with. |
String | login | User email to use to login with. |
String | password | User password. |
CancellationToken | cancellationToken | Cancellation token that can cancel logging in. |
Returns
Type | Description |
---|---|
Task<LoginResponse> | Response with login result. |
See Also
| Improve this Doc View SourceLoginAsync(IWolfClient, String, String, WolfLoginType, CancellationToken)
Log in.
Declaration
public static Task<LoginResponse> LoginAsync(this IWolfClient client, string login, string password, WolfLoginType loginType, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | The client to login with. |
String | login | User email to use to login with. |
String | password | User password. |
WolfLoginType | loginType | Login type to use. |
CancellationToken | cancellationToken | Cancellation token that can cancel logging in. |
Returns
Type | Description |
---|---|
Task<LoginResponse> | Response with login result. |
See Also
| Improve this Doc View SourceLogoutAsync(IWolfClient, CancellationToken)
Log out.
Declaration
public static Task LogoutAsync(this IWolfClient client, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task |
See Also
| Improve this Doc View SourceModUserAsync(IWolfClient, UInt32, UInt32, CancellationToken)
Mod a group member.
Declaration
public static Task ModUserAsync(this IWolfClient client, uint userID, uint groupID, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to perform the admin action with. |
UInt32 | userID | User ID of group member to mod. |
UInt32 | groupID | ID of group to mod the user in. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task |
See Also
RemoveActiveCharmAsync(IWolfClient, CancellationToken)
Remove current user's selected charm.
Declaration
public static Task RemoveActiveCharmAsync(this IWolfClient client, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the request with. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task |
See Also
ReplyImageAsync(IWolfClient, ChatMessage, IEnumerable<Byte>, CancellationToken)
Sends an image response message to group or user.
Declaration
public static Task<ChatResponse> ReplyImageAsync(this IWolfClient client, ChatMessage incomingMessage, IEnumerable<byte> imageBytes, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the message with. |
ChatMessage | incomingMessage | Message the user or group sent to the client. |
IEnumerable<Byte> | imageBytes | Bytes of the image to send. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task<ChatResponse> | Message sending response. |
ReplyTextAsync(IWolfClient, ChatMessage, String, CancellationToken)
Sends a text message response message to group or user.
Declaration
public static Task<ChatResponse> ReplyTextAsync(this IWolfClient client, ChatMessage incomingMessage, string text, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the message with. |
ChatMessage | incomingMessage | Message the user or group sent to the client. |
String | text | Content of the message. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task<ChatResponse> | Message sending response. |
ReplyVoiceAsync(IWolfClient, ChatMessage, IEnumerable<Byte>, CancellationToken)
Sends a voice response message to group or user.
Declaration
public static Task<ChatResponse> ReplyVoiceAsync(this IWolfClient client, ChatMessage incomingMessage, IEnumerable<byte> voiceBytes, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the message with. |
ChatMessage | incomingMessage | Message the user or group sent to the client. |
IEnumerable<Byte> | voiceBytes | Bytes of the voice to send. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task<ChatResponse> | Message sending response. |
ResetUserAsync(IWolfClient, UInt32, UInt32, CancellationToken)
Reset a group member.
Declaration
public static Task ResetUserAsync(this IWolfClient client, uint userID, uint groupID, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to perform the admin action with. |
UInt32 | userID | User ID of group member to reset. |
UInt32 | groupID | ID of group to reset the user in. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task |
See Also
RestoreChatMessageAsync(IWolfClient, ChatMessage, CancellationToken)
Requests chat message to be restored (un-deleted).
Declaration
public static Task<ChatUpdateResponse> RestoreChatMessageAsync(this IWolfClient client, ChatMessage message, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the message with. |
ChatMessage | message | Chat message to restore. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task<ChatUpdateResponse> | Message updating result. |
SendGroupImageMessageAsync(IWolfClient, UInt32, IEnumerable<Byte>, CancellationToken)
Sends a group image message.
Declaration
public static Task<ChatResponse> SendGroupImageMessageAsync(this IWolfClient client, uint groupID, IEnumerable<byte> imageBytes, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the message with. |
UInt32 | groupID | ID of group to send the message to. |
IEnumerable<Byte> | imageBytes | Bytes of the image to send. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task<ChatResponse> | Message sending response. |
SendGroupTextMessageAsync(IWolfClient, UInt32, String, CancellationToken)
Sends a group text message.
Declaration
public static Task<ChatResponse> SendGroupTextMessageAsync(this IWolfClient client, uint groupID, string text, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the message with. |
UInt32 | groupID | ID of group to send the message to. |
String | text | Content of the message. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task<ChatResponse> | Message sending response. |
SendGroupVoiceMessageAsync(IWolfClient, UInt32, IEnumerable<Byte>, CancellationToken)
Sends a group voice message.
Declaration
public static Task<ChatResponse> SendGroupVoiceMessageAsync(this IWolfClient client, uint groupID, IEnumerable<byte> voiceBytes, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the message with. |
UInt32 | groupID | ID of group to send the message to. |
IEnumerable<Byte> | voiceBytes | Bytes of the voice to send. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task<ChatResponse> | Message sending response. |
SendPrivateImageMessageAsync(IWolfClient, UInt32, IEnumerable<Byte>, CancellationToken)
Sends a private image message.
Declaration
public static Task<ChatResponse> SendPrivateImageMessageAsync(this IWolfClient client, uint userID, IEnumerable<byte> imageBytes, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the message with. |
UInt32 | userID | ID of user to send the message to. |
IEnumerable<Byte> | imageBytes | Bytes of the image to send. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task<ChatResponse> | Message sending response. |
SendPrivateTextMessageAsync(IWolfClient, UInt32, String, CancellationToken)
Sends a private text message.
Declaration
public static Task<ChatResponse> SendPrivateTextMessageAsync(this IWolfClient client, uint userID, string text, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the message with. |
UInt32 | userID | ID of user to send the message to. |
String | text | Content of the message. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task<ChatResponse> | Message sending response. |
SendPrivateVoiceMessageAsync(IWolfClient, UInt32, IEnumerable<Byte>, CancellationToken)
Sends a private voice message.
Declaration
public static Task<ChatResponse> SendPrivateVoiceMessageAsync(this IWolfClient client, uint userID, IEnumerable<byte> voiceBytes, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the message with. |
UInt32 | userID | ID of user to send the message to. |
IEnumerable<Byte> | voiceBytes | Bytes of the voice to send. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task<ChatResponse> | Message sending response. |
SetActiveCharmAsync(IWolfClient, UInt32, CancellationToken)
Set current user's selected charm.
Declaration
public static Task SetActiveCharmAsync(this IWolfClient client, uint charmID, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the request with. |
UInt32 | charmID | ID of charm to set as active. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task |
See Also
SetOnlineStateAsync(IWolfClient, WolfOnlineState, CancellationToken)
Update current user's online state.
Declaration
public static Task SetOnlineStateAsync(this IWolfClient client, WolfOnlineState state, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to set online state of. |
WolfOnlineState | state | Online state to set. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task |
SilenceUserAsync(IWolfClient, UInt32, UInt32, CancellationToken)
Silence a group member.
Declaration
public static Task SilenceUserAsync(this IWolfClient client, uint userID, uint groupID, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to perform the admin action with. |
UInt32 | userID | User ID of group member to silence. |
UInt32 | groupID | ID of group to silence the user in. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task |
See Also
SubscribeAllMessagesAsync(IWolfClient, CancellationToken)
Subscribes to all incoming messages.
Declaration
public static Task SubscribeAllMessagesAsync(this IWolfClient client, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client that subscribes to messages. |
CancellationToken | cancellationToken | Cancellation token that can cancel subscribing. |
Returns
Type | Description |
---|---|
Task |
SubscribeGroupMessagesAsync(IWolfClient, CancellationToken)
Subscribes to incoming group message.
Declaration
public static async Task<IReadOnlyDictionary<uint, HttpStatusCode>> SubscribeGroupMessagesAsync(this IWolfClient client, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client that subscribes to messages. |
CancellationToken | cancellationToken | Cancellation token that can cancel subscribing. |
Returns
Type | Description |
---|---|
Task<IReadOnlyDictionary<UInt32, HttpStatusCode>> |
SubscribeGroupTipsAsync(IWolfClient, CancellationToken)
Subscribes to message tips notifications.
Declaration
public static async Task<IReadOnlyDictionary<uint, HttpStatusCode>> SubscribeGroupTipsAsync(this IWolfClient client, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client that subscribes to tips. |
CancellationToken | cancellationToken | Cancellation token that can cancel subscribing. |
Returns
Type | Description |
---|---|
Task<IReadOnlyDictionary<UInt32, HttpStatusCode>> |
SubscribePrivateMessagesAsync(IWolfClient, CancellationToken)
Subscribes to incoming private message.
Declaration
public static Task SubscribePrivateMessagesAsync(this IWolfClient client, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client that subscribes to messages. |
CancellationToken | cancellationToken | Cancellation token that can cancel subscribing. |
Returns
Type | Description |
---|---|
Task |
TipMessageAsync(IWolfClient, ChatMessage, IEnumerable<UInt32>, CancellationToken)
Tips a message.
Declaration
public static Task TipMessageAsync(this IWolfClient client, ChatMessage message, IEnumerable<uint> charmIDs, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the request with. |
ChatMessage | message | Message to tip. |
IEnumerable<UInt32> | charmIDs | IDs of charms to tip the message with. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task |
TipMessageAsync(IWolfClient, ChatMessage, IEnumerable<WolfTip>, CancellationToken)
Tips a message.
Declaration
public static Task TipMessageAsync(this IWolfClient client, ChatMessage message, IEnumerable<WolfTip> tips, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the request with. |
ChatMessage | message | Message to tip. |
IEnumerable<WolfTip> | tips | Tips to tip the message with. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task |
TipMessageAsync(IWolfClient, ChatMessage, UInt32, CancellationToken)
Tips a message.
Declaration
public static Task TipMessageAsync(this IWolfClient client, ChatMessage message, uint charmID, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the request with. |
ChatMessage | message | Message to tip. |
UInt32 | charmID | ID of charm to tip the message with. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task |
TipMessageAsync(IWolfClient, ChatMessage, WolfTip, CancellationToken)
Tips a message.
Declaration
public static Task TipMessageAsync(this IWolfClient client, ChatMessage message, WolfTip tip, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the request with. |
ChatMessage | message | Message to tip. |
WolfTip | tip | Tip to tip the message with. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task |
UnblockUserAsync(IWolfClient, UInt32, CancellationToken)
Unblock user.
Declaration
public static Task UnblockUserAsync(this IWolfClient client, uint userID, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the request with. |
UInt32 | userID | ID of user to block. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task |
See Also
UpdateGroupAsync(IWolfClient, UInt32, Action<GroupUpdateMessage.Builder>, CancellationToken)
Updates group profile.
Declaration
public static async Task<WolfGroup> UpdateGroupAsync(this IWolfClient client, uint groupID, Action<GroupUpdateMessage.Builder> updates, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the request with. |
UInt32 | groupID | ID of group to update. |
Action<GroupUpdateMessage.Builder> | updates | Group profile changes to apply. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task<WolfGroup> | Profile of updated group. |
See Also
UpdateGroupAudioConfigAsync(IWolfClient, UInt32, Action<GroupAudioUpdateMessage.Builder>, CancellationToken)
Updates group audio configuration.
Declaration
public static async Task<WolfGroup.WolfGroupAudioConfig> UpdateGroupAudioConfigAsync(this IWolfClient client, uint groupID, Action<GroupAudioUpdateMessage.Builder> updates, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the request with. |
UInt32 | groupID | ID of group to update. |
Action<GroupAudioUpdateMessage.Builder> | updates | Group audio configuration changes to apply. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task<WolfGroup.WolfGroupAudioConfig> | Updated audio configuration. |
See Also
UpdateNicknameAsync(IWolfClient, String, CancellationToken)
Update current user's nickname.
Declaration
public static Task<WolfUser> UpdateNicknameAsync(this IWolfClient client, string newNickname, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the request with. |
String | newNickname | Nickname to set. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task<WolfUser> | Updated current user. |
See Also
UpdateProfileAsync(IWolfClient, Action<UserUpdateMessage.Builder>, CancellationToken)
Update current user's profile.
Declaration
public static async Task<WolfUser> UpdateProfileAsync(this IWolfClient client, Action<UserUpdateMessage.Builder> updates, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the request with. |
Action<UserUpdateMessage.Builder> | updates | Profile changes to apply. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task<WolfUser> | Updated current user. |
See Also
UpdateStatusAsync(IWolfClient, String, CancellationToken)
Update current user's status.
Declaration
public static Task<WolfUser> UpdateStatusAsync(this IWolfClient client, string newStatus, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to send the request with. |
String | newStatus | Status to set. |
CancellationToken | cancellationToken | Cancellation token that can cancel the task. |
Returns
Type | Description |
---|---|
Task<WolfUser> | Updated current user. |