comparison of usage stats of a selected word among all poets #471
This commit is contained in:
parent
988e92393c
commit
5711ef84a5
@ -4348,6 +4348,11 @@ namespace RMuseum.Controllers
|
||||
return Ok(pagedResult.Result.Items);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// category words summary
|
||||
/// </summary>
|
||||
/// <param name="catId"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
[Route("wordsums/{catId}")]
|
||||
[AllowAnonymous]
|
||||
@ -4363,8 +4368,32 @@ namespace RMuseum.Controllers
|
||||
return Ok(res.Result);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// comparison of word counts for poets
|
||||
/// </summary>
|
||||
/// <param name="term"></param>
|
||||
/// <param name="paging"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
[Route("wordcounts/bypoet")]
|
||||
[AllowAnonymous]
|
||||
[ProducesResponseType((int)HttpStatusCode.OK, Type = typeof(IEnumerable<PoetOrCatWordStat>))]
|
||||
[ProducesResponseType((int)HttpStatusCode.BadRequest, Type = typeof(string))]
|
||||
|
||||
public async Task<IActionResult> GetCategoryWordCountsByPoetsAsync(string term, [FromQuery] PagingParameterModel paging)
|
||||
{
|
||||
var pagedResult = await _ganjoorService.GetCategoryWordCountsByPoetsAsync(term, paging);
|
||||
if (!string.IsNullOrEmpty(pagedResult.ExceptionString))
|
||||
return BadRequest(pagedResult.ExceptionString);
|
||||
|
||||
// Paging Header
|
||||
HttpContext.Response.Headers.Append("paging-headers", JsonConvert.SerializeObject(pagedResult.Result.PagingMeta));
|
||||
|
||||
return Ok(pagedResult.Result.Items);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
/// <summary>
|
||||
|
||||
@ -2338,6 +2338,21 @@
|
||||
<param name="paging"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:RMuseum.Controllers.GanjoorController.GetCategoryWordCountSummaryAsync(System.Int32)">
|
||||
<summary>
|
||||
category words summary
|
||||
</summary>
|
||||
<param name="catId"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:RMuseum.Controllers.GanjoorController.GetCategoryWordCountsByPoetsAsync(System.String,RSecurityBackend.Models.Generic.PagingParameterModel)">
|
||||
<summary>
|
||||
comparison of word counts for poets
|
||||
</summary>
|
||||
<param name="term"></param>
|
||||
<param name="paging"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:RMuseum.Controllers.GanjoorController.GetTajikPoetsAsync">
|
||||
<summary>
|
||||
tajik poets
|
||||
@ -17452,6 +17467,14 @@
|
||||
<param name="catId"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:RMuseum.Services.IGanjoorService.GetCategoryWordCountsByPoetsAsync(System.String,RSecurityBackend.Models.Generic.PagingParameterModel)">
|
||||
<summary>
|
||||
comparison of word counts for poets
|
||||
</summary>
|
||||
<param name="term"></param>
|
||||
<param name="paging"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:RMuseum.Services.IGanjoorService.TajikImportFromSqlite(System.Int32,System.String)">
|
||||
<summary>
|
||||
tajik import from sqlite
|
||||
|
||||
@ -1501,6 +1501,14 @@ namespace RMuseum.Services
|
||||
/// <returns></returns>
|
||||
Task<RServiceResult<CategoryWordCountSummary>> GetCategoryWordCountSummaryAsync(int catId);
|
||||
|
||||
/// <summary>
|
||||
/// comparison of word counts for poets
|
||||
/// </summary>
|
||||
/// <param name="term"></param>
|
||||
/// <param name="paging"></param>
|
||||
/// <returns></returns>
|
||||
Task<RServiceResult<(PaginationMetadata PagingMeta, PoetOrCatWordStat[] Items)>> GetCategoryWordCountsByPoetsAsync(string term, PagingParameterModel paging);
|
||||
|
||||
/// <summary>
|
||||
/// tajik import from sqlite
|
||||
/// </summary>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user