Package de.coho04.githubapi
Klasse SelfUser
- Alle implementierten Schnittstellen:
HttpRequestInterface,JSONHelper
This class represents a GitHub user.
It provides methods for fetching data about the user such as their issues, blocked users, and public keys, and for following and unfollowing users.
-
Verschachtelte Klassen - Übersicht
Von Schnittstelle geerbte verschachtelte Klassen/Schnittstellen de.coho04.githubapi.interfaces.JSONHelper
JSONHelper.JSONToObject<T> -
Feldübersicht
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungReturns a new GHPublicKeyBuilder instance associated with the user's GitHub instance.addPublicKey(String title, String key) Returns a new GHPublicKey instance with the provided title and key, associated with the user's GitHub instance.Returns a new GHProjectBuilder instance for creating a project in the organization.createProject(String name, String body) Creates a project in the organization with the provided name and body.voiddeletePublicKey(int id) Deletes the public key with the provided id.voidfollowUser(String username) Follows the user with the provided username.Returns the users blocked by the user.getEmail()Returns the email of the user.Returns the issues of the user.getPublicKey(int id) Returns the public key with the provided id.static SelfUsergetSelfUser(Github github) Returns the GitHub user associated with the provided GitHub instance.Returns a list of repositories created by the user.Returns a list of repositories the user has access to.voidunfollowUser(String username) Unfollows the user with the provided username.Von Klasse geerbte Methoden de.coho04.githubapi.entities.GHUser
findRepositoryByName, getContributions, getFollowers, getFollowersUrl, getFollowing, getFollowingUrl, getGistsUrl, getGravatarId, getOrganizationsUrl, getPublicKeys, getReceivedEventsUrl, getStarredUrl, getSubscriptionsUrl, getUser, isSiteAdmin, listRepositories, toJSONObjectVon Klasse geerbte Methoden de.coho04.githubapi.bases.EntityBase
getAvatarUrl, getLogin, getReposUrl, getType, getUsernameVon Klasse geerbte Methoden de.coho04.githubapi.bases.ClassBase
getEventsUrl, getHtmlUrl, getId, getNodeId, getUrlVon Klasse geerbte Methoden de.coho04.githubapi.bases.GHBase
fetchArrayData, fetchArrayData, fetchPaginatedData, fetchPaginatedData, fetchPaginatedData, getBaseUrlVon Klasse geerbte Methoden java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitVon Schnittstelle geerbte Methoden de.coho04.githubapi.interfaces.HttpRequestInterface
extractNextPageUrl, sendDeleteRequest, sendDeleteRequestWithResponseCode, sendGetRequest, sendGetRequestWithLinkHeader, sendGetRequestWithResponseCode, sendPatchRequest, sendPostRequest, sendPutRequestVon Schnittstelle geerbte Methoden de.coho04.githubapi.interfaces.JSONHelper
getArrayOrNull, getBooleanOrNull, getIntOrNull, getJSONArrayToStringList, getJSONObjectOrNull, getLocalDateOrNull, getLongOrNull, getStringOrNull
-
Konstruktordetails
-
SelfUser
Constructs a new GHUser instance with the provided JSON object.- Parameter:
jsonObject- the JSON object containing the user data
-
-
Methodendetails
-
getSelfUser
Returns the GitHub user associated with the provided GitHub instance.- Parameter:
github- the GitHub instance- Gibt zurück:
- the GitHub user
-
getIssues
Returns the issues of the user.- Gibt zurück:
- the issues of the user
-
getBlockedUsers
Returns the users blocked by the user.- Gibt zurück:
- the users blocked by the user
-
followUser
Follows the user with the provided username.- Parameter:
username- the username of the user to follow
-
unfollowUser
Unfollows the user with the provided username.- Parameter:
username- the username of the user to unfollow
-
addPublicKey
Returns a new GHPublicKeyBuilder instance associated with the user's GitHub instance.- Gibt zurück:
- a new GHPublicKeyBuilder instance
-
addPublicKey
Returns a new GHPublicKey instance with the provided title and key, associated with the user's GitHub instance.- Parameter:
title- the title of the public keykey- the key of the public key- Gibt zurück:
- a new GHPublicKey instance
-
getPublicKey
Returns the public key with the provided id.- Parameter:
id- the id of the public key- Gibt zurück:
- the public key
-
deletePublicKey
public void deletePublicKey(int id) Deletes the public key with the provided id.- Parameter:
id- the id of the public key
-
listCreatedRepositories
Returns a list of repositories created by the user.- Gibt zurück:
- a list of repositories created by the user
-
listRepositoriesWithAccess
Returns a list of repositories the user has access to.- Gibt zurück:
- a list of repositories the user has access to
-
getEmail
Returns the email of the user.- Gibt zurück:
- the email of the user
-
createProject
Returns a new GHProjectBuilder instance for creating a project in the organization.- Gibt zurück:
- a new GHProjectBuilder instance
-
createProject
Creates a project in the organization with the provided name and body.- Parameter:
name- the name of the projectbody- the body of the project- Gibt zurück:
- the created project
-