Skip to content

Commit 322e59c

Browse files
authored
Merge pull request #28 from upwork/v1.3.2
v1.3.2
2 parents f4c11d8 + 9ac7f70 commit 322e59c

File tree

4 files changed

+57
-1
lines changed

4 files changed

+57
-1
lines changed

CHANGES.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Release History
22

3+
## 1.3.2
4+
* Add Specialties API
5+
* Add Skills V2 API
6+
37
## 1.3.1
48
* Fixed non-working getByContract from Workdays API
59

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "upwork/php-upwork",
33
"description": "PHP bindings for Upwork API",
4-
"version": "v1.3.0",
4+
"version": "v1.3.2",
55
"type": "library",
66
"keywords": ["upwork", "php", "api"],
77
"homepage": "http://www.upwork.com",

src/Upwork/API/Routers/Metadata.php

+30
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,36 @@ public function getSkills()
7272
return $response;
7373
}
7474

75+
/**
76+
* Get Skills V2
77+
*
78+
* @return object
79+
*/
80+
public function getSkillsV2()
81+
{
82+
ApiDebug::p(__FUNCTION__);
83+
84+
$response = $this->_client->get('/profiles/v2/metadata/skills');
85+
ApiDebug::p('found response info', $response);
86+
87+
return $response;
88+
}
89+
90+
/**
91+
* Get Specialties
92+
*
93+
* @return object
94+
*/
95+
public function getSpecialties()
96+
{
97+
ApiDebug::p(__FUNCTION__);
98+
99+
$response = $this->_client->get('/profiles/v1/metadata/specialties');
100+
ApiDebug::p('found response info', $response);
101+
102+
return $response;
103+
}
104+
75105
/**
76106
* Get regions
77107
*

tests/Upwork/API/Routers/MetadataTest.php

+22
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,28 @@ public function testGetSkills()
3535
$this->_checkResponse($response);
3636
}
3737

38+
/**
39+
* @test
40+
*/
41+
public function testGetSkillsV2()
42+
{
43+
$router = new \Upwork\API\Routers\Metadata($this->_client);
44+
$response = $router->getSkillsV2();
45+
46+
$this->_checkResponse($response);
47+
}
48+
49+
/**
50+
* @test
51+
*/
52+
public function testGetSpecialties()
53+
{
54+
$router = new \Upwork\API\Routers\Metadata($this->_client);
55+
$response = $router->getSpecialties();
56+
57+
$this->_checkResponse($response);
58+
}
59+
3860
/**
3961
* @test
4062
*/

0 commit comments

Comments
 (0)