Class GHTeamBuilder
java.lang.Object
io.github.coho04.githubapi.bases.GHBase
io.github.coho04.githubapi.builders.GHTeamBuilder
- All Implemented Interfaces:
HttpRequestInterface
,JSONHelper
This class is used to build a new GitHub team.
It extends GHBase and provides methods for setting the team's properties, and for building the team.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.github.coho04.githubapi.interfaces.JSONHelper
JSONHelper.JSONToObject<T>
-
Constructor Summary
ConstructorsConstructorDescriptionGHTeamBuilder
(Github github, String url) Constructs a new GHTeamBuilder instance with the provided GitHub instance and URL. -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the team and returns a new GHTeam instance.Returns the description of the team.Returns the GitHub instance.Returns the maintainers of the team.getName()
Returns the name of the team.Returns the notification setting of the team.int
Returns the parent team id of the team.Returns the permission of the team.Returns the privacy of the team.Returns the repo names of the team.getUrl()
Returns the URL.setDescription
(String description) Sets the description of the team.setMaintainers
(List<String> maintainers) Sets the maintainers of the team.Sets the name of the team.setNotificationSetting
(String notificationSetting) Sets the notification setting of the team.setParentTeamId
(int parentTeamId) Sets the parent team id of the team.setPermission
(String permission) Sets the permission of the team.setPrivacy
(String privacy) Sets the privacy of the team.setRepoNames
(List<String> repoNames) Sets the repo names of the team.org.json.JSONObject
Converts the GHTeamBuilder instance to a JSONObject.Methods inherited from class io.github.coho04.githubapi.bases.GHBase
fetchArrayData, fetchArrayData, fetchPaginatedData, fetchPaginatedData, fetchPaginatedData, getBaseUrl
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.github.coho04.githubapi.interfaces.HttpRequestInterface
extractNextPageUrl, sendDeleteRequest, sendDeleteRequestWithResponseCode, sendGetRequest, sendGetRequestWithLinkHeader, sendGetRequestWithResponseCode, sendPatchRequest, sendPostRequest, sendPutRequest
Methods inherited from interface io.github.coho04.githubapi.interfaces.JSONHelper
getArrayOrNull, getBooleanOrNull, getIntOrNull, getJSONArrayToStringList, getJSONObjectOrNull, getLocalDateOrNull, getLongOrNull, getStringOrNull
-
Constructor Details
-
GHTeamBuilder
Constructs a new GHTeamBuilder instance with the provided GitHub instance and URL.- Parameters:
github
- the GitHub instanceurl
- the URL
-
-
Method Details
-
toJSONObject
public org.json.JSONObject toJSONObject()Converts the GHTeamBuilder instance to a JSONObject.- Overrides:
toJSONObject
in classGHBase
- Returns:
- the JSONObject
-
setName
Sets the name of the team.- Parameters:
name
- the name of the team- Returns:
- the GHTeamBuilder instance
-
setDescription
Sets the description of the team.- Parameters:
description
- the description of the team- Returns:
- the GHTeamBuilder instance
-
setMaintainers
Sets the maintainers of the team.- Parameters:
maintainers
- the maintainers of the team- Returns:
- the GHTeamBuilder instance
-
setNotificationSetting
Sets the notification setting of the team.- Parameters:
notificationSetting
- the notification setting of the team- Returns:
- the GHTeamBuilder instance
-
setParentTeamId
Sets the parent team id of the team.- Parameters:
parentTeamId
- the parent team id of the team- Returns:
- the GHTeamBuilder instance
-
setPermission
Sets the permission of the team.- Parameters:
permission
- the permission of the team- Returns:
- the GHTeamBuilder instance
-
setPrivacy
Sets the privacy of the team.- Parameters:
privacy
- the privacy of the team- Returns:
- the GHTeamBuilder instance
-
setRepoNames
Sets the repo names of the team.- Parameters:
repoNames
- the repo names of the team- Returns:
- the GHTeamBuilder instance
-
build
Builds the team and returns a new GHTeam instance.- Returns:
- the GHTeam instance
-
getGithub
Returns the GitHub instance.- Returns:
- the GitHub instance
-
getName
Returns the name of the team.- Returns:
- the name of the team
-
getDescription
Returns the description of the team.- Returns:
- the description of the team
-
getPrivacy
Returns the privacy of the team.- Returns:
- the privacy of the team
-
getMaintainers
Returns the maintainers of the team.- Returns:
- the maintainers of the team
-
getRepoNames
Returns the repo names of the team.- Returns:
- the repo names of the team
-
getPermission
Returns the permission of the team.- Returns:
- the permission of the team
-
getUrl
Returns the URL.- Returns:
- the URL
-
getParentTeamId
public int getParentTeamId()Returns the parent team id of the team.- Returns:
- the parent team id of the team
-
getNotificationSetting
Returns the notification setting of the team.- Returns:
- the notification setting of the team
-