jobapis / jobs-ziprecruiter

Easily integrate the ZipRecruiter API into your PHP application
https://www.jobapis.com/open-source/ziprecruiter/
Other
12 stars 9 forks source link

The fields from ziprecruiter api are not included in json response. #5

Closed ardian-c closed 6 years ago

ardian-c commented 6 years ago

Hi,

First, thank you for this helpful package. I have been working on a project that uses Ziprecruiter API, with a Lumen backend and VueJS frontend in my stack. When getting the data from API using the package I can see that response is different from response I get by accessing them directly using api.ziprecruiter.com/jobs/v1. For instance, attributes posted_time_friendly, total are missing in the json I get from package. Is there a way to add them without modifying the package or similar hacks?

karllhughes commented 6 years ago

@ardian-c likely those missing fields are just an oversight on my part. I've been using this package, but haven't needed all the fields, so I probably just didn't notice.

I'm happy to make an update with the missing fields.

Are the two you mentioned (posted_time_frieldy and total) the only missing fields?

ardian-c commented 6 years ago

@karllhughes, sorry for late response. Here is the json response I get from API (without using the package). You can see some fields are missing. I'd be very happy to see the package updated as it is a very helpful for using the Ziprecruiter API.

karllhughes commented 6 years ago

Hey @ardian-c thanks!

I'll put this on my to-do list then. I'm going to be out of town for a vacation next week. In the meantime, you could probably edit this array and add the fields you want included. They should be in the $payload variable, but they're not being passed into the Job constructor unless explicitly listed.

If you get time, feel free to make a pull request, but if not, I'll look into it when I'm back.

Thanks again! 😄

karllhughes commented 6 years ago

@ardian-c I have opened PR #6 to add three fields that are included in ZR results that were not in the Job Object.

I didn't see a total field. Is that in the containing object and not the job itself? If so, our JobCollection object contains its own count method that you can use to get the total.

Finally, some attributes from the ZR API have different names in our Job Object that is returned when you use this library. The reason for this is that we are attempting to standardize the data returned from many different job boards, so when possible we standardize the fields using the Schema.org JobPosting object.

If you have any other questions or if I missed a field, let me know. I'll wait to hear from you before I merge in the PR and tag a release.

ardian-c commented 6 years ago

Thanks, I had updated some fields manually but didn't add them here. The total field is not there because it is part of the containing object not the job object itself. The total results I get is only 100, is there a way to get all the results or is this a Ziprecruiter API limitation. Regarding naming, I have noticed that there are some differences however that didn't bother me, it would be good though if standardized. Regarding missing fields those added were more important, others are available as per last time checked.

karllhughes commented 6 years ago

@ardian-c IIRC Ziprecruiter limits the number of results you can get per page. Our package doesn't impose any limits that don't exist in their system.

I'll merge the PR and tag a release. If you see any issues updating, feel free to reopen this issue or open a new one. Thanks again!