Package zendeskapi.models.topics

Examples of zendeskapi.models.topics.IndividualTopicResponse


      throw new ZendeskApiException(e);
    }
  }

  public IndividualTopicResponse createTopic(Topic topic) throws ZendeskApiException {
    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


      throw new ZendeskApiException("Creation of topic " + topic.getTitle() + " failed", e);
    }
  }

  public IndividualTopicResponse updateTopic(Topic topic) throws ZendeskApiException {
    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

  @Test(enabled = false)
  public void testGetTopics() throws Exception {
    GroupTopicResponse gtr = API.getTopics().getTopics();
    Assert.assertTrue(gtr.getCount().intValue() > 0);

    IndividualTopicResponse itr = API.getTopics().getTopicById(gtr.getTopics().get(0).getId());
    Assert.assertEquals(itr.getTopic().getId(), gtr.getTopics().get(0).getId());

    GroupTopicResponse tbf = API.getTopics().getTopicsByForum(gtr.getTopics().get(0).getForumId());
    Assert.assertEquals(tbf.getTopics().get(0).getForumId(), gtr.getTopics().get(0).getForumId());

    GroupTopicResponse tbu = API.getTopics().getTopicsByUser(USER_ID);
View Full Code Here

TOP

Related Classes of zendeskapi.models.topics.IndividualTopicResponse

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.