Class Bearer


  • public class Bearer
    extends java.lang.Object
    A class for manipulating Bearer/User endpoints. For bots, see the Bot class.
    • Field Detail

      • baseUrl

        public static java.lang.String baseUrl
      • gson

        public final com.google.gson.Gson gson
    • Constructor Detail

      • Bearer

        public Bearer​(BearerToken token)
        Basic constructor. Subsequent actions may fail if token has expired
        Parameters:
        token - Token to use
      • Bearer

        public Bearer​(BearerToken token,
                      Application application)
        Recommended constructor. Will renew token using the provided application if necessary.
        Parameters:
        token - Token to use
        application - Application to renew token with. Must have the same credentials as the application that generated the access/refresh tokens in the first place.