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:
@@ -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; }
|
||||
}
|
||||
Reference in New Issue
Block a user