Class TeamsEndpoints
java.lang.Object
masecla.modrinth4j.endpoints.teams.TeamsEndpoints
This class is used to represent the endpoints for teams.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddMemberToTeam(String teamId, String userId) This endpoint is used to add a member to a team.getProjectTeamMembers(String projectId) This endpoint is used to get the team members of a project.getTeamMembers(String teamId) This endpoint is used to get the team members of a team.getTeamMembers(String... teamIds) This endpoint is used to get the team members of multiple teams by their IDs.getTeamMembers(List<String> teamIds) This endpoint is used to get the team members of multiple teams by their IDs.This endpoint is used to join a team.modifyTeamMemberInfo(String teamId, String memberId, ModifyTeamMemberInfo.ModifyTeamMemberInfoRequest request) This endpoint is used to modify a team member's information.removeMemberFromTeam(String teamId, String memberId) This endpoint is used to remove a member from a team.transferOwnership(String teamId, String newOwnerId) This endpoint is used to transfer ownership of a team to another user.
-
Constructor Details
-
TeamsEndpoints
public TeamsEndpoints()
-
-
Method Details
-
getProjectTeamMembers
This endpoint is used to get the team members of a project.- Parameters:
projectId- - The ID of the project to get the team members of.- Returns:
- - A
CompletableFuturethat will return the team members of the project.
-
getTeamMembers
This endpoint is used to get the team members of a team.- Parameters:
teamId- - The ID of the team to get the members of.- Returns:
- - A
CompletableFuturethat will return the team members of the team.
-
getTeamMembers
This endpoint is used to get the team members of multiple teams by their IDs.- Parameters:
teamIds- - The IDs of the teams to get the members of.- Returns:
- - A
CompletableFuturethat will return the team members of the teams. - See Also:
-
getTeamMembers
This endpoint is used to get the team members of multiple teams by their IDs.- Parameters:
teamIds- - The IDs of the teams to get the members of.- Returns:
- - A
CompletableFuturethat will return the team members of the teams. - See Also:
-
addMemberToTeam
This endpoint is used to add a member to a team.- Parameters:
teamId- - The ID of the teamuserId- - The ID of the user (NOT the username)- Returns:
- - A
CompletableFuturethat will return an empty response when completed
-
joinTeam
This endpoint is used to join a team.- Parameters:
teamId- - The ID of the team- Returns:
- - A
CompletableFuturethat will return an empty response when completed
-
modifyTeamMemberInfo
public CompletableFuture<EmptyResponse> modifyTeamMemberInfo(String teamId, String memberId, ModifyTeamMemberInfo.ModifyTeamMemberInfoRequest request) This endpoint is used to modify a team member's information.- Parameters:
teamId- - The ID of the teammemberId- - The ID of the member (NOT the username)request- - The request to send- Returns:
- - A
CompletableFuturethat will return an empty response when completed
-
removeMemberFromTeam
This endpoint is used to remove a member from a team.- Parameters:
teamId- - The ID of the teammemberId- - The ID of the member (NOT the username)- Returns:
- - A
CompletableFuturethat will return an empty response when completed
-
transferOwnership
This endpoint is used to transfer ownership of a team to another user.- Parameters:
teamId- - The ID of the teamnewOwnerId- - The ID of the new owner (NOT the username)- Returns:
- - A
CompletableFuturethat will return an empty response when completed
-