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::Organization::Companies; |
15
|
|
|
|
|
|
|
|
16
|
2
|
|
|
2
|
|
72394
|
use strict; |
|
2
|
|
|
|
|
14
|
|
|
2
|
|
|
|
|
67
|
|
17
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
58
|
|
18
|
2
|
|
|
2
|
|
449
|
use parent "Net::Upwork::API"; |
|
2
|
|
|
|
|
330
|
|
|
2
|
|
|
|
|
10
|
|
19
|
|
|
|
|
|
|
|
20
|
2
|
|
|
2
|
|
130
|
use constant ENTRY_POINT => Net::Upwork::API::Client::ENTRY_POINT_API; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
566
|
|
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 Companies Info |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
B |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
JSON response as a string |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=cut |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
sub get_list { |
60
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
61
|
|
|
|
|
|
|
|
62
|
0
|
|
|
|
|
|
return $self->client()->get("/hr/v2/companies"); |
63
|
|
|
|
|
|
|
} |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=item get_specific |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
Get Specific Company |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
B |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
$company_ref |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
Company reference |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
B |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
JSON response as a string |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=cut |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
sub get_specific { |
82
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
83
|
0
|
|
|
|
|
|
my $company_ref = shift; |
84
|
|
|
|
|
|
|
|
85
|
0
|
|
|
|
|
|
return $self->client()->get("/hr/v2/companies/" . $company_ref); |
86
|
|
|
|
|
|
|
} |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=item get_teams |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
Get Teams in Company |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
B |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
$company_ref |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
Company reference |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
B |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
JSON response as a string |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=cut |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
sub get_teams { |
105
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
106
|
0
|
|
|
|
|
|
my $company_ref = shift; |
107
|
|
|
|
|
|
|
|
108
|
0
|
|
|
|
|
|
return $self->client()->get("/hr/v2/companies/" . $company_ref . "/teams"); |
109
|
|
|
|
|
|
|
} |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=item get_users |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
Get Users in Company |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
B |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
$company_ref |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
Company reference |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
B |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
JSON response as a string |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
=cut |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
sub get_users { |
128
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
129
|
0
|
|
|
|
|
|
my $company_ref = shift; |
130
|
|
|
|
|
|
|
|
131
|
0
|
|
|
|
|
|
return $self->client()->get("/hr/v2/companies/" . $company_ref . "/users"); |
132
|
|
|
|
|
|
|
} |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
=back |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
=head1 AUTHOR |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
Maksym Novozhylov C<< >> |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
=head1 COPYRIGHT |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
Copyright E Upwork Global Corp., 2015 |
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
=cut |
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
1; |