fixtures
This commit is contained in:
4
index.js
4
index.js
@@ -13,8 +13,8 @@ function Query(queryObj) {
|
|||||||
this.host = queryObj.host || "www.linkedin.com";
|
this.host = queryObj.host || "www.linkedin.com";
|
||||||
|
|
||||||
//api handles strings with spaces by replacing the values with %20
|
//api handles strings with spaces by replacing the values with %20
|
||||||
this.keyword = queryObj.keyword?.replace(" ", "+") || "";
|
this.keyword = queryObj.keyword?.trim().replace(" ", "+") || "";
|
||||||
this.location = queryObj.location?.replace(" ", "+") || "";
|
this.location = queryObj.location?.trim().replace(" ", "+") || "";
|
||||||
this.dateSincePosted = queryObj.dateSincePosted || "";
|
this.dateSincePosted = queryObj.dateSincePosted || "";
|
||||||
this.jobType = queryObj.jobType || "";
|
this.jobType = queryObj.jobType || "";
|
||||||
this.remoteFilter = queryObj.remoteFilter || "";
|
this.remoteFilter = queryObj.remoteFilter || "";
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
{
|
{
|
||||||
"name": "linkedin-jobs-api",
|
"name": "linkedin-jobs-api",
|
||||||
"version": "1.0.1",
|
"version": "1.0.2",
|
||||||
"description": "advanced node.js package for getting job listings from LinkedIn",
|
"description": "advanced node.js package for getting job listings from LinkedIn",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"test": "node test.js"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|||||||
2
test.js
2
test.js
@@ -1,7 +1,7 @@
|
|||||||
const linkedIn = require("./index");
|
const linkedIn = require("./index");
|
||||||
|
|
||||||
const queryOptions = {
|
const queryOptions = {
|
||||||
keyword: "HR",
|
keyword: "",
|
||||||
location: "India",
|
location: "India",
|
||||||
dateSincePosted: "past Week",
|
dateSincePosted: "past Week",
|
||||||
jobType: "full time",
|
jobType: "full time",
|
||||||
|
|||||||
Reference in New Issue
Block a user