using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using CoviDok.Api; using CoviDok.Api.Request; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; namespace CoviDok.Controllers { [Route("api/[controller]")] [ApiController] public class DocController : ControllerBase { // GET /api/Doc [HttpGet] public async Task> GetDoctors() { GenericResponse genericResponse = new GenericResponse { Status = Status.Success }; for (int i=5; i < 15; i++) { string doc = "{ \"FirstName\": \"Dr. Schanniquah\", \"LastName\": \"The " + i + "th\"}"; genericResponse.Body[i.ToString()] = doc; } return genericResponse; } // GET /api/Doc/{id}/assistants [HttpGet("{id}/assistants")] public async Task> GetAssistantsOfDoctor(string id) { GenericResponse genericResponse = new GenericResponse { Status = Status.Success }; genericResponse.Body["DoctorID"] = id; for (int i = 5; i < 15; i++) { string doc = "{ \"FirstName\": \"Belisarius\", \"LastName\": \"The " + i + "th Cawl\"}"; genericResponse.Body[i.ToString()] = doc; } return genericResponse; } // GET /api/Doc/{id}/children [HttpGet("{id}/children")] public async Task> GetChildrenOfDoctor(string id) { GenericResponse genericResponse = new GenericResponse { Status = Status.Success }; genericResponse.Body["DoctorID"] = id; for (int i = 5; i < 15; i++) { string doc = "{ \"FirstName\": \"Belisarius\", \"LastName\": \"The " + i + "th Cawl\"}"; genericResponse.Body[i.ToString()] = doc; } return genericResponse; } } }