Skip to content

Adds workable API integration to SilverStripe projects

License

Notifications You must be signed in to change notification settings

dannidickson/workable

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Workable for SilverStripe

Adds Workable API integration to SilverStripe projects.

Configuration

First, add your API key using a constant, preferably in your _ss_environment.php file.

define('WORKABLE_API_KEY','your_api_key');

Alternatively, you can add your API key in the config, although this is not recommended.

Workable:
  apiKey: your_api_key

Then, just add your subdomain to the config.

Workable:
  subdomain: example

Usage

Right now, only one API call is available.

$params = ['state' => 'published'];
Workable::create()->getJobs($params);

This returns an ArrayList, so you can iterate over it on the template.

<% loop $Jobs %>
$Title, $Url
<% end_loop %>

For nested properties, you can use the dot-separated syntax.

<% loop $Jobs %>
$Title ($Location.City)
<% end_loop %>

Property transformation

The Workable API returns is properties in snake_case. Simply convert these to UpperCamelCase to call them on each result.

$FullTitle, $Url, $ZipCode, $Department, $CreatedAt

About

Adds workable API integration to SilverStripe projects

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%