using System.Net.Http; using System.Threading; using System.Threading.Tasks; namespace ReC.Client.Api { /// /// Provides access to profile endpoints. /// public class ProfileApi : BaseCrudApi { /// /// Initializes a new instance of the class. /// /// The HTTP client used for requests. public ProfileApi(HttpClient http) : base(http, "api/Profile") { } /// /// Retrieves a profile by identifier. /// /// The profile identifier. /// Whether to include related actions. /// A token to cancel the operation. /// The HTTP response message. public Task GetAsync(long id, bool includeActions = false, CancellationToken cancel = default) { var query = ReCClientHelpers.BuildQuery(("Id", id), ("IncludeActions", includeActions)); return Http.GetAsync($"{ResourcePath}{query}", cancel); } } }