Skip to content

Commit 333592e

Browse files
committed
Merge pull request #4 from upwork/v1.1.0
V1.1.0
2 parents 03f18f3 + ea9bbd9 commit 333592e

File tree

7 files changed

+34
-28
lines changed

7 files changed

+34
-28
lines changed

CHANGES.md

+4
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.1
48
* Added new Workdays API - Get Workdays by Comppany
59
* Added new Workdays API - Get Workdays by Contract

composer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"name": "upwork/php-upwork",
33
"description": "PHP bindings for Upwork API",
4-
"version": "v1.0.1",
4+
"version": "v1.1.0",
55
"type": "library",
66
"keywords": ["upwork", "php", "api"],
77
"homepage": "http://www.upwork.com",
8-
"time": "2015-07-16",
8+
"time": "2015-10-12",
99
"license": "Apache-2.0",
1010
"authors": [
1111
{

docs/docs.zip

5.09 KB
Binary file not shown.

src/Upwork/API/Routers/Activities/Engagement.php

+17
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,21 @@ public function assign($company, $team, $engagement, $params)
7676

7777
return $response;
7878
}
79+
80+
/**
81+
* Assign to specific engagement the list of activities
82+
*
83+
* @param integer $engagement Engagement
84+
* @param array $params Parameters
85+
* @return object
86+
*/
87+
public function assignToEngagement($engagement, $params)
88+
{
89+
ApiDebug::p(__FUNCTION__);
90+
91+
$response = $this->_client->put('/tasks/v2/tasks/contracts/' . $engagement, $params);
92+
ApiDebug::p('found response info', $response);
93+
94+
return $response;
95+
}
7996
}

src/Upwork/API/Routers/Metadata.php

-15
Original file line numberDiff line numberDiff line change
@@ -42,21 +42,6 @@ public function __construct(ApiClient $client)
4242
parent::$_epoint = self::ENTRY_POINT;
4343
}
4444

45-
/**
46-
* Get Categories
47-
*
48-
* @return object
49-
*/
50-
public function getCategories()
51-
{
52-
ApiDebug::p(__FUNCTION__);
53-
54-
$response = $this->_client->get('/profiles/v1/metadata/categories');
55-
ApiDebug::p('found response info', $response);
56-
57-
return $response;
58-
}
59-
6045
/**
6146
* Get Categories (v2)
6247
*

tests/Upwork/API/Routers/Activities/EngagementTest.php

+11
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,15 @@ public function testAssign()
3636

3737
$this->_checkResponse($response);
3838
}
39+
40+
/**
41+
* @test
42+
*/
43+
public function testAssignToEngagement()
44+
{
45+
$router = new \Upwork\API\Routers\Activities\Engagement($this->_client);
46+
$response = $router->assignToEngagement('1234', array());
47+
48+
$this->_checkResponse($response);
49+
}
3950
}

tests/Upwork/API/Routers/MetadataTest.php

-11
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,6 @@ public function setUp()
1313
parent::setUp();
1414
}
1515

16-
/**
17-
* @test
18-
*/
19-
public function testGetCategories()
20-
{
21-
$router = new \Upwork\API\Routers\Metadata($this->_client);
22-
$response = $router->getCategories();
23-
24-
$this->_checkResponse($response);
25-
}
26-
2716
/**
2817
* @test
2918
*/

0 commit comments

Comments
 (0)