public interface JDAClient
Modifier and Type | Method and Description |
---|---|
ApplicationAction |
createApplication(java.lang.String name)
Creates a new
Application for this user account
with the given name. |
RestAction<Application> |
getApplicationById(java.lang.String id)
Retrieves a specific
Application owned by this user account. |
RestAction<java.util.List<Application>> |
getApplications()
Retrieves all
Applications owned by this user account. |
RestAction<AuthorizedApplication> |
getAuthorizedApplicationById(java.lang.String id)
Retrieves a specific
AuthorizedApplication authorized by this user account. |
RestAction<java.util.List<AuthorizedApplication>> |
getAuthorizedApplications()
Retrieves all
AuthorizedApplications authorized by this user account. |
Friend |
getFriend(Member member) |
Friend |
getFriend(User user) |
Friend |
getFriendById(java.lang.String id) |
java.util.List<Friend> |
getFriends() |
java.util.List<Friend> |
getFriendsByName(java.lang.String name,
boolean ignoreCase) |
Group |
getGroupById(java.lang.String id) |
java.util.List<Group> |
getGroups() |
java.util.List<Group> |
getGroupsByName(java.lang.String name,
boolean ignoreCase) |
JDA |
getJDA() |
Relationship |
getRelationship(Member member) |
Relationship |
getRelationship(User user) |
Relationship |
getRelationshipById(java.lang.String id) |
Relationship |
getRelationshipById(java.lang.String id,
RelationshipType type) |
java.util.List<Relationship> |
getRelationships() |
java.util.List<Relationship> |
getRelationships(RelationshipType type) |
java.util.List<Relationship> |
getRelationships(RelationshipType type,
java.lang.String name,
boolean ignoreCase) |
java.util.List<Relationship> |
getRelationshipsByName(java.lang.String name,
boolean ignoreCase) |
UserSettings |
getSettings() |
JDA getJDA()
java.util.List<Group> getGroups()
java.util.List<Group> getGroupsByName(java.lang.String name, boolean ignoreCase)
Group getGroupById(java.lang.String id)
java.util.List<Relationship> getRelationships()
java.util.List<Relationship> getRelationships(RelationshipType type)
java.util.List<Relationship> getRelationships(RelationshipType type, java.lang.String name, boolean ignoreCase)
java.util.List<Relationship> getRelationshipsByName(java.lang.String name, boolean ignoreCase)
Relationship getRelationship(User user)
Relationship getRelationship(Member member)
Relationship getRelationshipById(java.lang.String id)
Relationship getRelationshipById(java.lang.String id, RelationshipType type)
java.util.List<Friend> getFriends()
java.util.List<Friend> getFriendsByName(java.lang.String name, boolean ignoreCase)
Friend getFriendById(java.lang.String id)
UserSettings getSettings()
ApplicationAction createApplication(java.lang.String name)
Application
for this user account
with the given name.
A name must not be null
nor less than 2 characters or more than 32 characters long!
Possible ErrorResponses
caused by
the returned RestAction
include the following:
MAX_OAUTH_APPS
name
- The name for new Application
ApplicationAction
java.lang.IllegalArgumentException
- If the provided name is null
, less than 2 or more than 32 characters longRestAction<java.util.List<Application>> getApplications()
Applications
owned by this user account.RestAction
- Type:
List
<Application
>
RestAction<Application> getApplicationById(java.lang.String id)
Application
owned by this user account.
Possible ErrorResponses
:
UNKNOWN_APPLICATION
id
- The id for the Application
RestAction
- Type: Application
java.lang.IllegalArgumentException
- If the provided id is null
or emptyRestAction<java.util.List<AuthorizedApplication>> getAuthorizedApplications()
AuthorizedApplications
authorized by this user account.RestAction
- Type:
List<AuthorizedApplication
>
RestAction<AuthorizedApplication> getAuthorizedApplicationById(java.lang.String id)
AuthorizedApplication
authorized by this user account.
Possible ErrorResponses
:
UNKNOWN_TOKEN
id
- The id of the AuthorizedApplication
RestAction
- Type:
AuthorizedApplication
java.lang.IllegalArgumentException
- If the provided id is null
or empty