LegendarySpork9 / Hunter-Industries-API

File Store for the Assistant API
Other
0 stars 0 forks source link

Build the Assistant API #3

Open LegendarySpork9 opened 6 months ago

LegendarySpork9 commented 6 months ago

Build the Assistant API and Test it.

LegendarySpork9 commented 6 months ago

https://medium.com/@AdanRobles00/how-to-build-a-fully-functional-restful-api-using-c-and-asp-net-core-38fc647b3a16

LegendarySpork9 commented 6 months ago

Added authorisation endpoint. Need to complete validation.

LegendarySpork9 commented 1 month ago

All endpoints added and tested on the UAT environment.

LegendarySpork9 commented 1 month ago

Code rearranged and retested. Submitting to HF for review and suggestions

LegendarySpork9 commented 1 month ago

Full details attached. API Feedback.docx

LegendarySpork9 commented 1 month ago

Ignore the counts model. Have it in the response model:

return Ok(new
{
    entries = FormattedRecords,
    entry_count = Result.Item1.Length,
    page_number = Filters.PageNumber,
    page_size = Filters.PageSize,
    total_page_count = Math.Ceiling(TotalPages),
    total_count = TotalRecords
}); // Mine

CrackedEntitiesResponseModel responseModel = new()
{
    CrackedEntities = crackedEntityModels,
    ContinuationToken = continuationToken,
    PageSize = pageSize,
    PageCount = crackedEntityModels.Count
};

response = await request.CreateJsonResponse(HttpStatusCode.OK, responseModel);

return response; // DW