alsoknownasdrew/remote-ok-php

Remoteok.io API PHP Client

v0.0.2 2020-10-27 12:32 UTC

This package is auto-updated.

Last update: 2022-05-12 18:52:31 UTC


README

Build Status Packagist PHP Version Support

Installation

Requirements

Install the package through Composer: run the composer require command from the Terminal:

composer require alsoknownasdrew/remote-ok-php

Getting Started

require __DIR__ . '/vendor/autoload.php';

use Alsoknownasdrew\RemoteOK\Client\Factory\ClientFactory;

$client = ClientFactory::create();

Usage

Legal notice from the Remote OK API:

By using Remote OK's API feed you legally agree to mention Remote OK as a source and link back to the job listing URL on Remote OK with a DIRECT link, no redirects please. Please don't use our Remote OK and r|OK logo without written permission as they're registered trademarks. And thanks for using Remote OK! ^__^

Fetch positions

Retrieve available positions from Remoteok.io.

$positions = $client->positions();

$client->positions() will return an array of Position objects. By default, Remoteok.io API responds with a list of job positions from the last 30 days, but you can pass an optional limit argument to Client::positions() method

$positions = $client->positions(5); // will return an array with the 5 most recent positions

Let's take a look on what's inside the client response by taking the first position from the array:

$position = $positions[0];

Get position properties

You can get the following properties from a Position object: company name, company logo URL, company location, creation date, description, position ID, is position original (boolean), slug, tags, title, URL.

Company Name

Get the name of the company.

$position->getCompany()->getName();

Company Logo URL

Get the full URL of the company's logo.

$position->getCompany()->getLogoUrl();

Company Location

Get the location of the company.

$position->getCompany()->getLocation();

Creation Date

Get the creation date of the position position posting.

$position->getCreatedAt();

Description

Get the description of the position posting.

$position->getDescription();

Position ID

Get the internal ID of the position on Remoteok.io.

$position->getId();

Position Originality

Check whether the position posting is original, return as a boolean.

$position->isOriginal();

Slug

Get the slug of the position posting on Remoteok.io.

$position->getSlug();

Tags

Get the tags associated with the position posting.

$position->getTags();

Title

Get the title of the position posting.

$position->getTitle();

Position URL

Get the full URL of the position posting on Remoteok.io.

$position->getUrl();

Contributing

Contributions are welcome. Before proceeding, please read the Code of Conduct AND Contributing guides, which contains information about contribution process.

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Andriy

💻 🚧

Raphael

📖 💻

akshaythakare7

📖

Dario

💻

This project follows the all-contributors specification. Contributions of any kind welcome!