Skip to content

Commit

Permalink
Merge pull request #28 from upwork/v1.3.2
Browse files Browse the repository at this point in the history
v1.3.2
  • Loading branch information
mnovozhylov committed Oct 21, 2019
2 parents f4c11d8 + 9ac7f70 commit 322e59c
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 1 deletion.
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.3.2
* Add Specialties API
* Add Skills V2 API

## 1.3.1
* Fixed non-working getByContract from Workdays API

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "upwork/php-upwork",
"description": "PHP bindings for Upwork API",
"version": "v1.3.0",
"version": "v1.3.2",
"type": "library",
"keywords": ["upwork", "php", "api"],
"homepage": "http://www.upwork.com",
Expand Down
30 changes: 30 additions & 0 deletions src/Upwork/API/Routers/Metadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,36 @@ public function getSkills()
return $response;
}

/**
* Get Skills V2
*
* @return object
*/
public function getSkillsV2()
{
ApiDebug::p(__FUNCTION__);

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

return $response;
}

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

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

return $response;
}

/**
* Get regions
*
Expand Down
22 changes: 22 additions & 0 deletions tests/Upwork/API/Routers/MetadataTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,28 @@ public function testGetSkills()
$this->_checkResponse($response);
}

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

$this->_checkResponse($response);
}

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

$this->_checkResponse($response);
}

/**
* @test
*/
Expand Down

0 comments on commit 322e59c

Please sign in to comment.