Package zendeskapi.exception

Examples of zendeskapi.exception.ZendeskApiException


   */
  public GroupOrganizationResponse searchForOrganizations(String searchTerm) throws ZendeskApiException {
    try {
      return genericGet("organizations/search.json?external_id=" + searchTerm, GroupOrganizationResponse.class);
    } catch (Exception e) {
      throw new ZendeskApiException("Getting all organizations with search term " + searchTerm + " failed", e);
    }
  }
View Full Code Here


   */
  public IndividualOrganizationResponse getOrganization(long id) throws ZendeskApiException {
    try {
      return genericGet("organizations/" + id + ".json", IndividualOrganizationResponse.class);
    } catch (Exception e) {
      throw new ZendeskApiException("Getting organization with id " + id + " failed", e);
    }
  }
View Full Code Here

  public GroupTopicResponse getTopicsByForum(long forumId) throws ZendeskApiException {
    try {
      return genericGet("forums/" + forumId + "/topics.json", GroupTopicResponse.class);
    } catch (Exception e) {
      throw new ZendeskApiException(e);
    }
  }
View Full Code Here

  public GroupTopicResponse getTopicsByUser(long userId) throws ZendeskApiException {
    try {
      return genericGet("users/" + userId + "/topics.json", GroupTopicResponse.class);
    } catch (Exception e) {
      throw new ZendeskApiException(e);
    }
  }
View Full Code Here

    IndividualTopicResponse individualTopicResponse = new IndividualTopicResponse();
    individualTopicResponse.setTopic(topic);
    try {
      return genericPost("topics.json", individualTopicResponse, IndividualTopicResponse.class);
    } catch (Exception e) {
      throw new ZendeskApiException("Creation of topic " + topic.getTitle() + " failed", e);
    }
  }
View Full Code Here

    IndividualTopicResponse individualTopicResponse = new IndividualTopicResponse();
    individualTopicResponse.setTopic(topic);
    try {
      return genericPut("topics/" + topic.getId() + ".json", individualTopicResponse, IndividualTopicResponse.class);
    } catch (Exception e) {
      throw new ZendeskApiException("Updating topic " + topic.getTitle() + " failed", e);
    }
  }
View Full Code Here

  public boolean deleteTopic(long topicId) throws ZendeskApiException {
    try {
      return genericDelete("topics/" + topicId + ".json");
    } catch (Exception e) {
      throw new ZendeskApiException(e);
    }
  }
View Full Code Here

  public GroupTopicCommentResponse getTopicCommentsByTopicId(long topicId) throws ZendeskApiException {
    try {
      return genericGet("topics/" + topicId + "/comments.json", GroupTopicCommentResponse.class);
    } catch (Exception e) {
      throw new ZendeskApiException(e);
    }
  }
View Full Code Here

  public GroupTopicCommentResponse getTopicCommentsByUserId(long userId) throws ZendeskApiException {
    try {
      return genericGet("users/" + userId + "/topic_comments.json", GroupTopicCommentResponse.class);
    } catch (Exception e) {
      throw new ZendeskApiException(e);
    }
  }
View Full Code Here

  public IndividualTopicCommentResponse getSpecificTopicCommentByTopic(long topicId, long commentId) throws ZendeskApiException {
    try {
      return genericGet("topics/" + topicId + "/comments/" + commentId + ".json", IndividualTopicCommentResponse.class);
    } catch (Exception e) {
      throw new ZendeskApiException(e);
    }
  }
View Full Code Here

TOP

Related Classes of zendeskapi.exception.ZendeskApiException

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.