| 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::Roles; | ||
| 15 | |||
| 16 | use strict; | ||
| 17 | use warnings; | ||
| 18 | use parent "Net::Upwork::API"; | ||
| 19 | |||
| 20 | use constant ENTRY_POINT => Net::Upwork::API::Client::ENTRY_POINT_API; | ||
| 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<Parameters> | ||
| 37 | |||
| 38 | $api | ||
| 39 | |||
| 40 | API object | ||
| 41 | |||
| 42 | =cut | ||
| 43 | |||
| 44 | sub new { | ||
| 45 | my ($class, $api) = @_; | ||
| 46 | return Net::Upwork::API::init_router($class, $api, ENTRY_POINT); | ||
| 47 | } | ||
| 48 | |||
| 49 | =item get_all | ||
| 50 | |||
| 51 | Get user roles | ||
| 52 | |||
| 53 | B<Return value> | ||
| 54 | |||
| 55 | JSON response as a string | ||
| 56 | |||
| 57 | =cut | ||
| 58 | |||
| 59 | sub get_all { | ||
| 60 | my $self = shift; | ||
| 61 | |||
| 62 | die "The legacy API was deprecated. Please, use GraphQL call - see example in this library."; | ||
| 63 | } | ||
| 64 | |||
| 65 | =item get_by_specific_user | ||
| 66 | |||
| 67 | Get by specific user | ||
| 68 | |||
| 69 | B<Parameters> | ||
| 70 | |||
| 71 | $user_ref | ||
| 72 | |||
| 73 | User reference | ||
| 74 | |||
| 75 | B<Return value> | ||
| 76 | |||
| 77 | JSON response as a string | ||
| 78 | |||
| 79 | =cut | ||
| 80 | |||
| 81 | sub get_by_specific_user { | ||
| 82 | my $self = shift; | ||
| 83 | my $user_ref = shift; | ||
| 84 | |||
| 85 | die "The legacy API was deprecated. Please, use GraphQL call - see example in this library."; | ||
| 86 | } | ||
| 87 | |||
| 88 | =back | ||
| 89 | |||
| 90 | =head1 AUTHOR | ||
| 91 | |||
| 92 | Maksym Novozhylov C<< <mnovozhilov@upwork.com> >> | ||
| 93 | |||
| 94 | =head1 COPYRIGHT | ||
| 95 | |||
| 96 | Copyright E<copy> Upwork Global Corp., 2015 | ||
| 97 | |||
| 98 | =cut | ||
| 99 | |||
| 100 | 1; |