Package com.wordnik.client

Examples of com.wordnik.client.ApiException


  //error info- code: 400 reason: "Invalid username supplied" model: <none>
  //error info- code: 404 reason: "User not found" model: <none>
  public User getUserByName (String username) throws ApiException {
    // verify required params are set
    if(username == null ) {
       throw new ApiException(400, "missing required params");
    }
    // create path and map variables
    String path = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username.toString()));

    // query params
View Full Code Here


  }
  //error info- code: 400 reason: "Invalid username and password combination" model: <none>
  public String loginUser (String username, String password) throws ApiException {
    // verify required params are set
    if(username == null || password == null ) {
       throw new ApiException(400, "missing required params");
    }
    // create path and map variables
    String path = "/user/login".replaceAll("\\{format\\}","json");

    // query params
View Full Code Here

    }
  }
  public void createUsersWithArrayInput (List<User> body) throws ApiException {
    // verify required params are set
    if(body == null ) {
       throw new ApiException(400, "missing required params");
    }
    // create path and map variables
    String path = "/user/createWithArray".replaceAll("\\{format\\}","json");

    // query params
View Full Code Here

    }
  }
  public void createUsersWithListInput (List<User> body) throws ApiException {
    // verify required params are set
    if(body == null ) {
       throw new ApiException(400, "missing required params");
    }
    // create path and map variables
    String path = "/user/createWithList".replaceAll("\\{format\\}","json");

    // query params
View Full Code Here

    }
  }
  public void createUser (User body) throws ApiException {
    // verify required params are set
    if(body == null ) {
       throw new ApiException(400, "missing required params");
    }
    // create path and map variables
    String path = "/user".replaceAll("\\{format\\}","json");

    // query params
View Full Code Here

  //error info- code: 400 reason: "Invalid ID supplied" model: <none>
  //error info- code: 404 reason: "Pet not found" model: <none>
  public Pet getPetById (Long petId) throws ApiException {
    // verify required params are set
    if(petId == null ) {
       throw new ApiException(400, "missing required params");
    }
    // create path and map variables
    String path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));

    // query params
View Full Code Here

  }
  //error info- code: 405 reason: "Invalid input" model: <none>
  public void updatePetWithForm (String petId, String name, String status) throws ApiException {
    // verify required params are set
    if(petId == null ) {
       throw new ApiException(400, "missing required params");
    }
    // create path and map variables
    String path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));

    // query params
View Full Code Here

  }
  //error info- code: 400 reason: "Invalid pet value" model: <none>
  public void deletePet (String petId) throws ApiException {
    // verify required params are set
    if(petId == null ) {
       throw new ApiException(400, "missing required params");
    }
    // create path and map variables
    String path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));

    // query params
View Full Code Here

  }
  //error info- code: 400 reason: "Invalid tag value" model: <none>
  public List<Pet> partialUpdate (String petId, Pet body) throws ApiException {
    // verify required params are set
    if(petId == null || body == null ) {
       throw new ApiException(400, "missing required params");
    }
    // create path and map variables
    String path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));

    // query params
View Full Code Here

  }
  //error info- code: 405 reason: "Invalid input" model: <none>
  public void addPet (Pet body) throws ApiException {
    // verify required params are set
    if(body == null ) {
       throw new ApiException(400, "missing required params");
    }
    // create path and map variables
    String path = "/pet".replaceAll("\\{format\\}","json");

    // query params
View Full Code Here

TOP

Related Classes of com.wordnik.client.ApiException

Copyright © 2018 www.massapicom. 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.