| | | 1 | | using Newtonsoft.Json.Linq; |
| | | 2 | | |
| | | 3 | | namespace Services.ApiServices.ShateMApi; |
| | | 4 | | |
| | | 5 | | /// <summary>Белый список только read-операций Shate-M API.</summary> |
| | | 6 | | public sealed class ShateMDataManager |
| | | 7 | | { |
| | | 8 | | private readonly ShateMHttpClient _client; |
| | 114 | 9 | | public ShateMDataManager(ShateMHttpClient client) => _client = client; |
| | | 10 | | |
| | 0 | 11 | | public Task<JToken> PingAsync(CancellationToken ct = default) => _client.GetAsync("/api/v1/customer/info", null, ct) |
| | 34 | 12 | | public Task<JToken> GetAsync(string path, IReadOnlyDictionary<string, string?>? query, CancellationToken ct = defaul |
| | 33 | 13 | | public Task<JToken> SearchAsync(string path, JToken filter, CancellationToken ct = default) => _client.PostAsync(pat |
| | 0 | 14 | | public Task<JToken> PatchAsync(string path, JToken body, CancellationToken ct = default) => _client.PatchAsync(path, |
| | 6 | 15 | | public Task<JToken> DeleteAsync(string path, CancellationToken ct = default) => _client.DeleteAsync(path, ct); |
| | | 16 | | } |