Skip to content

Conversation

@theihasan
Copy link
Owner

@theihasan theihasan commented Apr 26, 2025

📝 Why is PR is required?

Answer:
This PR refactors job data handling to improve logging, error handling, and data accuracy while introducing LinkedIn-specific job API integration and abstracting job fetching logic for multiple APIs. It also adds a new Artisan command to link active countries to job categories.

🛠️ Changes

  • Bug fix (non-breaking change that fixes an issue)
  • Feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactor (code improvement without changing external behavior)
  • Other (please specify):

📌 Related Issues (e.g., Fixes #123, Closes #456)

Ans: None

📸 Screenshots (if applicable)

Ans: None

📣 Additional Comments

Ans

Implemented a new `GetJobDataJob` abstract class to standardize job fetching logic across APIs. Added a LinkedIn job macro and updated the `ApiName` enum for LinkedIn API support. Refactored `AppServiceProvider` to include LinkedIn-related functionality and improved code consistency.
Refactored `GetJobDataJob` by moving it out of the `Store` namespace and adjusting the `makeApiRequest` and DTO transformation methods to use the `Country` model instead of just the country code. Added new job classes (`JSearchJobDataJob` and `LinkedInJobDataJob`) to handle specific API integrations, supporting custom request structures and response transformations for `JSearch` and `LinkedIn` APIs.
Introduced a new Artisan command `app:link-countries` to associate specified active countries with all job categories. The command ensures existing relationships are cleared, provides progress feedback, and verifies the linking process upon completion.
Replaced the `GetJobData` dispatch with `JSearchJobDataJob` and `LinkedInJobDataJob` for improved granularity. Removed unused exception handling related to `CategoryNotFoundException` and cleaned up imports to streamline the code.
Refactored `GetJobDataJob` and its subclasses to enhance logging clarity and add proper exception handling. Replaced `readonly` properties to ensure compatibility and introduced validation for missing API keys. Updated LinkedIn job request endpoint to adjust query behavior.
Replaced the 'job_description' field with 'linkedin_org_description' to ensure alignment with LinkedIn's data structure. This change improves the accuracy of job descriptions pulled from LinkedIn sources.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants