docs: #306 api for extracting sections

This commit is contained in:
Hamid Reza Mohammadi 2022-04-06 20:20:45 +04:30
parent 2abf30ac8f
commit eb36562401
4 changed files with 51 additions and 0 deletions

View File

@ -2748,6 +2748,23 @@ namespace RMuseum.Controllers
return Ok();
}
/// <summary>
/// sectionizing poems
/// </summary>
/// <param name="clearOldSections"></param>
/// <returns></returns>
[HttpPost("sections/onetime/startextracting")]
[Authorize(Policy = RMuseumSecurableItem.GanjoorEntityShortName + ":" + SecurableItem.ModifyOperationShortName)]
[ProducesResponseType((int)HttpStatusCode.OK)]
[ProducesResponseType((int)HttpStatusCode.BadRequest, Type = typeof(string))]
public IActionResult StartSectionizingPoems(bool clearOldSections = false)
{
var res = _ganjoorService.StartSectionizingPoems(clearOldSections);
if (!string.IsNullOrEmpty(res.ExceptionString))
return BadRequest(res.ExceptionString);
return Ok();
}
/// <summary>
/// readonly mode
/// </summary>

View File

@ -1688,6 +1688,13 @@
<param name="destCatId"></param>
<returns></returns>
</member>
<member name="M:RMuseum.Controllers.GanjoorController.StartSectionizingPoems(System.Boolean)">
<summary>
sectionizing poems
</summary>
<param name="clearOldSections"></param>
<returns></returns>
</member>
<member name="P:RMuseum.Controllers.GanjoorController.ReadOnlyMode">
<summary>
readonly mode
@ -11624,6 +11631,13 @@
<param name="destCatId"></param>
<returns></returns>
</member>
<member name="M:RMuseum.Services.IGanjoorService.StartSectionizingPoems(System.Boolean)">
<summary>
sectionizing poems
</summary>
<param name="clearOldSections"></param>
<returns></returns>
</member>
<member name="T:RMuseum.Services.IGanjoorTranslationService">
<summary>
translation service implementation
@ -13210,6 +13224,13 @@
<param name="rejectionCause"></param>
<returns></returns>
</member>
<member name="M:RMuseum.Services.Implementation.GanjoorService.StartSectionizingPoems(System.Boolean)">
<summary>
sectionizing poems
</summary>
<param name="clearOldSections"></param>
<returns></returns>
</member>
<member name="M:RMuseum.Services.Implementation.GanjoorService.StartFindingMissingRhythms(System.Boolean,System.Int32)">
<summary>
Start finding missing rhthms

View File

@ -901,5 +901,13 @@ namespace RMuseum.Services
/// <param name="destCatId"></param>
/// <returns></returns>
RServiceResult<bool> StartRemovingCategoryDuplicates(int catId, int destCatId);
/// <summary>
/// sectionizing poems
/// </summary>
/// <param name="clearOldSections"></param>
/// <returns></returns>
RServiceResult<bool> StartSectionizingPoems(bool clearOldSections = false);
}
}

View File

@ -16,6 +16,11 @@ namespace RMuseum.Services.Implementation
/// </summary>
public partial class GanjoorService : IGanjoorService
{
/// <summary>
/// sectionizing poems
/// </summary>
/// <param name="clearOldSections"></param>
/// <returns></returns>
public RServiceResult<bool> StartSectionizingPoems(bool clearOldSections = false)
{
try