#418 poem/id/quoted api

This commit is contained in:
Hamid Reza Mohammadi 2023-12-15 15:37:45 +03:30
parent d665fe1eb4
commit 807c8eb20f
2 changed files with 30 additions and 0 deletions

View File

@ -3650,6 +3650,27 @@ namespace RMuseum.Controllers
return Ok();
}
/// <summary>
/// get quoted poems for a poem
/// </summary>
/// <param name="poemId"></param>
/// <param name="skip"></param>
/// <param name="itemsCount"></param>
/// <returns></returns>
[HttpGet]
[Route("poem/{id}/quoteds")]
[AllowAnonymous]
[ProducesResponseType((int)HttpStatusCode.OK, Type = typeof(GanjoorQuotedPoem[]))]
[ProducesResponseType((int)HttpStatusCode.BadRequest, Type = typeof(string))]
public async Task<IActionResult> GetGanjoorQuotedPoemsAsync(int poemId, int skip, int itemsCount)
{
RServiceResult<GanjoorQuotedPoem[]> res =
await _ganjoorService.GetGanjoorQuotedPoemsAsync(poemId, skip, itemsCount);
if (!string.IsNullOrEmpty(res.ExceptionString))
return BadRequest(res.ExceptionString);
return Ok(res.Result);
}

View File

@ -2013,6 +2013,15 @@
</summary>
<returns></returns>
</member>
<member name="M:RMuseum.Controllers.GanjoorController.GetGanjoorQuotedPoemsAsync(System.Int32,System.Int32,System.Int32)">
<summary>
get quoted poems for a poem
</summary>
<param name="poemId"></param>
<param name="skip"></param>
<param name="itemsCount"></param>
<returns></returns>
</member>
<member name="P:RMuseum.Controllers.GanjoorController.ReadOnlyMode">
<summary>
readonly mode