Example #1
0
 /**
  * Get the state from the API.<br>
  * This will send {@link ResponseCollection} or {@link NetworkErrorEvent} on completion.<br>
  * This request is authenticated.
  *
  * @param context Context
  */
 public static void info(Context context) {
   getInstance(context).addRequest(context, Action.REFRESH, Arguments.empty());
 }
Example #2
0
 /**
  * Add an authenticated action request to the API.
  *
  * @param context Context
  * @param action Action
  * @param arguments Arguments
  */
 private void addRequest(Context context, ActionInterface action, Arguments arguments) {
   requestQueue.add(
       new InfoRequest(action.toString() + arguments.build(), this, this, getToken(context)));
 }
Example #3
0
 /**
  * Send an action to the API.<br>
  * This will send {@link ResponseCollection} or {@link NetworkErrorEvent} on completion.<br>
  * This request is authenticated.
  *
  * @param context Context
  * @param action Action to send
  */
 public static void action(Context context, ActionInterface action) {
   action(context, action, Arguments.empty());
 }