Skip to content
This repository was archived by the owner on Aug 28, 2025. It is now read-only.

Commit f9de4ee

Browse files
committed
Merge pull request #5 from upwork/v1.1.0
V1.1.0
2 parents 4ae1706 + 298334e commit f9de4ee

File tree

6 files changed

+29
-6
lines changed

6 files changed

+29
-6
lines changed

CHANGES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Release History
22

3+
## 1.1.0
4+
* Get Categories (V1) is now fully depricated
5+
* Added new Activities API - Assign to specific engagement the list of activities
6+
37
## 1.0.2
48
* bug fixes
59

72 Bytes
Binary file not shown.

lib/java-upwork.jar

72 Bytes
Binary file not shown.

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
<groupId>com.Upwork</groupId>
55
<artifactId>api</artifactId>
6-
<version>1.0.1</version>
6+
<version>1.1.0</version>
77
<packaging>jar</packaging>
88
<name>java-upwork</name>
99
<description>JAVA bindings for Upwork API</description>

src/com/Upwork/api/Routers/Activities/Engagement.java

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
author = "Maksym Novozhylov <[email protected]>",
2929
date = "6/4/2014",
3030
currentRevision = 1,
31-
lastModified = "6/4/2014",
31+
lastModified = "24/09/2015",
3232
lastModifiedBy = "Maksym Novozhylov",
3333
reviewers = {"Yiota Tsakiri"}
3434
)
@@ -43,12 +43,12 @@ public Engagement(OAuthClient client) {
4343
oClient.setEntryPoint(ENTRY_POINT);
4444
}
4545

46-
/**
46+
/**
4747
* List activities for specific engagement
4848
*
4949
* @param engagement_ref Engagement reference
5050
* @throws JSONException If error occurred
51-
* @return {@link JSONObject}
51+
* @return {@link JSONObject}
5252
*/
5353
public JSONObject getSpecific(String engagement_ref) throws JSONException {
5454
return oClient.get("/tasks/v2/tasks/contracts/" + engagement_ref);
@@ -62,10 +62,22 @@ public JSONObject getSpecific(String engagement_ref) throws JSONException {
6262
* @param engagement Engagement
6363
* @param params Parameters
6464
* @throws JSONException If error occurred
65-
* @return {@link JSONObject}
65+
* @return {@link JSONObject}
6666
*/
6767
public JSONObject assign(String company, String team, String engagement, HashMap<String, String> params) throws JSONException {
6868
return oClient.put("/otask/v1/tasks/companies/" + company + "/teams/" + team + "/engagements/" + engagement + "/tasks", params);
6969
}
7070

71+
/**
72+
* Assign engagements to the list of activities
73+
*
74+
* @param engagement_ref Engagement reference
75+
* @param params Parameters
76+
* @throws JSONException If error occurred
77+
* @return {@link JSONObject}
78+
*/
79+
public JSONObject assignToEngagement(String engagement_ref, HashMap<String, String> params) throws JSONException {
80+
return oClient.put("/tasks/v2/tasks/contracts/" + engagement_ref, params);
81+
}
82+
7183
}

test/com/Upwork/api/Routers/Activities/EngagementTest.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,11 @@ public class EngagementTest extends Helper {
3131

3232
assertTrue(json instanceof JSONObject);
3333
}
34-
}
34+
35+
@Test public void assignToEngagement() throws Exception {
36+
Engagement activities = new Engagement(client);
37+
JSONObject json = activities.assignToEngagement("1234", new HashMap<String, String>());
38+
39+
assertTrue(json instanceof JSONObject);
40+
}
41+
}

0 commit comments

Comments
 (0)