Skip to content

Commit

Permalink
Merge pull request #4 from upwork/v1.1.0
Browse files Browse the repository at this point in the history
V1.1.0
  • Loading branch information
mnovozhylov committed Oct 12, 2015
2 parents 03f18f3 + ea9bbd9 commit 333592e
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 28 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release History

## 1.1.0
* Get Categories (V1) is now fully depricated
* Added new Activities API - Assign to specific engagement the list of activities

## 1.0.1
* Added new Workdays API - Get Workdays by Comppany
* Added new Workdays API - Get Workdays by Contract
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "upwork/php-upwork",
"description": "PHP bindings for Upwork API",
"version": "v1.0.1",
"version": "v1.1.0",
"type": "library",
"keywords": ["upwork", "php", "api"],
"homepage": "http://www.upwork.com",
"time": "2015-07-16",
"time": "2015-10-12",
"license": "Apache-2.0",
"authors": [
{
Expand Down
Binary file modified docs/docs.zip
Binary file not shown.
17 changes: 17 additions & 0 deletions src/Upwork/API/Routers/Activities/Engagement.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,21 @@ public function assign($company, $team, $engagement, $params)

return $response;
}

/**
* Assign to specific engagement the list of activities
*
* @param integer $engagement Engagement
* @param array $params Parameters
* @return object
*/
public function assignToEngagement($engagement, $params)
{
ApiDebug::p(__FUNCTION__);

$response = $this->_client->put('/tasks/v2/tasks/contracts/' . $engagement, $params);
ApiDebug::p('found response info', $response);

return $response;
}
}
15 changes: 0 additions & 15 deletions src/Upwork/API/Routers/Metadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,21 +42,6 @@ public function __construct(ApiClient $client)
parent::$_epoint = self::ENTRY_POINT;
}

/**
* Get Categories
*
* @return object
*/
public function getCategories()
{
ApiDebug::p(__FUNCTION__);

$response = $this->_client->get('/profiles/v1/metadata/categories');
ApiDebug::p('found response info', $response);

return $response;
}

/**
* Get Categories (v2)
*
Expand Down
11 changes: 11 additions & 0 deletions tests/Upwork/API/Routers/Activities/EngagementTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,15 @@ public function testAssign()

$this->_checkResponse($response);
}

/**
* @test
*/
public function testAssignToEngagement()
{
$router = new \Upwork\API\Routers\Activities\Engagement($this->_client);
$response = $router->assignToEngagement('1234', array());

$this->_checkResponse($response);
}
}
11 changes: 0 additions & 11 deletions tests/Upwork/API/Routers/MetadataTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,6 @@ public function setUp()
parent::setUp();
}

/**
* @test
*/
public function testGetCategories()
{
$router = new \Upwork\API\Routers\Metadata($this->_client);
$response = $router->getCategories();

$this->_checkResponse($response);
}

/**
* @test
*/
Expand Down

0 comments on commit 333592e

Please sign in to comment.