Installation

Install WebService::Careerjet module via cpnam

cpanm -S WebService::Careerjet

Documentation

You can find the full documentation of the module here

Important notes:

Example code

use Careerjet_API;

my $api_key = '<API_KEY>';
my $locale_code = 'en_IM';
my $user_ip = '<USER_IP>';
my $user_agent = '<USER_AGENT>';

my $referer = 'https:///find-jobs/?s=perl+developer&l=London'

# Create Perl interface to API
my $search_api = WebService::Careerjet->new($locale_code, $api_key);

# Perform a search
my $result = $search_api->search({
                                   'keywords' => 'perl developer',
                                   'location' => 'London',
                                   'page' => 1,
                                   'sort' => 'releveance',
                                   'user_ip' => $user_ip,
                                   'user_agent' => $user_agent,
                                   'referrer' => $referrer,
                                 });

# Go through results
if ($result->{type} eq 'JOBS') {
    print "Found ". $result->{hits}. " jobs on " . $result->{pages} . " pages\n";
    my $ra_jobs = $result->{jobs};

    foreach my $job(@$ra_jobs) {
      print "URL         :".$job->{url}."\n";
      print "TITLE       :".$job->{title}."\n";
      print "COMPANY     :".$job->{company}."\n";
      print "SALARY      :".$job->{salary}."\n";
      print "DATE        :".$job->{date}."\n";
      print "DESCRIPTION :".$job->{description}."\n";
      print "LOCATIONS   :".$job->{locations}."\n";
      print "\n";
    }
}

# when several locations match the input location
# a new search needs to be done with one of the proposed locations
if ($result->{type} == 'LOCATIONS') {
  foreach my $loc(@{$result->locations}) {
    print $loc->{name} . "\n";
  }
}