|
| 1 | +using System; |
| 2 | +using System.Collections.Generic; |
| 3 | +using System.Net.Http; |
| 4 | +using System.Text; |
| 5 | +using System.Threading; |
| 6 | +using System.Threading.Tasks; |
| 7 | +using WifiPlug.Api.Operations; |
| 8 | + |
| 9 | +namespace WifiPlug.Api |
| 10 | +{ |
| 11 | + /// <summary> |
| 12 | + /// Defines the interface for an api client. |
| 13 | + /// </summary> |
| 14 | + public interface IApiClient |
| 15 | + { |
| 16 | + /// <summary> |
| 17 | + /// Gets or sets the retry count for transient failures. |
| 18 | + /// </summary> |
| 19 | + int RetryCount { get; set; } |
| 20 | + |
| 21 | + /// <summary> |
| 22 | + /// Gets or sets the retry delay. |
| 23 | + /// </summary> |
| 24 | + TimeSpan RetryDelay { get; set; } |
| 25 | + |
| 26 | + /// <summary> |
| 27 | + /// Gets or sets the authentication method. |
| 28 | + /// </summary> |
| 29 | + ApiAuthentication Authentication { get; set; } |
| 30 | + |
| 31 | + /// <summary> |
| 32 | + /// Gets or sets the timeout for requests. |
| 33 | + /// </summary> |
| 34 | + TimeSpan Timeout { get; set; } |
| 35 | + |
| 36 | + /// <summary> |
| 37 | + /// Gets the underlying http client. |
| 38 | + /// </summary> |
| 39 | + HttpClient Client { get; } |
| 40 | + |
| 41 | + /// <summary> |
| 42 | + /// Gets or sets the base address. |
| 43 | + /// </summary> |
| 44 | + Uri BaseAddress { get; set; } |
| 45 | + |
| 46 | + /// <summary> |
| 47 | + /// Gets the device operations. |
| 48 | + /// </summary> |
| 49 | + IDeviceOperations Devices { get; } |
| 50 | + |
| 51 | + /// <summary> |
| 52 | + /// Gets the session operations. |
| 53 | + /// </summary> |
| 54 | + ISessionOperations Sessions { get; } |
| 55 | + |
| 56 | + /// <summary> |
| 57 | + /// Gets the user operations. |
| 58 | + /// </summary> |
| 59 | + IUserOperations Users { get; } |
| 60 | + |
| 61 | + /// <summary> |
| 62 | + /// Gets the group operations. |
| 63 | + /// </summary> |
| 64 | + IGroupOperations Groups { get; } |
| 65 | + |
| 66 | + /// <summary> |
| 67 | + /// Gets the event operations. |
| 68 | + /// </summary> |
| 69 | + IEventOperations Events { get; } |
| 70 | + |
| 71 | + /// <summary> |
| 72 | + /// Pings the API to check if it's up. |
| 73 | + /// </summary> |
| 74 | + /// <param name="cancellationToken">The cancellation token.</param> |
| 75 | + /// <returns>The ping response.</returns> |
| 76 | + Task<string> PingAsync(CancellationToken cancellationToken = default(CancellationToken)); |
| 77 | + } |
| 78 | +} |
0 commit comments