public async ValueTask <BungieResponse <int> > EditGroupMembership( AuthorizationTokenData authorizationToken, long groupId, long membershipId, BungieMembershipType membershipType, RuntimeGroupMemberType memberType, CancellationToken cancellationToken = default) { if (!_configuration.HasSufficientRights(ApplicationScopes.AdminGroups)) { throw new InsufficientScopeException(ApplicationScopes.AdminGroups); } var url = StringBuilderPool.GetBuilder(cancellationToken) .Append("/GroupV2/") .AddUrlParam(groupId.ToString()) .Append("Members/") .AddUrlParam(((int)membershipType).ToString()) .AddUrlParam(membershipId.ToString()) .Append("SetMembershipType/") .AddUrlParam(((int)memberType).ToString()) .Build(); return(await _dotNetBungieApiHttpClient .PostToBungieNetPlatform <int>(url, cancellationToken, authToken : authorizationToken.AccessToken) .ConfigureAwait(false)); }
public async ValueTask <BungieResponse <SearchResultOfGroupMember> > GetMembersOfGroup( long groupId, int currentpage = 1, RuntimeGroupMemberType memberType = RuntimeGroupMemberType.None, string nameSearch = null, CancellationToken token = default) { return(await _apiAccess.GetMembersOfGroup(groupId, currentpage, memberType, nameSearch, token)); }
public async ValueTask <BungieResponse <int> > EditGroupMembership( long groupId, long membershipId, BungieMembershipType membershipType, RuntimeGroupMemberType memberType, CancellationToken token = default) { return(await _apiAccess.EditGroupMembership(_token, groupId, membershipId, membershipType, memberType, token)); }
public async ValueTask <BungieResponse <SearchResultOfGroupMember> > GetMembersOfGroup( long groupId, int currentpage = 1, RuntimeGroupMemberType memberType = RuntimeGroupMemberType.None, string nameSearch = null, CancellationToken token = default) { var url = StringBuilderPool.GetBuilder(token) .Append("/GroupV2/") .AddUrlParam(groupId.ToString()) .Append("Members/") .AddQueryParam("currentpage", currentpage.ToString()) .AddQueryParam("memberType", ((int)memberType).ToString()) .AddQueryParam("nameSearch", nameSearch, () => !string.IsNullOrWhiteSpace(nameSearch)) .Build(); return(await _httpClient.GetFromBungieNetPlatform <SearchResultOfGroupMember>(url, token)); }