Examples of ParseGetCommand


Examples of org.parse4j.command.ParseGetCommand

   
  }
 
  public static ParseUser login(String username, String password) throws ParseException {
   
    ParseGetCommand command = new ParseGetCommand("login");
    command.addJson(false);
    command.put("username", username);
      command.put("password", password);
    ParseResponse response = command.perform();
    if(!response.isFailed()) {
      JSONObject jsonResponse = response.getJsonObject();
      if (jsonResponse == null) {
        LOGGER.error("Empty response.");
        throw response.getException();
View Full Code Here

Examples of org.parse4j.command.ParseGetCommand

    }
    else {
      endPoint = getClassName();
    }

    ParseGetCommand command = new ParseGetCommand(endPoint);
    query.remove("className");
    command.setData(query);
    ParseResponse response = command.perform();
    List<T> results = null;
    if(!response.isFailed()) {
      if(response.getJsonObject() == null) {
        LOGGER.debug("Empty response.");
        throw response.getException();
View Full Code Here

Examples of org.parse4j.command.ParseGetCommand

    }
    else {
      endPoint = getClassName();
    }

    ParseGetCommand command = new ParseGetCommand(endPoint);
    JSONObject query = toREST();
    query.put("count", 1);
    query.put("limit", 0);
    query.remove("className");
    command.setData(query);
    ParseResponse response = command.perform();
    if(!response.isFailed()) {
      if(response.getJsonObject() == null) {
        LOGGER.debug("Empty response.");
        throw response.getException();
      }
View Full Code Here

Examples of org.parse4j.command.ParseGetCommand

    }
  }
 
  public <T extends ParseObject> T fetchIfNeeded() throws ParseException {
 
    ParseGetCommand command = new ParseGetCommand(getEndPoint(), getObjectId());
    //JSONObject query = new JSONObject();
    //query.put("objectId", getObjectId());
    //command.setData(query);
    ParseResponse response = command.perform();
    if(!response.isFailed()) {
      JSONObject jsonResponse = response.getJsonObject();
      if (jsonResponse == null) {
        throw response.getException();
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.