Remove news

This commit is contained in:
jvyden 2022-01-31 22:29:29 -05:00
commit c3b92d8969
No known key found for this signature in database
GPG key ID: 18BCF2BE0262B278
3 changed files with 0 additions and 74 deletions

View file

@ -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));
}
}

View file

@ -1,26 +0,0 @@
using LBPUnion.ProjectLighthouse.Serialization;
namespace LBPUnion.ProjectLighthouse.Types.News;
/// <summary>
/// Used on the info moon on LBP1. Broken for unknown reasons
/// </summary>
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);
}

View file

@ -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));
}