tschope/irp-class

This class simple bring available dates in GNIB/IRP. This class DON'T make appointment, DONT'T garantee your appointment, this is only check available appointments and you need to use to create a cronjob or application to check and send sms, email or something to your users.


Keywords
Ireland, gnib, irp, appointments find
License
BSD-3-Clause-Attribution

Documentation

IRP Class / GNIB

A simple PHP API extension for retrive available dates from Ireland GNIB / IRP. I transform in Carbon dates after retrive dates from Website.

Very simple to use:

$params = [];
$params['cat'] = 'All'; // All only now
$params['sbcat'] = 'All'; // All it's better
$params['typ'] = 'New'; // Renewal or New

$irpClass = new Irpclass\Irpclass();
$response = $irpClass->get($params);

if($response['success'])
{
    if(!empty($response['results'])) {
        //rows
    }else{
        //empty
    }
}

Installation

With Composer

$ composer require tschope/irp-class
{
    "require": {
        "tschope/irp-class": "^1"
    }
}
<?php
require 'vendor/autoload.php';

use Irpclass;

$params = [];
$params['cat'] = 'All'; // All only now
$params['sbcat'] = 'All'; // All
$params['typ'] = 'New'; // Renewal or New

$irpClass = new Irpclass\Irpclass();
$response = $irpClass->get($params);

if($response['success'])
{
    if(!empty($response['results'])) {
        //rows
    }else{
        //empty
    }
}

Example of use in Laravel Console

<script src="https://gist.github.com/tschope/deb56ab640737310ced3c57cb71022ed.js"></script>

Go to gist Example

Without Composer

Why are you not using composer? Download Irpclass.php from the repo and save the file into your project path somewhere. Don't forgot the dependencies, Carbon and GuzzleHttp.