Package dev.jacrispys.JavaBot.api.libs
Interface AgentApi
- All Known Implementing Classes:
AgentApiImpl
public interface AgentApi
Main class of the API, all instances will be through this class.
-
Method Summary
Modifier and TypeMethodDescriptionObtain a general connection to the API, should not be used.Obtain a connection specific to developers.getGuildAnalytics
(AgentApi api, long guildId) getJdaUser
(long userId) Obtain a connection specific to general usersboolean
-
Method Details
-
getUserConnection
UserConnection getUserConnection()Obtain a connection specific to general users- Returns:
- Connection
-
getDevConnection
DeveloperConnection getDevConnection()Obtain a connection specific to developers.- Returns:
- Connection
-
getConnection
ClientConnection getConnection()Obtain a general connection to the API, should not be used.- Returns:
- general connection
-
isDevAccount
boolean isDevAccount()- Returns:
- true if the token used to validate the connection has dev permissions.
-
getGuildAnalytics
- Parameters:
api
- instance for GuildAnalyticsguildId
- guild to obtain analytics for- Returns:
- an instance of guild analytics for the given guild
-
getJdaUser
- Parameters:
userId
- Takes the id from aUser
- Returns:
- an instance of JdaUser after being converted from an ID
-