Initial implementation of TuneRipper API backend

- Add Health, Video, and Download controllers with endpoints for health checks, video details, processing, status, results, and simulated downloads
- Implement IVideoService for YouTube URL validation and mock video info
- Add API models for responses and job status tracking
- Configure DI, CORS (BlazorPolicy), OpenAPI, and root metadata endpoint in Program.cs
- Add README with usage, troubleshooting, and development notes
- Minor project file cleanup and encoding fix
This commit is contained in:
Michal Vrba
2025-12-11 14:27:29 +01:00
parent 5230bddc03
commit e2d9ee3c59
8 changed files with 637 additions and 6 deletions
+28
View File
@@ -0,0 +1,28 @@
namespace TuneRipper.Shared.Models;
public class ApiResponse<T>
{
public bool Success { get; set; }
public string? Message { get; set; }
public T? Data { get; set; }
public List<string> Errors { get; set; } = new();
}
public class JobStatusResponse
{
public string? JobId { get; set; }
public string? Status { get; set; }
public int PercentageComplete { get; set; }
public string? Message { get; set; }
public DateTime CreatedAt { get; set; }
public DateTime? CompletedAt { get; set; }
public ProcessVideoResponse? Result { get; set; }
}
public class VideoInfo
{
public string? Url { get; set; }
public string? VideoId { get; set; }
public bool IsValid { get; set; }
public string? ErrorMessage { get; set; }
}