line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# Licensed under the Upwork's API Terms of Use; |
2
|
|
|
|
|
|
|
# you may not use this file except in compliance with the Terms. |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
# Unless required by applicable law or agreed to in writing, software |
5
|
|
|
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS, |
6
|
|
|
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
7
|
|
|
|
|
|
|
# See the License for the specific language governing permissions and |
8
|
|
|
|
|
|
|
# limitations under the License. |
9
|
|
|
|
|
|
|
# |
10
|
|
|
|
|
|
|
# Author:: Maksym Novozhylov (mnovozhilov@upwork.com) |
11
|
|
|
|
|
|
|
# Copyright:: Copyright 2015(c) Upwork.com |
12
|
|
|
|
|
|
|
# License:: See LICENSE.txt and TOS - https://developers.upwork.com/api-tos.html |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
package Net::Upwork::API::Routers::Hr::Jobs; |
15
|
|
|
|
|
|
|
|
16
|
2
|
|
|
2
|
|
76224
|
use strict; |
|
2
|
|
|
|
|
14
|
|
|
2
|
|
|
|
|
57
|
|
17
|
2
|
|
|
2
|
|
12
|
use warnings; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
54
|
|
18
|
2
|
|
|
2
|
|
468
|
use parent "Net::Upwork::API"; |
|
2
|
|
|
|
|
303
|
|
|
2
|
|
|
|
|
10
|
|
19
|
|
|
|
|
|
|
|
20
|
2
|
|
|
2
|
|
112
|
use constant ENTRY_POINT => Net::Upwork::API::Client::ENTRY_POINT_API; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
773
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=pod |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=head1 NAME |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
Auth |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head1 FUNCTIONS |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=over 4 |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=item new($api) |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
Create a new object for accessing Auth API |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
B |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
$api |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
API object |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=cut |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
sub new { |
45
|
0
|
|
|
0
|
1
|
|
my ($class, $api) = @_; |
46
|
0
|
|
|
|
|
|
return Net::Upwork::API::init_router($class, $api, ENTRY_POINT); |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=item get_list |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
Get list of jobs |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
B |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
$params |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
Hash of parameters |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
B |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
JSON response as a string |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=cut |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
sub get_list { |
66
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
67
|
0
|
|
|
|
|
|
my %params = @_; |
68
|
|
|
|
|
|
|
|
69
|
0
|
|
|
|
|
|
return $self->client()->get("/hr/v2/jobs", %params); |
70
|
|
|
|
|
|
|
} |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=item get_specific |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
Get specific job |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
B |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
$key |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
Job key |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
B |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
JSON response as a string |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=cut |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
sub get_specific { |
89
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
90
|
0
|
|
|
|
|
|
my $key = shift; |
91
|
|
|
|
|
|
|
|
92
|
0
|
|
|
|
|
|
return $self->client()->get("/hr/v2/jobs/" . $key); |
93
|
|
|
|
|
|
|
} |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=item post_job |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
Post a new job |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
B |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
$params |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
Hash of parameters |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
B |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
JSON response as a string |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
=cut |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
sub post_job { |
112
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
113
|
0
|
|
|
|
|
|
my %params = @_; |
114
|
|
|
|
|
|
|
|
115
|
0
|
|
|
|
|
|
return $self->client()->post("/hr/v2/jobs", %params); |
116
|
|
|
|
|
|
|
} |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
=item edit_job |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
Edit existent job |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
B |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
$key |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
Job key |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
$params |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
Hash of parameters |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
B |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
JSON response as a string |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
=cut |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
sub edit_job { |
139
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
140
|
0
|
|
|
|
|
|
my $key = shift; |
141
|
0
|
|
|
|
|
|
my %params = @_; |
142
|
|
|
|
|
|
|
|
143
|
0
|
|
|
|
|
|
return $self->client()->put("/hr/v2/jobs/" . $key, %params); |
144
|
|
|
|
|
|
|
} |
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
=item delete_job |
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
Delete existent job |
149
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
B |
151
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
$key |
153
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
Job key |
155
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
$params |
157
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
Hash of parameters |
159
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
B |
161
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
JSON response as a string |
163
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
=cut |
165
|
|
|
|
|
|
|
|
166
|
|
|
|
|
|
|
sub delete_job { |
167
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
168
|
0
|
|
|
|
|
|
my $key = shift; |
169
|
0
|
|
|
|
|
|
my %params = @_; |
170
|
|
|
|
|
|
|
|
171
|
0
|
|
|
|
|
|
return $self->client()->delete("/hr/v2/jobs/" . $key, %params); |
172
|
|
|
|
|
|
|
} |
173
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
=back |
175
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
=head1 AUTHOR |
177
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
Maksym Novozhylov C<< >> |
179
|
|
|
|
|
|
|
|
180
|
|
|
|
|
|
|
=head1 COPYRIGHT |
181
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
Copyright E Upwork Global Corp., 2015 |
183
|
|
|
|
|
|
|
|
184
|
|
|
|
|
|
|
=cut |
185
|
|
|
|
|
|
|
|
186
|
|
|
|
|
|
|
1; |