Giter Site home page Giter Site logo

simplyhired-jobamatic-api's Introduction

SimplyHired-JobAMatic-API

PHP wrapper for Simplyhired's Job-a-matic API

To Dos

  1. Finish adding Doc blocka to all classes and methods
  2. Create Tests
  3. Create composer file

Examples

First included the need files

require_once dirname(__FILE__) . '/src/abstract/InterfaceSimplyHiredJobAMaticApiHttp.php';
require_once dirname(__FILE__) . '/src/abstract/AbstractSimplyHiredJobAMaticApi.php';
require_once dirname(__FILE__) . '/src/SimplyHiredJobAMaticApi.php';
require_once dirname(__FILE__) . '/src/SimplyHiredJobAMaticApi/SimplyHiredJobAMaticApi_Results.php';
require_once dirname(__FILE__) . '/src/SimplyHiredJobAMaticApi/SimplyHiredJobAMaticApi_JobsCollection.php';
require_once dirname(__FILE__) . '/src/SimplyHiredJobAMaticApi/SimplyHiredJobAMaticApi_Job.php';

//include one of the Http Classes
require_once dirname(__FILE__) . '/src/http/FileGetContentsHttp.php';

//OR

require_once dirname(__FILE__) . '/src/http/CurlHttp.php';

Example 1:

//create the Http obj
$http1 = new FileGetContentsHttp();

$publisher_id = '28086';
$domain = 'cakephp-jobs.jobamatic.com';

$JobAMaticApi1 = new SimplyHiredJobAMaticApi($publisher_id, $domain, $http1);
/*
 * Search for jobs that mention "Ruby" or "Rails" within a 15 mile radius of
 * the city of San Francisco. Return the first 50 jobs and sort by the date the
 * job was last updated in descending order. Show the full job description for
 * each job.
 */
$jobResults1 = $JobAMaticApi1
	->setQuery('Ruby OR Rails')
	->setLocation('San Francisco')
	->setMiles(15)
	->setSortByLastSeenDate('desc')
	->setWindowSize(50)
	->setFragmentDescription(false)
	->request();
print_r($jobResults1->toArray());

Example 2:

//create the Http obj
$http2 = new CurlHttp();

$JobAMaticApi2 = new SimplyHiredJobAMaticApi($publisher_id, $domain, $http1);
/*
 * Search for jobs that mention "Wordpress" only within the zip code 10001.
 * Return the first 100 jobs and sort by revalance in descending order. Show the
 * full description of each job.
 */
$jobResults2 = $JobAMaticApi2
	->setQuery('Wordpress')
	->setLocation('10001')
	->setLocationExact()
	->setSortByRelevance()
	->setWindowSize(100)
	->setFragmentDescription(true)
	->request();
print_r($jobResults2->toArray());

simplyhired-jobamatic-api's People

Contributors

angelxmoreno avatar

Stargazers

 avatar

Watchers

 avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.