56 lines
1.9 KiB
C#
56 lines
1.9 KiB
C#
using RMuseum.Models.Ganjoor;
|
|
using RMuseum.Models.Ganjoor.ViewModels;
|
|
using RMuseum.Models.GanjoorAudio.ViewModels;
|
|
using RMuseum.Models.GanjoorIntegration.ViewModels;
|
|
using RSecurityBackend.Models.Generic;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace RMuseum.Services
|
|
{
|
|
/// <summary>
|
|
/// Ganjoor Poems Content Privider Service
|
|
/// </summary>
|
|
public interface IGanjoorService
|
|
{
|
|
/// <summary>
|
|
/// get poem by id
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
/// <returns></returns>
|
|
Task<RServiceResult<GanjoorPoem>> GetPoemById(int id);
|
|
|
|
/// <summary>
|
|
/// get poem recitations (PlainText/HtmlText are intentionally empty)
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
/// <returns></returns>
|
|
Task<RServiceResult<PublicRecitationViewModel[]>> GetPoemRecitations(int id);
|
|
|
|
/// <summary>
|
|
/// get poem images by id (some fields are intentionally field with blank or null),
|
|
/// EntityImageId : the most important data field, image url is https://ganjgah.ir/api/images/thumb/{EntityImageId}.jpg or https://ganjgah.ir/api/images/norm/{EntityImageId}.jpg
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
/// <returns></returns>
|
|
Task<RServiceResult<GanjoorLinkViewModel[]>> GetPoemImages(int id);
|
|
|
|
/// <summary>
|
|
/// get a random poem from hafez
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
Task<RServiceResult<GanjoorPoemCompleteViewModel>> Faal();
|
|
|
|
/// <summary>
|
|
/// imports unimported poem data from a locally accessible ganjoor SqlLite database
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
Task<RServiceResult<bool>> ImportLocalSQLiteDb();
|
|
|
|
/// <summary>
|
|
/// updates poems text
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
RServiceResult<bool> UpdatePoemsText();
|
|
}
|
|
}
|