Class GHTeam
java.lang.Object
io.github.coho04.githubapi.bases.GHBase
io.github.coho04.githubapi.bases.ClassBase
io.github.coho04.githubapi.entities.GHTeam
- All Implemented Interfaces:
HttpRequestInterface
,JSONHelper
This class represents a GitHub Team.
It provides methods for fetching data about the team such as its name, slug, description, privacy, notification setting, permission, members URL, repositories URL, creation date, update date, members count, repos count, and parent team.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.github.coho04.githubapi.interfaces.JSONHelper
JSONHelper.JSONToObject<T>
-
Constructor Summary
ConstructorsConstructorDescriptionGHTeam
(org.json.JSONObject jsonObject) Constructs a new GHTeam instance with the provided JSON object. -
Method Summary
Modifier and TypeMethodDescriptionReturns the members count of the team.Returns the description of the team.int
Returns the members count of the team.Returns the members URL of the team.getName()
Returns the name of the team.Returns the notification setting of the team.Returns the parent team of the team.Returns the permission of the team.Returns the privacy of the team.int
Returns the repos count of the team.Returns the repositories URL of the team.getSlug()
Returns the slug of the team.static GHTeam
getTeamByName
(Github github, String name, GHOrganisation organisation) Returns a GHTeam instance by team name.Returns the repos count of the team.org.json.JSONObject
Converts this ClassBase object to a JSONObject.Methods inherited from class io.github.coho04.githubapi.bases.ClassBase
getEventsUrl, getHtmlUrl, getId, getNodeId, getUrl
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
-
GHTeam
public GHTeam(org.json.JSONObject jsonObject) Constructs a new GHTeam instance with the provided JSON object.- Parameters:
jsonObject
- the JSON object containing the team data
-
-
Method Details
-
toJSONObject
public org.json.JSONObject toJSONObject()Description copied from class:ClassBase
Converts this ClassBase object to a JSONObject.- Overrides:
toJSONObject
in classClassBase
- Returns:
- a JSONObject representation of this ClassBase object.
-
getTeamByName
Returns a GHTeam instance by team name.- Parameters:
github
- the GitHub instancename
- the team nameorganisation
- the GHOrganisation instance- Returns:
- the GHTeam instance
-
getDescription
Returns the description of the team.- Returns:
- the description of the team
-
getMembersUrl
Returns the members URL of the team.- Returns:
- the members URL of the team
-
getName
Returns the name of the team.- Returns:
- the name of the team
-
getNotificationSetting
Returns the notification setting of the team.- Returns:
- the notification setting of the team
-
getParent
Returns the parent team of the team.- Returns:
- the parent team of the team
-
getPermission
Returns the permission of the team.- Returns:
- the permission of the team
-
getPrivacy
Returns the privacy of the team.- Returns:
- the privacy of the team
-
getRepositoriesUrl
Returns the repositories URL of the team.- Returns:
- the repositories URL of the team
-
getSlug
Returns the slug of the team.- Returns:
- the slug of the team
-
getCreatedAt
Returns the members count of the team.- Returns:
- the members count of the team
-
getUpdatedAt
Returns the repos count of the team.- Returns:
- the repos count of the team
-
getMembersCount
public int getMembersCount()Returns the members count of the team.- Returns:
- the members count of the team
-
getReposCount
public int getReposCount()Returns the repos count of the team.- Returns:
- the repos count of the team
-