From c3b92d89690a3b3d7ce54efba3d508c39a5f2112 Mon Sep 17 00:00:00 2001 From: jvyden Date: Mon, 31 Jan 2022 22:29:29 -0500 Subject: [PATCH] Remove news --- .../Controllers/NewsController.cs | 36 ------------------- ProjectLighthouse/Types/News/NewsEntry.cs | 26 -------------- ProjectLighthouse/Types/News/NewsImage.cs | 12 ------- 3 files changed, 74 deletions(-) delete mode 100644 ProjectLighthouse/Controllers/NewsController.cs delete mode 100644 ProjectLighthouse/Types/News/NewsEntry.cs delete mode 100644 ProjectLighthouse/Types/News/NewsImage.cs diff --git a/ProjectLighthouse/Controllers/NewsController.cs b/ProjectLighthouse/Controllers/NewsController.cs deleted file mode 100644 index ab4a29a9..00000000 --- a/ProjectLighthouse/Controllers/NewsController.cs +++ /dev/null @@ -1,36 +0,0 @@ -using LBPUnion.ProjectLighthouse.Serialization; -using LBPUnion.ProjectLighthouse.Types.News; -using Microsoft.AspNetCore.Mvc; - -namespace LBPUnion.ProjectLighthouse.Controllers; - -[ApiController] -[Route("LITTLEBIGPLANETPS3_XML/news")] -[Produces("text/xml")] -public class NewsController : ControllerBase -{ - [HttpGet] - public IActionResult Get() - { - string newsEntry = LbpSerializer.StringElement - ( - "item", - new NewsEntry - { - Category = "no_category", - Summary = "test summary", - Image = new NewsImage - { - Hash = "4947269c5f7061b27225611ee58a9a91a8031bbe", - Alignment = "right", - }, - Id = 1, - Title = "Test Title", - Text = "Test Text", - Date = 1348755214000, - }.Serialize() - ); - - return this.Ok(LbpSerializer.StringElement("news", newsEntry)); - } -} \ No newline at end of file diff --git a/ProjectLighthouse/Types/News/NewsEntry.cs b/ProjectLighthouse/Types/News/NewsEntry.cs deleted file mode 100644 index 4e291677..00000000 --- a/ProjectLighthouse/Types/News/NewsEntry.cs +++ /dev/null @@ -1,26 +0,0 @@ -using LBPUnion.ProjectLighthouse.Serialization; - -namespace LBPUnion.ProjectLighthouse.Types.News; - -/// -/// Used on the info moon on LBP1. Broken for unknown reasons -/// -public class NewsEntry -{ - public int Id { get; set; } - public string Title { get; set; } - public string Summary { get; set; } - public string Text { get; set; } - public NewsImage Image { get; set; } - public string Category { get; set; } - public long Date { get; set; } - - public string Serialize() - => LbpSerializer.StringElement("id", this.Id) + - LbpSerializer.StringElement("title", this.Title) + - LbpSerializer.StringElement("summary", this.Summary) + - LbpSerializer.StringElement("text", this.Text) + - LbpSerializer.StringElement("date", this.Date) + - this.Image.Serialize() + - LbpSerializer.StringElement("category", this.Category); -} \ No newline at end of file diff --git a/ProjectLighthouse/Types/News/NewsImage.cs b/ProjectLighthouse/Types/News/NewsImage.cs deleted file mode 100644 index 07e69c12..00000000 --- a/ProjectLighthouse/Types/News/NewsImage.cs +++ /dev/null @@ -1,12 +0,0 @@ -using LBPUnion.ProjectLighthouse.Serialization; - -namespace LBPUnion.ProjectLighthouse.Types.News; - -public class NewsImage -{ - public string Hash { get; set; } - public string Alignment { get; set; } - - public string Serialize() - => LbpSerializer.StringElement("image", LbpSerializer.StringElement("hash", this.Hash) + LbpSerializer.StringElement("alignment", this.Alignment)); -} \ No newline at end of file