Package io.github.coho04.githubapi.bases
Class EntityBase
java.lang.Object
io.github.coho04.githubapi.bases.GHBase
io.github.coho04.githubapi.bases.ClassBase
io.github.coho04.githubapi.bases.EntityBase
- All Implemented Interfaces:
HttpRequestInterface,JSONHelper
- Direct Known Subclasses:
GHOrganisation,GHUser
EntityBase is a class that extends ClassBase. It represents a base entity for GitHub objects.
It contains several properties such as type, login, reposUrl, and avatarUrl.
These properties are initialized through a JSONObject.
- Since:
- 2024-1.2
- Version:
- 1.0
- Author:
- Coho04
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.github.coho04.githubapi.interfaces.JSONHelper
JSONHelper.JSONToObject<T> -
Constructor Summary
ConstructorsConstructorDescriptionEntityBase(org.json.JSONObject jsonObject) Constructs a new EntityBase object. -
Method Summary
Modifier and TypeMethodDescriptionReturns the avatarUrl of this EntityBase object.getLogin()Returns the login of this EntityBase object.Returns the reposUrl of this EntityBase object.getType()Returns the type of this EntityBase object.Returns the login of this EntityBase object.org.json.JSONObjectConverts this EntityBase object to a JSONObject.Methods inherited from class io.github.coho04.githubapi.bases.ClassBase
getEventsUrl, getHtmlUrl, getId, getNodeId, getUrlMethods inherited from class io.github.coho04.githubapi.bases.GHBase
fetchArrayData, fetchArrayData, fetchPaginatedData, fetchPaginatedData, fetchPaginatedData, getBaseUrlMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.github.coho04.githubapi.interfaces.HttpRequestInterface
extractNextPageUrl, sendDeleteRequest, sendDeleteRequestWithResponseCode, sendGetRequest, sendGetRequestWithLinkHeader, sendGetRequestWithResponseCode, sendPatchRequest, sendPostRequest, sendPutRequestMethods inherited from interface io.github.coho04.githubapi.interfaces.JSONHelper
getArrayOrNull, getBooleanOrNull, getIntOrNull, getJSONArrayToStringList, getJSONObjectOrNull, getLocalDateOrNull, getLongOrNull, getStringOrNull
-
Constructor Details
-
EntityBase
public EntityBase(org.json.JSONObject jsonObject) Constructs a new EntityBase object.- Parameters:
jsonObject- a JSONObject containing the data for initializing the EntityBase object.
-
-
Method Details
-
toJSONObject
public org.json.JSONObject toJSONObject()Converts this EntityBase object to a JSONObject.- Overrides:
toJSONObjectin classClassBase- Returns:
- a JSONObject representation of this EntityBase object.
-
getReposUrl
Returns the reposUrl of this EntityBase object.- Returns:
- the reposUrl of this EntityBase object.
-
getLogin
Returns the login of this EntityBase object.- Returns:
- the login of this EntityBase object.
-
getUsername
Returns the login of this EntityBase object.- Returns:
- the login of this EntityBase object.
-
getAvatarUrl
Returns the avatarUrl of this EntityBase object.- Returns:
- the avatarUrl of this EntityBase object.
-
getType
Returns the type of this EntityBase object.- Returns:
- the type of this EntityBase object.
-