1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace seregazhuk\HeadHunterApi\EndPoints; |
4
|
|
|
|
5
|
|
|
use seregazhuk\HeadHunterApi\Traits\HasView; |
6
|
|
|
use seregazhuk\HeadHunterApi\Traits\HasSimilarVacancies; |
7
|
|
|
|
8
|
|
|
class Resumes extends Endpoint |
9
|
|
|
{ |
10
|
|
|
const RESOURCE = 'resumes'; |
11
|
|
|
|
12
|
|
|
use HasView, HasSimilarVacancies; |
13
|
|
|
|
14
|
|
|
public function mine() |
15
|
|
|
{ |
16
|
|
|
return $this->getResource('mine'); |
17
|
|
|
} |
18
|
|
|
|
19
|
|
|
/** |
20
|
|
|
* @param string $id |
21
|
|
|
* @return array |
22
|
|
|
*/ |
23
|
|
|
public function views($id) |
24
|
|
|
{ |
25
|
|
|
return $this->getResource($id . '/views'); |
26
|
|
|
} |
27
|
|
|
|
28
|
|
|
/** |
29
|
|
|
* Updates resume publish date |
30
|
|
|
* |
31
|
|
|
* @param string $id |
32
|
|
|
* @return array |
33
|
|
|
*/ |
34
|
|
|
public function publish($id) |
35
|
|
|
{ |
36
|
|
|
return $this->postResource($id . '/publish'); |
37
|
|
|
} |
38
|
|
|
|
39
|
|
|
/** |
40
|
|
|
* @param string $id |
41
|
|
|
* @return array |
42
|
|
|
*/ |
43
|
|
|
public function conditions($id) |
44
|
|
|
{ |
45
|
|
|
return $this->getResource($id . '/conditions'); |
46
|
|
|
} |
47
|
|
|
|
48
|
|
|
/** |
49
|
|
|
* @param string $id |
50
|
|
|
*/ |
51
|
|
|
public function delete($id) |
52
|
|
|
{ |
53
|
|
|
$this->deleteResource($id); |
54
|
|
|
} |
55
|
|
|
|
56
|
|
|
/** |
57
|
|
|
* @param $id |
58
|
|
|
* @param $attributes |
59
|
|
|
* @return mixed |
60
|
|
|
*/ |
61
|
|
|
public function edit($id, $attributes) |
62
|
|
|
{ |
63
|
|
|
return $this->putResourceJson($id, $attributes); |
|
|
|
|
64
|
|
|
} |
65
|
|
|
|
66
|
|
|
/** |
67
|
|
|
* @param $attributes |
68
|
|
|
* @return mixed |
69
|
|
|
*/ |
70
|
|
|
public function create($attributes) |
71
|
|
|
{ |
72
|
|
|
return $this->postResourceJson('', $attributes); |
73
|
|
|
} |
74
|
|
|
|
75
|
|
|
/** |
76
|
|
|
* @param string $id |
77
|
|
|
* @return array |
78
|
|
|
*/ |
79
|
|
|
public function status($id) |
80
|
|
|
{ |
81
|
|
|
return $this->getResource($id . '/status'); |
82
|
|
|
} |
83
|
|
|
|
84
|
|
|
/** |
85
|
|
|
* @param string $id |
86
|
|
|
* @return mixed |
87
|
|
|
*/ |
88
|
|
|
public function jobs($id) |
89
|
|
|
{ |
90
|
|
|
return $this->getSimilarVacanciesFor($id); |
91
|
|
|
} |
92
|
|
|
|
93
|
|
|
public function negotiations($id) |
94
|
|
|
{ |
95
|
|
|
return $this->getResource($id . '/negotiations_history'); |
96
|
|
|
} |
97
|
|
|
} |
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.