- 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
28 lines
773 B
C#
28 lines
773 B
C#
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; }
|
|
} |