beekalam/nira-gateway

Helper classes to connect to Nira Rerservation API.

0.1.1 2021-03-09 19:01 UTC

This package is auto-updated.

Last update: 2024-04-12 02:49:01 UTC


README

Helper class to connect to Nira API.

Latest Version on Packagist GitHub Tests Action Status Total Downloads Build Status StyleCI

Installation

You can install the package via composer:

composer require beekalam/nira-gateway

Usage

  • Initializing the gateway handler.
$ngs = new NiraGatewaySpecification("<domain>/ws1", "<domain>/ws2/cgi-bin/NRSWEB.cgi", '<username>', '<password>');
$ng = new NiraGateway($ngs);

searching

$searchParameters = ParameterBuilder::fromArray([
        'airline' => '<your_airline>',
        'cbSource' => 'SYZ' 
        'cbTarget' => 'THR',
        'cbDay1' => '1',
        'cbMonth1' => '12'
        'cbAdultQty' => '1'
        'cbInfantQty' => '1'
        'cbChildQty' => '0'
]);

$responseBody = $ng->search($searchParameters);
FlightParser::fromJson($responseBody);

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.