-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #398 from Mahsaap/Add_Warn_Chat_User
Add WarnChatUser Endpoint
- Loading branch information
Showing
4 changed files
with
119 additions
and
0 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
TwitchLib.Api.Helix.Models/Moderation/WarnChatUser/Request/WarnChatUserRequest.cs
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,21 @@ | ||
using Newtonsoft.Json; | ||
|
||
namespace TwitchLib.Api.Helix.Models.Moderation.WarnChatUser.Request; | ||
|
||
/// <summary> | ||
/// Request that contains information about the warning. | ||
/// </summary> | ||
public class WarnChatUserRequest | ||
{ | ||
/// <summary> | ||
/// The ID of the twitch user to be warned. | ||
/// </summary> | ||
[JsonProperty(PropertyName = "user_id")] | ||
public string UserId { get; set; } | ||
|
||
/// <summary> | ||
/// A custom reason for the warning. Max 500 chars. | ||
/// </summary> | ||
[JsonProperty(PropertyName = "reason")] | ||
public string Reason { get; set; } = string.Empty; | ||
} |
16 changes: 16 additions & 0 deletions
16
TwitchLib.Api.Helix.Models/Moderation/WarnChatUser/WarnChatUserResponse.cs
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,16 @@ | ||
using Newtonsoft.Json; | ||
|
||
namespace TwitchLib.Api.Helix.Models.Moderation.WarnChatUser; | ||
|
||
/// <summary> | ||
/// Warn chat user response object. | ||
/// </summary> | ||
public class WarnChatUserResponse | ||
{ | ||
/// <summary> | ||
/// A list that contains information about the warning. | ||
/// </summary> | ||
[JsonProperty(PropertyName = "data")] | ||
public WarnedChatUser[] Data { get; protected set; } | ||
} | ||
|
34 changes: 34 additions & 0 deletions
34
TwitchLib.Api.Helix.Models/Moderation/WarnChatUser/WarnedChatUser.cs
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,34 @@ | ||
using Newtonsoft.Json; | ||
|
||
namespace TwitchLib.Api.Helix.Models.Moderation.WarnChatUser; | ||
|
||
/// <summary> | ||
/// Contains information about the warning. | ||
/// </summary> | ||
public class WarnedChatUser | ||
{ | ||
/// <summary> | ||
/// The ID of the channel in which the warning will take effect. | ||
/// </summary> | ||
[JsonProperty(PropertyName = "broadcaster_id")] | ||
public string BroadcasterId { get; protected set; } | ||
|
||
/// <summary> | ||
/// The ID of the warned user. | ||
/// </summary> | ||
[JsonProperty(PropertyName = "user_id")] | ||
public string UserId { get; protected set; } | ||
|
||
/// <summary> | ||
/// The ID of the user who applied the warning. | ||
/// </summary> | ||
[JsonProperty(PropertyName = "moderator_id")] | ||
public string ModeratorId { get; protected set; } | ||
|
||
/// <summary> | ||
/// The reason provided for warning. | ||
/// </summary> | ||
[JsonProperty(PropertyName = "reason")] | ||
public string Reason { get; protected 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