#413 poem sections by format api
This commit is contained in:
parent
bba5980051
commit
6da3d5ec76
@ -2430,6 +2430,30 @@ namespace RMuseum.Controllers
|
||||
return Ok(pagedResult.Result.Items);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get Poem sections based on poem format
|
||||
/// </summary>
|
||||
/// <param name="paging"></param>
|
||||
/// <param name="format"></param>
|
||||
/// <param name="poetId"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
[Route("sections/tagged/format")]
|
||||
[AllowAnonymous]
|
||||
[ProducesResponseType((int)HttpStatusCode.OK, Type = typeof(IEnumerable<GanjoorPoemCompleteViewModel>))]
|
||||
[ProducesResponseType((int)HttpStatusCode.BadRequest, Type = typeof(string))]
|
||||
public async Task<IActionResult> GetPoemSectionsByPoemFormat([FromQuery] PagingParameterModel paging, GanjoorPoemFormat format, int poetId = 0)
|
||||
{
|
||||
var pagedResult = await _ganjoorService.GetPoemSectionsByPoemFormat(paging, format, poetId == 0 ? (int?)null : poetId);
|
||||
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>
|
||||
/// search
|
||||
/// </summary>
|
||||
|
||||
@ -1614,6 +1614,15 @@
|
||||
<param name="poetId">0 means all poets</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:RMuseum.Controllers.GanjoorController.GetPoemSectionsByPoemFormat(RSecurityBackend.Models.Generic.PagingParameterModel,RMuseum.Models.Ganjoor.GanjoorPoemFormat,System.Int32)">
|
||||
<summary>
|
||||
Get Poem sections based on poem format
|
||||
</summary>
|
||||
<param name="paging"></param>
|
||||
<param name="format"></param>
|
||||
<param name="poetId"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:RMuseum.Controllers.GanjoorController.Search(RSecurityBackend.Models.Generic.PagingParameterModel,System.String,System.Int32,System.Int32)">
|
||||
<summary>
|
||||
search
|
||||
|
||||
Loading…
Reference in New Issue
Block a user