Skip to content
This repository was archived by the owner on May 3, 2018. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions lib/Models/jobSearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,23 @@ var JobSearch = module.exports = function (domain, publisherId) {
return this;
};

/**
* Specifies the job source to use in the search.
* @param {String} type The job source to use. Allowed values are "all", "directhire", "recruiters".
*
* @return {Object} Returns the current instance of the JobSource object
*/
this.WhereJobSource = function (type) {
var allowedValues = ["all", "directhire", "recruiters"];
if (allowedValues.indexOf(type) > -1) {
if (type != "all")
query.sr = type;
} else
throw(type + ' is not a valid value. Allowed values are [' + allowedValues.toString() + ']');

return this;
};

/**
* Specifies the job type to use in the search.
* @param {String} type The job type to use. Allowed values are "all", "fulltime", "parttime", "contract", "internship", "temporary".
Expand Down