From e2b2e1ebdd2342a76a54563575bded76bb5215e2 Mon Sep 17 00:00:00 2001 From: dvonthenen Date: Wed, 7 Feb 2024 16:18:29 -0800 Subject: [PATCH] Rename Manage Functions to Match Simplier Model Names --- .../UnitTests/ClientTests/ManageClientTest.cs | 84 +++++++++---------- Deepgram/Logger/Log.cs | 2 +- Deepgram/ManageClient.cs | 36 ++++---- 3 files changed, 59 insertions(+), 63 deletions(-) diff --git a/Deepgram.Tests/UnitTests/ClientTests/ManageClientTest.cs b/Deepgram.Tests/UnitTests/ClientTests/ManageClientTest.cs index 9675a166..f619f6ea 100644 --- a/Deepgram.Tests/UnitTests/ClientTests/ManageClientTest.cs +++ b/Deepgram.Tests/UnitTests/ClientTests/ManageClientTest.cs @@ -22,10 +22,6 @@ public void Setup() } #region Projects - - - - [Test] public async Task GetProjects_Should_Call_GetAsync_Returning_ProjectsResponse() { @@ -154,7 +150,7 @@ public async Task DeleteProject_Should_Call_DeleteAsync() #region ProjectKeys [Test] - public async Task GetProjectKeys_Should_Call_GetAsync_Returning_KeysResponse() + public async Task GetKeys_Should_Call_GetAsync_Returning_KeysResponse() { //Arrange var expectedResponse = new AutoFaker().Generate(); @@ -166,7 +162,7 @@ public async Task GetProjectKeys_Should_Call_GetAsync_Returning_KeysResponse() manageClient.GetAsync($"{UriSegments.PROJECTS}/{_projectId}/keys").Returns(expectedResponse); //Act - var result = await manageClient.GetProjectKeys(_projectId); + var result = await manageClient.GetKeys(_projectId); //Assert await manageClient.Received().GetAsync($"{UriSegments.PROJECTS}/{_projectId}/keys"); @@ -179,7 +175,7 @@ public async Task GetProjectKeys_Should_Call_GetAsync_Returning_KeysResponse() } [Test] - public async Task GetProjectKey_Should_Call_GetAsync_Returning_KeyResponse() + public async Task GetKey_Should_Call_GetAsync_Returning_KeyResponse() { //Arrange var expectedResponse = new AutoFaker().Generate(); @@ -193,7 +189,7 @@ public async Task GetProjectKey_Should_Call_GetAsync_Returning_KeyResponse() //Act - var result = await manageClient.GetProjectKey(_projectId, keyId); + var result = await manageClient.GetKey(_projectId, keyId); await manageClient.Received().GetAsync($"{UriSegments.PROJECTS}/{_projectId}/keys/{keyId}"); //Assert @@ -206,7 +202,7 @@ public async Task GetProjectKey_Should_Call_GetAsync_Returning_KeyResponse() } [Test] - public async Task CreateProjectKey_Should_Call_PostAsync_Returning_KeyResponse_Without_Expiration_TimeToLive_Set() + public async Task CreateKey_Should_Call_PostAsync_Returning_KeyResponse_Without_Expiration_TimeToLive_Set() { //Arrange var expectedResponse = new AutoFaker().Generate(); @@ -223,7 +219,7 @@ public async Task CreateProjectKey_Should_Call_PostAsync_Returning_KeyResponse_W //Act - var result = await manageClient.CreateProjectKey(_projectId, createKeySchema); + var result = await manageClient.CreateKey(_projectId, createKeySchema); //Assert await manageClient.Received().PostAsync($"{UriSegments.PROJECTS}/{_projectId}/keys", Arg.Any()); @@ -237,7 +233,7 @@ public async Task CreateProjectKey_Should_Call_PostAsync_Returning_KeyResponse_W } [Test] - public async Task CreateProjectKey_Should_Call_PostAsync_Returning_KeyResponse_With_Expiration_Set() + public async Task CreateKey_Should_Call_PostAsync_Returning_KeyResponse_With_Expiration_Set() { //Arrange var expectedResponse = new AutoFaker().Generate(); @@ -253,7 +249,7 @@ public async Task CreateProjectKey_Should_Call_PostAsync_Returning_KeyResponse_W //Act - var result = await manageClient.CreateProjectKey(_projectId, createKeySchema); + var result = await manageClient.CreateKey(_projectId, createKeySchema); //Assert await manageClient.Received().PostAsync($"{UriSegments.PROJECTS}/{_projectId}/keys", Arg.Any()); @@ -267,7 +263,7 @@ public async Task CreateProjectKey_Should_Call_PostAsync_Returning_KeyResponse_W } [Test] - public async Task CreateProjectKey_Should_Return_KeyResponse_Without_TimeToLive_Set() + public async Task CreateKey_Should_Return_KeyResponse_Without_TimeToLive_Set() { //Arrange var expectedResponse = new AutoFaker().Generate(); @@ -281,7 +277,7 @@ public async Task CreateProjectKey_Should_Return_KeyResponse_Without_TimeToLive_ manageClient.PostAsync($"{UriSegments.PROJECTS}/{_projectId}/keys", Arg.Any()).Returns(expectedResponse); //Act - var result = await manageClient.CreateProjectKey(_projectId, createKeySchema); + var result = await manageClient.CreateKey(_projectId, createKeySchema); //Assert await manageClient.Received().PostAsync($"{UriSegments.PROJECTS}/{_projectId}/keys", Arg.Any()); @@ -295,7 +291,7 @@ public async Task CreateProjectKey_Should_Return_KeyResponse_Without_TimeToLive_ } [Test] - public async Task CreateProjectKey_Should_Throw_ArgumentException_When_Both_Expiration_And_TimeToLive_Set() + public async Task CreateKey_Should_Throw_ArgumentException_When_Both_Expiration_And_TimeToLive_Set() { //Arrange var createKeySchema = new AutoFaker().Generate(); @@ -303,12 +299,12 @@ public async Task CreateProjectKey_Should_Throw_ArgumentException_When_Both_Expi var manageClient = new ManageClient(_apiKey, _options) { _httpClientWrapper = new HttpClientWrapper(new HttpClient()) }; //Act & Assert - await manageClient.Invoking(y => y.CreateProjectKey(UriSegments.PROJECTS, createKeySchema)) + await manageClient.Invoking(y => y.CreateKey(UriSegments.PROJECTS, createKeySchema)) .Should().ThrowAsync(); } [Test] - public async Task DeleteProjectKey_Should_Call_DeleteAsync() + public async Task DeleteKey_Should_Call_DeleteAsync() { //Arrange var keyId = new Faker().Random.Guid().ToString(); @@ -320,7 +316,7 @@ public async Task DeleteProjectKey_Should_Call_DeleteAsync() manageClient.DeleteAsync($"{UriSegments.PROJECTS}/{_projectId}/keys/{keyId}").Returns(Task.CompletedTask); // Act - await manageClient.DeleteProjectKey(_projectId, keyId); + await manageClient.DeleteKey(_projectId, keyId); // Assert await manageClient.Received().DeleteAsync($"{UriSegments.PROJECTS}/{_projectId}/keys/{keyId}"); @@ -331,7 +327,7 @@ public async Task DeleteProjectKey_Should_Call_DeleteAsync() #region ProjectInvites [Test] - public async Task GetProjectInvites_Should_Call_GetAsync_Returning_InvitesResponse() + public async Task GetInvites_Should_Call_GetAsync_Returning_InvitesResponse() { //Arrange var expectedResponse = new AutoFaker().Generate(); @@ -343,7 +339,7 @@ public async Task GetProjectInvites_Should_Call_GetAsync_Returning_InvitesRespon manageClient.GetAsync($"{UriSegments.PROJECTS}/{_projectId}/invites").Returns(expectedResponse); // Act - var result = await manageClient.GetProjectInvites(_projectId); + var result = await manageClient.GetInvites(_projectId); // Assert await manageClient.Received().GetAsync($"{UriSegments.PROJECTS}/{_projectId}/invites"); @@ -356,7 +352,7 @@ public async Task GetProjectInvites_Should_Call_GetAsync_Returning_InvitesRespon } [Test] - public async Task SendProjectInvite_Should_Call_PostAsync_Returning_MessageResponse() + public async Task SendInvite_Should_Call_PostAsync_Returning_MessageResponse() { //Arrange var expectedResponse = new AutoFaker().Generate(); @@ -369,7 +365,7 @@ public async Task SendProjectInvite_Should_Call_PostAsync_Returning_MessageRespo manageClient.PostAsync($"{UriSegments.PROJECTS}/{_projectId}/invites", Arg.Any()).Returns(expectedResponse); // Act - var result = await manageClient.SendProjectInvite(_projectId, inviteSchema); + var result = await manageClient.SendInvite(_projectId, inviteSchema); // Assert await manageClient.Received().PostAsync($"{UriSegments.PROJECTS}/{_projectId}/invites", Arg.Any()); @@ -382,7 +378,7 @@ public async Task SendProjectInvite_Should_Call_PostAsync_Returning_MessageRespo } [Test] - public async Task DeleteProjectInvite_Should_Call_DeleteAsync() + public async Task DeleteInvite_Should_Call_DeleteAsync() { //Arrange var email = new Faker().Internet.Email(); @@ -394,7 +390,7 @@ public async Task DeleteProjectInvite_Should_Call_DeleteAsync() manageClient.DeleteAsync($"{UriSegments.PROJECTS}/{_projectId}/invites/{email}").Returns(Task.CompletedTask); // Act - await manageClient.DeleteProjectInvite(_projectId, email); + await manageClient.DeleteInvite(_projectId, email); // Assert await manageClient.Received().DeleteAsync($"{UriSegments.PROJECTS}/{_projectId}/invites/{email}"); @@ -404,7 +400,7 @@ public async Task DeleteProjectInvite_Should_Call_DeleteAsync() #region Members [Test] - public async Task GetProjectMembers_Should_Call_GetAsync_Returning_MembersResponse() + public async Task GetMembers_Should_Call_GetAsync_Returning_MembersResponse() { //Arrange var expectedResponse = new AutoFaker().Generate(); @@ -416,7 +412,7 @@ public async Task GetProjectMembers_Should_Call_GetAsync_Returning_MembersRespon manageClient.GetAsync($"{UriSegments.PROJECTS}/{_projectId}/members").Returns(expectedResponse); // Act - var result = await manageClient.GetProjectMembers(_projectId); + var result = await manageClient.GetMembers(_projectId); // Assert await manageClient.Received().GetAsync($"{UriSegments.PROJECTS}/{_projectId}/members"); @@ -429,7 +425,7 @@ public async Task GetProjectMembers_Should_Call_GetAsync_Returning_MembersRespon } [Test] - public async Task GetProjectMemberScopes_Should_Call_GetAsync_Returning_MemberScopesResponse() + public async Task GetMemberScopes_Should_Call_GetAsync_Returning_MemberScopesResponse() { //Arrange var expectedResponse = new AutoFaker().Generate(); @@ -443,7 +439,7 @@ public async Task GetProjectMemberScopes_Should_Call_GetAsync_Returning_MemberSc manageClient.GetAsync($"{UriSegments.PROJECTS}/{_projectId}/members/{memberId}/scopes").Returns(expectedResponse); // Act - var result = await manageClient.GetProjectMemberScopes(_projectId, memberId); + var result = await manageClient.GetMemberScopes(_projectId, memberId); // Assert await manageClient.Received().GetAsync($"{UriSegments.PROJECTS}/{_projectId}/members/{memberId}/scopes"); @@ -456,7 +452,7 @@ public async Task GetProjectMemberScopes_Should_Call_GetAsync_Returning_MemberSc } [Test] - public async Task UpdateProjectMemberScope_Should_Call_PutAsync_Returning_MessageResponse() + public async Task UpdateMemberScope_Should_Call_PutAsync_Returning_MessageResponse() { //Arrange var expectedResponse = new AutoFaker().Generate(); @@ -470,7 +466,7 @@ public async Task UpdateProjectMemberScope_Should_Call_PutAsync_Returning_Messag manageClient.PutAsync($"{UriSegments.PROJECTS}/{_projectId}/members/{memberId}/scopes", Arg.Any()).Returns(expectedResponse); // Act - var result = await manageClient.UpdateProjectMemberScope(_projectId, memberId, memberScopeSchema); + var result = await manageClient.UpdateMemberScope(_projectId, memberId, memberScopeSchema); // Assert await manageClient.Received().PutAsync($"{UriSegments.PROJECTS}/{_projectId}/members/{memberId}/scopes", Arg.Any()); @@ -483,7 +479,7 @@ public async Task UpdateProjectMemberScope_Should_Call_PutAsync_Returning_Messag } [Test] - public async Task RemoveProjectMember_Should_Call_DeleteAsync() + public async Task RemoveMember_Should_Call_DeleteAsync() { //Arrange var memberId = new Faker().Random.Guid().ToString(); @@ -495,7 +491,7 @@ public async Task RemoveProjectMember_Should_Call_DeleteAsync() manageClient.DeleteAsync($"{UriSegments.PROJECTS}/{_projectId}/members/{memberId}").Returns(Task.CompletedTask); // Act - await manageClient.RemoveProjectMember(_projectId, memberId); + await manageClient.RemoveMember(_projectId, memberId); // Assert await manageClient.Received().DeleteAsync($"{UriSegments.PROJECTS}/{_projectId}/members/{memberId}"); @@ -505,7 +501,7 @@ public async Task RemoveProjectMember_Should_Call_DeleteAsync() #region Usage [Test] - public async Task GetProjectUsageRequests_Should_Call_GetAsync_Returning_UsageRequestsResponse() + public async Task GetUsageRequests_Should_Call_GetAsync_Returning_UsageRequestsResponse() { //Arrange var expectedResponse = new AutoFaker().Generate(); @@ -519,7 +515,7 @@ public async Task GetProjectUsageRequests_Should_Call_GetAsync_Returning_UsageRe manageClient.GetAsync($"{UriSegments.PROJECTS}/{_projectId}/requests?{stringedOptions}").Returns(expectedResponse); // Act - var result = await manageClient.GetProjectUsageRequests(_projectId, UsageRequestsSchema); + var result = await manageClient.GetUsageRequests(_projectId, UsageRequestsSchema); // Assert await manageClient.Received().GetAsync($"{UriSegments.PROJECTS}/{_projectId}/requests?{stringedOptions}"); @@ -533,7 +529,7 @@ public async Task GetProjectUsageRequests_Should_Call_GetAsync_Returning_UsageRe } [Test] - public async Task GetProjectsUsageRequest_Should_Call_GetAsync_Returning_UsageRequestResponse() + public async Task GetsUsageRequest_Should_Call_GetAsync_Returning_UsageRequestResponse() { //Arrange var requestId = new Faker().Random.Guid().ToString(); @@ -546,7 +542,7 @@ public async Task GetProjectsUsageRequest_Should_Call_GetAsync_Returning_UsageRe manageClient.GetAsync($"{UriSegments.PROJECTS}/{_projectId}/requests/{requestId}").Returns(expectedResponse); // Act - var result = await manageClient.GetProjectUsageRequest(_projectId, requestId); + var result = await manageClient.GetUsageRequest(_projectId, requestId); // Assert await manageClient.Received().GetAsync($"{UriSegments.PROJECTS}/{_projectId}/requests/{requestId}"); @@ -559,7 +555,7 @@ public async Task GetProjectsUsageRequest_Should_Call_GetAsync_Returning_UsageRe } [Test] - public async Task GetProjectsUsageSummary_Should_Call_GetAsync_Returning_UsageSummaryResponse() + public async Task GetsUsageSummary_Should_Call_GetAsync_Returning_UsageSummaryResponse() { //Arrange var expectedResponse = new AutoFaker().Generate(); @@ -573,7 +569,7 @@ public async Task GetProjectsUsageSummary_Should_Call_GetAsync_Returning_UsageSu manageClient.GetAsync($"{UriSegments.PROJECTS}/{_projectId}/usage?{stringedOptions}").Returns(expectedResponse); // Act - var result = await manageClient.GetProjectUsageSummary(_projectId, getProjectUsageSummarySchema); + var result = await manageClient.GetUsageSummary(_projectId, getProjectUsageSummarySchema); // Assert await manageClient.Received().GetAsync($"{UriSegments.PROJECTS}/{_projectId}/usage?{stringedOptions}"); @@ -587,7 +583,7 @@ public async Task GetProjectsUsageSummary_Should_Call_GetAsync_Returning_UsageSu } [Test] - public async Task GetProjectUsageFields_Should_GetAsync_Returning_UsageSummaryResponse() + public async Task GetUsageFields_Should_GetAsync_Returning_UsageSummaryResponse() { //Arrange var expectedResponse = new AutoFaker().Generate(); @@ -601,7 +597,7 @@ public async Task GetProjectUsageFields_Should_GetAsync_Returning_UsageSummaryRe manageClient.GetAsync($"{UriSegments.PROJECTS}/{_projectId}/usage/fields?{stringedOptions}").Returns(expectedResponse); // Act - var result = await manageClient.GetProjectUsageFields(_projectId, getProjectUsageFieldsSchema); + var result = await manageClient.GetUsageFields(_projectId, getProjectUsageFieldsSchema); // Assert await manageClient.Received().GetAsync($"{UriSegments.PROJECTS}/{_projectId}/usage/fields?{stringedOptions}"); @@ -619,7 +615,7 @@ public async Task GetProjectUsageFields_Should_GetAsync_Returning_UsageSummaryRe #region Balances [Test] - public async Task GetProjectBalances_Should_Call_GetAsync_Returning_BalancesResponse() + public async Task GetBalances_Should_Call_GetAsync_Returning_BalancesResponse() { //Arrange var expectedResponse = new AutoFaker().Generate(); @@ -631,7 +627,7 @@ public async Task GetProjectBalances_Should_Call_GetAsync_Returning_BalancesResp manageClient.GetAsync($"{UriSegments.PROJECTS}/{_projectId}/balances").Returns(expectedResponse); // Act - var result = await manageClient.GetProjectBalances(_projectId); + var result = await manageClient.GetBalances(_projectId); // Assert await manageClient.Received().GetAsync($"{UriSegments.PROJECTS}/{_projectId}/balances"); @@ -644,7 +640,7 @@ public async Task GetProjectBalances_Should_Call_GetAsync_Returning_BalancesResp } [Test] - public async Task GetProjectBalance_Should_Call_GetAsync_Returning_BalanceResponse() + public async Task GetBalance_Should_Call_GetAsync_Returning_BalanceResponse() { //Arrange var expectedResponse = new AutoFaker().Generate(); @@ -656,7 +652,7 @@ public async Task GetProjectBalance_Should_Call_GetAsync_Returning_BalanceRespon manageClient.GetAsync($"{UriSegments.PROJECTS}/{_projectId}/balances/{balanceId}").Returns(expectedResponse); // Act - var result = await manageClient.GetProjectBalance(_projectId, balanceId); + var result = await manageClient.GetBalance(_projectId, balanceId); // Assert await manageClient.Received().GetAsync($"{UriSegments.PROJECTS}/{_projectId}/balances/{balanceId}"); diff --git a/Deepgram/Logger/Log.cs b/Deepgram/Logger/Log.cs index 40eb9f10..ebe96c2e 100644 --- a/Deepgram/Logger/Log.cs +++ b/Deepgram/Logger/Log.cs @@ -49,5 +49,5 @@ internal static partial class Log EventId = 0018, Level = LogLevel.Error, Message = "Error creating project key both ExpirationDate and TimeToLiveInSeconds are set: `{createProjectKeySchema}`")] - internal static partial void CreateProjectKeyError(this ILogger logger, KeySchema createProjectKeySchema); + internal static partial void CreateKeyError(this ILogger logger, KeySchema createProjectKeySchema); } diff --git a/Deepgram/ManageClient.cs b/Deepgram/ManageClient.cs index 674ee312..55942370 100644 --- a/Deepgram/ManageClient.cs +++ b/Deepgram/ManageClient.cs @@ -68,7 +68,7 @@ public async Task LeaveProject(string projectId, CancellationTo /// /// Id of project /// - public async Task GetProjectKeys(string projectId, CancellationToken cancellationToken = default) => + public async Task GetKeys(string projectId, CancellationToken cancellationToken = default) => await GetAsync($"{UriSegments.PROJECTS}/{projectId}/{UriSegments.KEYS}", cancellationToken); /// @@ -77,7 +77,7 @@ public async Task GetProjectKeys(string projectId, CancellationTok /// Id of project /// Id of key /// - public async Task GetProjectKey(string projectId, string keyId, CancellationToken cancellationToken = default) => + public async Task GetKey(string projectId, string keyId, CancellationToken cancellationToken = default) => await GetAsync($"{UriSegments.PROJECTS}/{projectId}/{UriSegments.KEYS}/{keyId}", cancellationToken); /// @@ -86,11 +86,11 @@ public async Task GetProjectKey(string projectId, string keyId /// Id of project /// for the key to be created /// - public async Task CreateProjectKey(string projectId, KeySchema createProjectKeySchema, CancellationToken cancellationToken = default) + public async Task CreateKey(string projectId, KeySchema createProjectKeySchema, CancellationToken cancellationToken = default) { if (createProjectKeySchema.ExpirationDate is not null && createProjectKeySchema.TimeToLiveInSeconds is not null) { - Log.CreateProjectKeyError(_logger, createProjectKeySchema); + Log.CreateKeyError(_logger, createProjectKeySchema); throw new ArgumentException("Both ExpirationDate and TimeToLiveInSeconds is set. set either one but not both"); } @@ -106,7 +106,7 @@ public async Task CreateProjectKey(string projectId, KeySchema crea /// Id of project /// Id of key // Nothing being returned - public async Task DeleteProjectKey(string projectId, string keyId, CancellationToken cancellationToken = default) => + public async Task DeleteKey(string projectId, string keyId, CancellationToken cancellationToken = default) => await DeleteAsync($"{UriSegments.PROJECTS}/{projectId}/keys/{keyId}", cancellationToken); #endregion @@ -117,7 +117,7 @@ public async Task DeleteProjectKey(string projectId, string keyId, CancellationT /// /// Id of project /// - public async Task GetProjectInvites(string projectId, CancellationToken cancellationToken = default) => + public async Task GetInvites(string projectId, CancellationToken cancellationToken = default) => await GetAsync($"{UriSegments.PROJECTS}/{projectId}/{UriSegments.INVITES}", cancellationToken); /// @@ -126,7 +126,7 @@ public async Task GetProjectInvites(string projectId, Cancellat /// Id of project /// email of the invite to be removed //no response expected - public async Task DeleteProjectInvite(string projectId, string email, CancellationToken cancellationToken = default) => + public async Task DeleteInvite(string projectId, string email, CancellationToken cancellationToken = default) => await DeleteAsync($"{UriSegments.PROJECTS}/{projectId}/{UriSegments.INVITES}/{email}", cancellationToken); /// @@ -135,7 +135,7 @@ public async Task DeleteProjectInvite(string projectId, string email, Cancellati /// Id of project /// for a invite to project /// - public async Task SendProjectInvite(string projectId, InviteSchema inviteSchema, CancellationToken cancellationToken = default) => + public async Task SendInvite(string projectId, InviteSchema inviteSchema, CancellationToken cancellationToken = default) => await PostAsync( $"{UriSegments.PROJECTS}/{projectId}/{UriSegments.INVITES}", RequestContentUtil.CreatePayload(inviteSchema), cancellationToken); @@ -147,7 +147,7 @@ await PostAsync( /// /// Id of project /// - public async Task GetProjectMembers(string projectId, CancellationToken cancellationToken = default) => + public async Task GetMembers(string projectId, CancellationToken cancellationToken = default) => await GetAsync($"{UriSegments.PROJECTS}/{projectId}/{UriSegments.MEMBERS}", cancellationToken); /// @@ -156,7 +156,7 @@ public async Task GetProjectMembers(string projectId, Cancellat /// Id of project /// Id of member /// - public async Task GetProjectMemberScopes(string projectId, string memberId, CancellationToken cancellationToken = default) => + public async Task GetMemberScopes(string projectId, string memberId, CancellationToken cancellationToken = default) => await GetAsync($"{UriSegments.PROJECTS}/{projectId}/{UriSegments.MEMBERS}/{memberId}/{UriSegments.SCOPES}", cancellationToken); /// @@ -166,7 +166,7 @@ public async Task GetProjectMemberScopes(string projectId, /// Id of member /// updates scope options for member /// - public async Task UpdateProjectMemberScope(string projectId, string memberId, MemberScopeSchema memberScopeSchema, CancellationToken cancellationToken = default) => + public async Task UpdateMemberScope(string projectId, string memberId, MemberScopeSchema memberScopeSchema, CancellationToken cancellationToken = default) => await PutAsync( $"{UriSegments.PROJECTS}/{projectId}/{UriSegments.MEMBERS}/{memberId}/{UriSegments.SCOPES}", RequestContentUtil.CreatePayload(memberScopeSchema), cancellationToken); @@ -177,7 +177,7 @@ await PutAsync( /// Id of project /// Id of member //No response expected - public async Task RemoveProjectMember(string projectId, string memberId, CancellationToken cancellationToken = default) => + public async Task RemoveMember(string projectId, string memberId, CancellationToken cancellationToken = default) => await DeleteAsync($"{UriSegments.PROJECTS}/{projectId}/{UriSegments.MEMBERS}/{memberId}", cancellationToken); #endregion @@ -189,7 +189,7 @@ public async Task RemoveProjectMember(string projectId, string memberId, Cancell /// Id of project /// Project usage request options /// - public async Task GetProjectUsageRequests(string projectId, UsageRequestsSchema UsageRequestsSchema, CancellationToken cancellationToken = default) + public async Task GetUsageRequests(string projectId, UsageRequestsSchema UsageRequestsSchema, CancellationToken cancellationToken = default) { var stringedOptions = QueryParameterUtil.GetParameters(UsageRequestsSchema); return await GetAsync($"{UriSegments.PROJECTS}/{projectId}/{UriSegments.REQUESTS}?{stringedOptions}", cancellationToken); @@ -201,7 +201,7 @@ public async Task GetProjectUsageRequests(string projectI /// Id of project /// Id of request /// - public async Task GetProjectUsageRequest(string projectId, string requestId, CancellationToken cancellationToken = default) => + public async Task GetUsageRequest(string projectId, string requestId, CancellationToken cancellationToken = default) => await GetAsync($"{UriSegments.PROJECTS}/{projectId}/{UriSegments.REQUESTS}/{requestId}", cancellationToken); /// @@ -210,7 +210,7 @@ public async Task GetProjectUsageRequest(string projectId, /// Id of project /// Usage summary options /// - public async Task GetProjectUsageSummary(string projectId, UsageSummarySchema getProjectUsageSummarySchema, CancellationToken cancellationToken = default) + public async Task GetUsageSummary(string projectId, UsageSummarySchema getProjectUsageSummarySchema, CancellationToken cancellationToken = default) { var stringedOptions = QueryParameterUtil.GetParameters(getProjectUsageSummarySchema); return await GetAsync( @@ -223,7 +223,7 @@ public async Task GetProjectUsageSummary(string projectId, /// Id of project /// Project usage request field options /// - public async Task GetProjectUsageFields(string projectId, UsageFieldsSchema getProjectUsageFieldsSchema, CancellationToken cancellationToken = default) + public async Task GetUsageFields(string projectId, UsageFieldsSchema getProjectUsageFieldsSchema, CancellationToken cancellationToken = default) { var stringedOptions = QueryParameterUtil.GetParameters(getProjectUsageFieldsSchema); return await GetAsync( @@ -238,7 +238,7 @@ public async Task GetProjectUsageFields(string projectId, U /// /// Id of project /// - public async Task GetProjectBalances(string projectId, CancellationToken cancellationToken = default) => + public async Task GetBalances(string projectId, CancellationToken cancellationToken = default) => await GetAsync($"{UriSegments.PROJECTS}/{projectId}/{UriSegments.BALANCES}", cancellationToken); /// @@ -247,7 +247,7 @@ public async Task GetProjectBalances(string projectId, Cancell /// Id of project /// Id of balance /// - public async Task GetProjectBalance(string projectId, string balanceId, CancellationToken cancellationToken = default) => + public async Task GetBalance(string projectId, string balanceId, CancellationToken cancellationToken = default) => await GetAsync($"{UriSegments.PROJECTS}/{projectId}/{UriSegments.BALANCES}/{balanceId}", cancellationToken); #endregion }