Class AgentApiImpl

java.lang.Object
dev.jacrispys.JavaBot.api.libs.AgentApiImpl
All Implemented Interfaces:
AgentApi

public class AgentApiImpl extends Object implements AgentApi
Implementation of all methods from AgentApi
  • Constructor Details

  • Method Details

    • getUserConnection

      public UserConnection getUserConnection() throws NullPointerException
      Description copied from interface: AgentApi
      Obtain a connection specific to general users
      Specified by:
      getUserConnection in interface AgentApi
      Returns:
      Connection
      Throws:
      NullPointerException
    • getDevConnection

      public DeveloperConnection getDevConnection()
      Description copied from interface: AgentApi
      Obtain a connection specific to developers.
      Specified by:
      getDevConnection in interface AgentApi
      Returns:
      Connection
    • getConnection

      public ClientConnection getConnection()
      Description copied from interface: AgentApi
      Obtain a general connection to the API, should not be used.
      Specified by:
      getConnection in interface AgentApi
      Returns:
      general connection
    • isDevAccount

      public boolean isDevAccount()
      Specified by:
      isDevAccount in interface AgentApi
      Returns:
      true if the token used to validate the connection has dev permissions.
    • getGuildAnalytics

      public GuildAnalytics getGuildAnalytics(AgentApi api, long guildId)
      Specified by:
      getGuildAnalytics in interface AgentApi
      Parameters:
      api - instance for GuildAnalytics
      guildId - guild to obtain analytics for
      Returns:
      an instance of guild analytics for the given guild
    • getJdaUser

      public JdaUser getJdaUser(long userId)
      Specified by:
      getJdaUser in interface AgentApi
      Parameters:
      userId - Takes the id from a User
      Returns:
      an instance of JdaUser after being converted from an ID