Everyone is searching for a new job to land on it seeking for better package. Searching for a new job using recruiting sites can be a tedious task. Alexa can search for you and returned result for your search while you are handling another tasks or watching TV for example
As PoC this skill is integrated with Github Jobs API to search for IT open jobs.
Alexa: Which organization you are targeting? or all organizations
User: Amazon
Alexa: Which profession, technology or specialization you are searching for? or all professions
User: All professions
Alexa: find a job in which city? or all cities
User: all cities
Alexa: Part time job or full time job? or all jobs
User: Part time
Then use Github jobs API to search for available jobs based on user criteria.
Creating SkillAmazon avail easy tutorials to create skill & lambda function. To create Skill, Lambda function and trigger lambda using the skill follow steps in trivia skill tutorial
Lambda function
To prepare the GitHub API input parameters, we loop on user choices and pack them in "para" variable.
criteria.OrganizationName = "" ;
criteria.ProfessionName = "" ;
criteria.CityName = "" ;
criteria.FullTimePartTime = "" ;
if ( criteria.OrganizationName !== "all" )
{
description = criteria.OrganizationName ;
}
if ( criteria.ProfessionName !== "all" )
{
description += criteria.ProfessionName ;
}
if( description !== "" )
{
para = "description=" +description ;
}
if ( criteria.CityName !== "all" )
{
if(para !== "")
para += "&";
para += "location=" + criteria.CityName;
}
if ( criteria.FullTimePartTime === "full time" || criteria.FullTimePartTime === "full" )
{
if(para !== "")
para += "&";
para += "full_time=" + "true" ;
}
else if ( criteria.FullTimePartTime === "part time" || criteria.FullTimePartTime === "part" )
{
if(para !== "")
para += "&";
para += "full_time=" + "false" ;
}
At the end you should apply "encodeURIComponent" function on the para variable to ensure that encoding is correct
para = encodeURIComponent(para);
if(para !== "")
para = '?' + para;
Below is the code used to call Github job API
var options = {
host: "jobs.github.com",
port: 443,
path: "/positions.json" + para,
method: 'GET',
agent: false,
headers:
{
'Content-Type': 'application/x-www-form-urlencoded' //,
}
};
try
{
var req = https.request(options,
function(res)
{
res.setEncoding('utf8');
var responseString = '';
res.on('data', function (chunk) {
responseString += chunk;
});
res.on('end', function() {
callback(responseString);
});
}
);
req.on('error', (e) => {
console.log("req.on error" + e);
});
req.end();
}
catch(e)
{
console.log("Error:" +e);
}
Example of returned output from API will be as below
For more information about GitHub jobs API, you can check Github Jobs API to check returned output and calling parameters.
Certification in UKSkill name is "Job Search" and it is certified in English U.K. languages in all countries & regions where Amazon distributes skills. Skill also certified in English (U.S) language.
There is a difference in Interaction models in English (U.S) & English (U.K) as AMAZON.ProfessionalType" & "AMAZON.Organization" slots are supported only in U.S, so I replaced them with custom slot types in U.K: "LIST_OF_PROFESSION" & "LIST_OF_ORGANIZATIONS".
English (U.S)
{
"slots": [
{
"name": "CorporationName",
"type": "AMAZON.Organization"
}
],
"intent": "CorporationIntent"
},
{
"slots": [
{
"name": "ProfessionName",
"type": "AMAZON.ProfessionalType"
}
],
"intent": "ProfessionalIntent"
},
English (U.K)
{
"slots": [
{
"name": "ProfessionName",
"type": "LIST_OF_PROFESSION"
}
],
"intent": "ProfessionalIntent"
},
{
"slots": [
{
"name": "CorporationName",
"type": "LIST_OF_ORGANIZATIONS"
}
],
"intent": "CorporationIntent"
}
Future StepsCurrently Github jobs are related to IT jobs in US. next step is to add more recruiting sites to support other areas rather than US and other fields rather than IT.
Comments