aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/NotificationsController.cs
diff options
context:
space:
mode:
authorZadenRB <zaden.ruggieroboune@gmail.com>2020-04-15 00:34:50 -0600
committerZadenRB <zaden.ruggieroboune@gmail.com>2020-04-15 00:34:50 -0600
commitad1c880751dda93f1226e3846bb6a344ac58d0b6 (patch)
tree6726b2571710698e371fb231c21b14087ecd2145 /Jellyfin.Api/Controllers/NotificationsController.cs
parent1180b9746fe7c4a6562baff77910819a6706510b (diff)
Lowercase parameters
Diffstat (limited to 'Jellyfin.Api/Controllers/NotificationsController.cs')
-rw-r--r--Jellyfin.Api/Controllers/NotificationsController.cs63
1 files changed, 31 insertions, 32 deletions
diff --git a/Jellyfin.Api/Controllers/NotificationsController.cs b/Jellyfin.Api/Controllers/NotificationsController.cs
index 6602fca9c..31747584e 100644
--- a/Jellyfin.Api/Controllers/NotificationsController.cs
+++ b/Jellyfin.Api/Controllers/NotificationsController.cs
@@ -1,6 +1,5 @@
#nullable enable
#pragma warning disable CA1801
-#pragma warning disable SA1313
using System;
using System.Collections.Generic;
@@ -37,17 +36,17 @@ namespace Jellyfin.Api.Controllers
/// <summary>
/// Endpoint for getting a user's notifications.
/// </summary>
- /// <param name="UserID">The UserID.</param>
- /// <param name="IsRead">An optional filter by IsRead.</param>
- /// <param name="StartIndex">The optional index to start at. All notifications with a lower index will be dropped from the results.</param>
- /// <param name="Limit">An optional limit on the number of notifications returned.</param>
+ /// <param name="userID">The UserID.</param>
+ /// <param name="isRead">An optional filter by IsRead.</param>
+ /// <param name="startIndex">The optional index to start at. All notifications with a lower index will be dropped from the results.</param>
+ /// <param name="limit">An optional limit on the number of notifications returned.</param>
/// <returns>A read-only list of all of the user's notifications.</returns>
[HttpGet("{UserID}")]
public IReadOnlyList<NotificationDto> GetNotifications(
- [FromRoute] string UserID,
- [FromQuery] bool? IsRead,
- [FromQuery] int? StartIndex,
- [FromQuery] int? Limit)
+ [FromRoute] string userID,
+ [FromQuery] bool? isRead,
+ [FromQuery] int? startIndex,
+ [FromQuery] int? limit)
{
return new List<NotificationDto>();
}
@@ -55,11 +54,11 @@ namespace Jellyfin.Api.Controllers
/// <summary>
/// Endpoint for getting a user's notification summary.
/// </summary>
- /// <param name="UserID">The UserID.</param>
+ /// <param name="userID">The userID.</param>
/// <returns>Notifications summary for the user.</returns>
- [HttpGet("{UserId}/Summary")]
+ [HttpGet("{UserID}/Summary")]
public NotificationsSummaryDto GetNotificationsSummary(
- [FromRoute] string UserID)
+ [FromRoute] string userID)
{
return new NotificationsSummaryDto();
}
@@ -87,23 +86,23 @@ namespace Jellyfin.Api.Controllers
/// <summary>
/// Endpoint to send a notification to all admins.
/// </summary>
- /// <param name="Name">The name of the notification.</param>
- /// <param name="Description">The description of the notification.</param>
- /// <param name="URL">The URL of the notification.</param>
- /// <param name="Level">The level of the notification.</param>
+ /// <param name="name">The name of the notification.</param>
+ /// <param name="description">The description of the notification.</param>
+ /// <param name="url">The URL of the notification.</param>
+ /// <param name="level">The level of the notification.</param>
[HttpPost("Admin")]
public void CreateAdminNotification(
- [FromForm] string Name,
- [FromForm] string Description,
- [FromForm] string? URL,
- [FromForm] NotificationLevel Level)
+ [FromForm] string name,
+ [FromForm] string description,
+ [FromForm] string? url,
+ [FromForm] NotificationLevel level)
{
var notification = new NotificationRequest
{
- Name = Name,
- Description = Description,
- Url = URL,
- Level = Level,
+ Name = name,
+ Description = description,
+ Url = url,
+ Level = level,
UserIds = _userManager.Users.Where(i => i.Policy.IsAdministrator).Select(i => i.Id).ToArray(),
Date = DateTime.UtcNow,
};
@@ -114,24 +113,24 @@ namespace Jellyfin.Api.Controllers
/// <summary>
/// Endpoint to set notifications as read.
/// </summary>
- /// <param name="UserID">The UserID.</param>
- /// <param name="IDs">The IDs of notifications which should be set as read.</param>
+ /// <param name="userID">The userID.</param>
+ /// <param name="ids">The IDs of notifications which should be set as read.</param>
[HttpPost("{UserID}/Read")]
public void SetRead(
- [FromRoute] string UserID,
- [FromForm] List<string> IDs)
+ [FromRoute] string userID,
+ [FromForm] List<string> ids)
{
}
/// <summary>
/// Endpoint to set notifications as unread.
/// </summary>
- /// <param name="UserID">The UserID.</param>
- /// <param name="IDs">The IDs of notifications which should be set as unread.</param>
+ /// <param name="userID">The userID.</param>
+ /// <param name="ids">The IDs of notifications which should be set as unread.</param>
[HttpPost("{UserID}/Unread")]
public void SetUnread(
- [FromRoute] string UserID,
- [FromForm] List<string> IDs)
+ [FromRoute] string userID,
+ [FromForm] List<string> ids)
{
}
}