;
use constant GRAPHQL_EPOINT => "https://api.upwork.com/graphql";
use constant DATA_FORMAT => "json";
use constant OVERLOAD_VAR => "http_method";
use constant URI_AUTH => "/ab/account-security/
l_request {
my ($self, $json, $tenant_id) = @_;
my $req = HTTP::Request->new('POST', GRAPHQL_EPOINT);
$req->header(
'Content-Type' => 'application/json',
'Authorization' =
nant_id)) {
$req->header('X-Upwork-API-TenantId' => $tenant_id);
}
$req->content($json);
my $res = $lwp->request($req);
return $res->decoded_content;
}
=item format_uri
an owned Account
B<Parameters>
$freelancer_ref
Freelancer reference
B<Return value>
JSON response as a string
=cut
sub get_owned {
my $self = shift;
my $freelancer_ref = shift;
ts for a Specific Account
B<Parameters>
$entity_ref
Entity reference
B<Return value>
JSON response as a string
=cut
sub get_specific {
my $self = shift;
my $entity_ref = shift;
m find
Search profiles
B<Parameters>
$params
Hash of parameters
B<Return value>
JSON response as a string
=cut
sub find {
my $self = shift;
my %params = @_;
die "The l
lestone for specific Contract
B<Parameters>
$contract_id
Contract ID
B<Return value>
JSON response as a string
=cut
sub get_active_milestone {
my $self = shift;
my $contract_id
stone for specific Contract
B<Parameters>
$milestone_id
Milestone ID
B<Return value>
JSON response as a string
=cut
sub get_submissions {
my $self = shift;
my $milestone_id = sh
Create a new Milestone
B<Parameters>
$params
Hash of parameters
B<Return value>
JSON response as a string
=cut
sub create {
my $self = shift;
my %params = @_;
die "The
_list
Get list of jobs
B<Parameters>
$params
Hash of parameters
B<Return value>
JSON response as a string
=cut
sub get_list {
my $self = shift;
my %params = @_;
die "T
=item get_specific
Get specific job
B<Parameters>
$key
Job key
B<Return value>
JSON response as a string
=cut
sub get_specific {
my $self = shift;
my $key = shift;
di
ost_job
Post a new job
B<Parameters>
$params
Hash of parameters
B<Return value>
JSON response as a string
=cut
sub post_job {
my $self = shift;
my %params = @_;
die "T
eters>
$reference
Contract reference
$params
Hash of parameters
B<Return value>
JSON response as a string
=cut
sub suspend_contract {
my $self = shift;
my $reference = shif
eters>
$reference
Contract reference
$params
Hash of parameters
B<Return value>
JSON response as a string
=cut
sub restart_contract {
my $self = shift;
my $reference = shif
eters>
$reference
Contract reference
$params
Hash of parameters
B<Return value>
JSON response as a string
=cut
sub end_contract {
my $self = shift;
my $reference = shift;
:API::Routers::Graphql;
use strict;
use warnings;
use parent "Net::Upwork::API";
use JSON::MaybeXS qw/encode_json/;
use constant ENTRY_POINT => Net::Upwork::API::Client::ENTRY_POINT_GQL;
=pod
=hea
alue>
JSON response as a string
=cut
sub execute {
my $self = shift;
my %params = @_;
my $json = encode_json \%params;
return $self->client()->graphql_request($json, $self->{t
Get list of engagements
B<Parameters>
$params
Hash of parameters
B<Return value>
JSON response as a string
=cut
sub get_list {
my $self = shift;
my %params = @_;
die "T
et specific engagement
B<Parameters>
$reference
Engagement reference
B<Return value>
JSON response as a string
=cut
sub get_specific {
my $self = shift;
my $reference = shift;
et_specific
Get specific profile
B<Parameters>
$key
Profile key
B<Return value>
JSON response as a string
=cut
sub get_specific {
my $self = shift;
my $key = shift;
di
Get brief info on specific profile
B<Parameters>
$key
Profile key
B<Return value>
JSON response as a string
=cut
sub get_specific_brief {
my $self = shift;
my $key = shift;
Start date
$till_date
End date
$params
Hash of parameters
B<Return value>
JSON response as a string
=cut
sub get_by_company {
my $self = shift;
my $company = shift;
Start date
$till_date
End date
$params
Hash of parameters
B<Return value>
JSON response as a string
=cut
sub get_by_contract {
my $self = shift;
my $contract = shift;
k for the client to approve
B<Parameters>
$params
Hash of parameters
B<Return value>
JSON response as a string
=cut
sub request_approval {
my $self = shift;
my %params = @_;
meters>
$submission_id
Submission ID
$params
Hash of parameters
B<Return value>
JSON response as a string
=cut
sub approve {
my $self = shift;
my $submission_id = shift;
meters>
$submission_id
Submission ID
$params
Hash of parameters
B<Return value>
JSON response as a string
=cut
sub reject {
my $self = shift;
my $submission_id = shift;
ss, $api, ENTRY_POINT);
}
=item get_categories_v2
Get categories (V2)
B<Return value>
JSON response as a string
=cut
sub get_categories_v2 {
my $self = shift;
die "The legacy AP
L call - see example in this library.";
}
=item get_skills
Get skills
B<Return value>
JSON response as a string
=cut
sub get_skills {
my $self = shift;
die "The legacy API was d
- see example in this library.";
}
=item get_skills_v2
Get skills V2
B<Return value>
JSON response as a string
=cut
sub get_skills_v2 {
my $self = shift;
die "The legacy API wa
outer($class, $api, ENTRY_POINT);
}
=item get_user_info
Get user info
B<Return value>
JSON response as a string
=cut
sub get_user_info {
my $self = shift;
my %params = @_;
d
contract
B<Parameters>
$contract
Contract number
$ts
Timestamp
B<Return value>
JSON response as a string
=cut
sub get_by_contract {
my $self = shift;
my $contract = shift;
t
Contract number
$ts
Timestamp
$params
Hash of parameters
B<Return value>
JSON response as a string
=cut
sub update_by_contract {
my $self = shift;
my $contract = shi
contract
B<Parameters>
$contract
Contract number
$ts
Timestamp
B<Return value>
JSON response as a string
=cut
sub delete_by_contract {
my $self = shift;
my $contract = shi
lass, $api, ENTRY_POINT);
}
=item get_rooms
Retrive rooms information
B<Return value>
JSON response as a string
=cut
sub get_rooms {
my $self = shift;
my $company = shift;
my
s library.";
}
=item get_room_details
Get a specific room information
B<Return value>
JSON response as a string
=cut
sub get_room_details {
my $self = shift;
my $company = shift;
ibrary.";
}
=item get_room_messages
Get messages from a specific room
B<Return value>
JSON response as a string
=cut
sub get_room_messages {
my $self = shift;
my $company = shift
ters>
$team_reference
Team reference
$params
Hash of parameters
B<Return value>
JSON response as a string
=cut
sub submit_bonus {
my $self = shift;
my $team_reference = shi
nit_router($class, $api, ENTRY_POINT);
}
=item get_all
Get user roles
B<Return value>
JSON response as a string
=cut
sub get_all {
my $self = shift;
die "The legacy API was depr
ser
Get by specific user
B<Parameters>
$user_ref
User reference
B<Return value>
JSON response as a string
=cut
sub get_by_specific_user {
my $self = shift;
my $user_ref = s
view
B<Parameters>
$job_key
Job key
$params
Hash of parameters
B<Return value>
JSON response as a string
=cut
sub invite {
my $self = shift;
my $job_key = shift;
my %p
ecific Freelancer
B<Parameters>
$freelancer_ref
Freelancer reference
B<Return value>
JSON response as a string
=cut
sub get_by_freelancer {
my $self = shift;
my $freelancer_ref
Team
B<Parameters>
$freelancer_team_ref
Freelancer's team reference
B<Return value>
JSON response as a string
=cut
sub get_by_freelancers_team {
my $self = shift;
my $freelance
B<Parameters>
$freelancer_company_ref
Freelancer's company reference
B<Return value>
JSON response as a string
=cut
sub get_by_freelancers_company {
my $self = shift;
my $freela
Get list of applications
B<Parameters>
$params
Hash of parameters
B<Return value>
JSON response as a string
=cut
sub get_list {
my $self = shift;
my %params = @_;
die "T
rs>
$reference
Application reference
$params
Hash of parameters
B<Return value>
JSON response as a string
=cut
sub get_specific {
my $self = shift;
my $reference = shift;