diff --git a/lib/Models/jobSearch.js b/lib/Models/jobSearch.js index 8220c31..7af7670 100644 --- a/lib/Models/jobSearch.js +++ b/lib/Models/jobSearch.js @@ -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".