added companyLogo and agoTime
This commit is contained in:
63
README.md
63
README.md
@@ -9,19 +9,23 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- ⚡ Lightening Fast
|
- ⚡ Lightening Fast
|
||||||
- ✨ Minimal
|
- ✨ Minimal
|
||||||
- 🪶 Lightweight
|
- 🪶 Lightweight
|
||||||
- 🔥 Advanced Filters
|
- 🔥 Advanced Filters
|
||||||
- 🤩 Support all Frameworks
|
- 🤩 Support all Frameworks
|
||||||
|
|
||||||
## How to Install ?
|
## How to Install ?
|
||||||
|
|
||||||
Use npm or yarn to install this npm package
|
Use npm or yarn to install this npm package
|
||||||
|
|
||||||
```
|
```
|
||||||
npm i linkedin-jobs-api
|
npm i linkedin-jobs-api
|
||||||
```
|
```
|
||||||
|
|
||||||
or
|
or
|
||||||
|
|
||||||
```
|
```
|
||||||
yarn add linkedin-jobs-api
|
yarn add linkedin-jobs-api
|
||||||
```
|
```
|
||||||
@@ -57,28 +61,47 @@ linkedIn.query(queryOptions).then(response => {
|
|||||||
|
|
||||||
query() accepts a _queryOptions_ object and returns an array of _Job_ objects.
|
query() accepts a _queryOptions_ object and returns an array of _Job_ objects.
|
||||||
|
|
||||||
| Parameter | LinkedIn Default value| Description |
|
| Parameter | LinkedIn Default value | Description |
|
||||||
|:-----------:|:---------------------:|:----------------------------------------------------------------------------------------------:|
|
| :-------------: | :--------------------: | :-------------------------------------------------------------------------------------------------------: |
|
||||||
| keyword | "" | _string_ - The text to search: (i.e. Software Developer) |
|
| keyword | "" | _string_ - The text to search: (i.e. Software Developer) |
|
||||||
| location | "" | _string_ - The name of the city: (i.e. Los Angeles)
|
| location | "" | _string_ - The name of the city: (i.e. Los Angeles) |
|
||||||
| dateSincePosted| "" | _string_ - Max range of jobs: `past month`, `past week`, `24hr`
|
| dateSincePosted | "" | _string_ - Max range of jobs: `past month`, `past week`, `24hr` |
|
||||||
| jobType | "" | _string_ - Type of position: `full time`, `part time`, `contract`, `temporary`, `volunteer`, `internship`
|
| jobType | "" | _string_ - Type of position: `full time`, `part time`, `contract`, `temporary`, `volunteer`, `internship` |
|
||||||
| remoteFilter| "" | _string_ - Filter telecommuting: `on site`, `remote`, `hybrid`
|
| remoteFilter | "" | _string_ - Filter telecommuting: `on site`, `remote`, `hybrid` |
|
||||||
| salary | "" | _string_ - Minimum Salary: `40000`, `60000`, `80000`, `100000`, `120000`
|
| salary | "" | _string_ - Minimum Salary: `40000`, `60000`, `80000`, `100000`, `120000` |
|
||||||
| experienceLevel| "" | _string_ - `internship`, `entry level`, `associate`, `senior`, `director`, `executive`
|
| experienceLevel | "" | _string_ - `internship`, `entry level`, `associate`, `senior`, `director`, `executive` |
|
||||||
| limit | "" | _string_ - Number of jobs returned: (i.e. '1', '10', '100', etc)
|
| limit | "" | _string_ - Number of jobs returned: (i.e. '1', '10', '100', etc) |
|
||||||
| sortBy | "" | _string_ - `recent`, `relevant`
|
| sortBy | "" | _string_ - `recent`, `relevant` |
|
||||||
|
|
||||||
## Job Objects
|
## Job Objects
|
||||||
|
|
||||||
| Paramter | Description (Default: null) |
|
| Paramter | Description (Default: null) |
|
||||||
|:-----------:|:----------------------------------------------------------------------------------------------:|
|
| :---------: | :---------------------------------: |
|
||||||
| position | _string_ - Position title
|
| position | _string_ - Position title |
|
||||||
| company | _string_ - Company name
|
| company | _string_ - Company name |
|
||||||
| location | _string_ - Location of the job
|
| companyLogo | _string_ - Company Logo |
|
||||||
| date | _string_ - Date the job was posted
|
| location | _string_ - Location of the job |
|
||||||
| salary | _string_ - Salary range
|
| date | _string_ - Date the job was posted |
|
||||||
| jobUrl | _string_ - URL of the job page
|
| agoTime | _string_ - time since it was posted |
|
||||||
|
| salary | _string_ - Salary range |
|
||||||
|
| jobUrl | _string_ - URL of the job page |
|
||||||
|
|
||||||
|
## Example Response
|
||||||
|
|
||||||
|
```json
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"position": "Human Resources Administrator",
|
||||||
|
"company": "The Hub",
|
||||||
|
"companyLogo": "https://static.licdn.com/aero-v1/sc/h/9a9u41thxt325ucfh5z8ga4m8",
|
||||||
|
"location": "India",
|
||||||
|
"date": "2023-11-20",
|
||||||
|
"agoTime": "2 days ago",
|
||||||
|
"salary": "",
|
||||||
|
"jobUrl": "https://in.linkedin.com/jobs/view/human-resources-administrator-at-the-hub-3765436573?refId=rWSjK9izzZ1ZNnUZYzqp8Q%3D%3D&trackingId=X6uox0Xk%2FRQmqkuHpO%2BdrQ%3D%3D&position=1&pageNum=0&trk=public_jobs_jserp-result_search-card"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
```
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
|
|||||||
6
index.js
6
index.js
@@ -176,11 +176,17 @@ function parseJobList(jobData) {
|
|||||||
.replace(/\n/g, "")
|
.replace(/\n/g, "")
|
||||||
.replaceAll(" ", "") || "";
|
.replaceAll(" ", "") || "";
|
||||||
const jobUrl = job.find(".base-card__full-link").attr("href") || "";
|
const jobUrl = job.find(".base-card__full-link").attr("href") || "";
|
||||||
|
const companyLogo =
|
||||||
|
job.find(".artdeco-entity-image").attr("data-ghost-url") || "";
|
||||||
|
const agoTime =
|
||||||
|
job.find(".job-search-card__listdate").text().trim() || "";
|
||||||
return {
|
return {
|
||||||
position: position,
|
position: position,
|
||||||
company: company,
|
company: company,
|
||||||
|
companyLogo: companyLogo,
|
||||||
location: location,
|
location: location,
|
||||||
date: date,
|
date: date,
|
||||||
|
agoTime: agoTime,
|
||||||
salary: salary,
|
salary: salary,
|
||||||
jobUrl: jobUrl,
|
jobUrl: jobUrl,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "linkedin-jobs-api",
|
"name": "linkedin-jobs-api",
|
||||||
"version": "1.0.0",
|
"version": "1.0.1",
|
||||||
"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": {
|
||||||
|
|||||||
Reference in New Issue
Block a user