Skip to content
This repository was archived by the owner on May 14, 2020. It is now read-only.

Commit afb9931

Browse files
committed
Added support for updating the body text of a thread
1 parent ef2d11c commit afb9931

File tree

4 files changed

+25
-5
lines changed

4 files changed

+25
-5
lines changed

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
#### 1.3.12 (March 4, 2014)
1+
#### 1.3.13 (April 25, 2014)
2+
3+
* Added support for updating the body text of a thread. See [developer docs](http://developer.helpscout.net/) for more information.
24

3-
* Added support for conversation and customer search endpoints. See [developer docs](http://developer.helpscout.net/) for more information.
45

56
#### 1.3.11 (February 4, 2014)
67

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Help Scout Java Wrapper
22
=======================
33
Java Wrapper for the Help Scout API. More information on our developer site: [http://developer.helpscout.net](http://developer.helpscout.net).
44

5-
Version 1.3.12 Released
5+
Version 1.3.13 Released
66
---------------------
77
Please see the [Changelog](https://github.com/helpscout/helpscout-api-java/blob/master/CHANGELOG.md) for details.
88

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<groupId>net.helpscout</groupId>
55
<artifactId>helpscout-api</artifactId>
66
<packaging>jar</packaging>
7-
<version>1.3.12</version>
7+
<version>1.3.13</version>
88
<name>helpscout-api</name>
99
<url>http://maven.apache.org</url>
1010

src/main/java/net/helpscout/api/ApiClient.java

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
public class ApiClient {
2424

25-
private final static String BASE_URL = "https://api.helpscout.net/v1/";
25+
private final static String BASE_URL = "https://api.helpscout.net/v1/";
2626
private final static String METHOD_GET = "GET";
2727
private final static String METHOD_POST = "POST";
2828
private final static String METHOD_PUT = "PUT";
@@ -719,6 +719,25 @@ public void createConversationThread(Long conversationId, ConversationThread thr
719719
}
720720
}
721721

722+
/**
723+
* Update the body text of the specified thread.
724+
*
725+
* @param conversationId
726+
* @param threadId
727+
* @param text
728+
* @return
729+
* @throws ApiException
730+
*/
731+
public void updateConversationThreadText(Long conversationId, Long threadId, String text) throws ApiException {
732+
Map<String,String> threadBody = new HashMap<String, String>();
733+
threadBody.put("body", text);
734+
735+
GsonBuilder builder = new GsonBuilder();
736+
String json = builder.create().toJson(threadBody);
737+
738+
doPut("conversations/" + conversationId + "/threads/" + threadId + ".json", json, HTTP_STATUS_OK);
739+
}
740+
722741
/**
723742
* Deletes the specified conversation.
724743
*

0 commit comments

Comments
 (0)