using Newtonsoft.Json; namespace DocuMed.Infrastructure.RestServices; public interface IRestApiWrapper : IScopedDependency { IKaveNegarRestApi KaveNegarRestApi { get; } IMetisRestApi MetisRestApi { get; } } public class RestApiWrapper : IRestApiWrapper { private static readonly RefitSettings setting = new RefitSettings(new NewtonsoftJsonContentSerializer(new JsonSerializerSettings { ReferenceLoopHandling = ReferenceLoopHandling.Ignore, })); public IKaveNegarRestApi KaveNegarRestApi => RestService.For(RestAddress.BaseKaveNegar); public IMetisRestApi MetisRestApi => RestService.For("https://api.metisai.ir/api/v1", setting); }