Quick API for Zealify to share jobs at awesome companies

The other day we put together a very rudimental API for the awesome folks at Zealify, who help people discover great companies to work at.

Yes, we know that the next version of WordPress should have API functionality baked into the core, but in the fast moving world of startups, you don’t always get the luxury of waiting around for official releases.

We setup just a single endpoint at domain/api/jobs/ to quickly return a JSON feed of the currently open positions on their platform.

Here’s a quick hacky way of grabbing their feed, parsing it and displaying it as a list on your own website.

	
function zealify_show_jobs()
{
	$object = json_decode( file_get_contents('http://zealify.com/api/jobs') );
	echo "<ul id='zealify_jobs'>";
	foreach ($object as $key => $company) {
		foreach ($company->jobs as $job){
			echo "<li class='zealify_item'>
				<a href='$job->url' target='_blank'>$job->title</a> 
				at 
				<a href='$company->url' target='_blank'>$company->title</a>
			      </li>";
		}
	}
	echo "</ul>";
}


Whilst it may not be the most efficient, or prettiest code in the world, it will give you a shareable and dynamic list of some awesome jobs in some of London’s coolest offices.

The following variables are returned from the API:

$company->title // Company name
$company->url // Link to Company Profile on Zealify.com
$job->title; // Job Title/Description
$job->url // Link to Job Profile on Zealify.com


Let us know what you think/love/hate about this post on twitter @ektagon. If there’s anything we can help you hack together, do not hesitate to reach out and say hi.