2017 © Pedro Peláez
 

library orsapi

ORS API Laravel Wrapper

image

ors/orsapi

ORS API Laravel Wrapper

  • Wednesday, May 31, 2017
  • by flajsg
  • Repository
  • 0 Watchers
  • 0 Stars
  • 117 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 15 Versions
  • 0 % Grown

The README.md

ors-orsapi

ORS Tehnologije d.o.o., (*1)

This is a wrapper for Laravel 4.2 using ORS API., (*2)

Installation

To install the package you must run composer require ors/orsapi and set service provider and alias in your app.php file., (*3)

To include service provider add this line in 'providers' array:, (*4)

'Ors\Orsapi\OrsapiServiceProvider',

And make sure you've added aliases in 'aliases' array:, (*5)

'ConnConfig'        => 'Ors\Orsapi\Facades\ConnConfigApi',
'PassengerApi'      => 'Ors\Orsapi\Facades\PassengerApi',
'OrmApi'            => 'Ors\Orsapi\Facades\OrmApi',
'ReservationsApi'   => 'Ors\Orsapi\Facades\ReservationsApi',
'SearchApi'         => 'Ors\Orsapi\Facades\SearchApi',
'TypHotelApi'       => 'Ors\Orsapi\Facades\TypHotelApi',
'TypDhotelApi'      => 'Ors\Orsapi\Facades\TypDhotelApi',
'TypPauschalApi'    => 'Ors\Orsapi\Facades\TypPauschalApi',
'TypTripsApi'       => 'Ors\Orsapi\Facades\TypTripsApi',
'ObjectInfoApi'     => 'Ors\Orsapi\Facades\ObjectInfoApi',
'FlightInfoApi'     => 'Ors\Orsapi\Facades\FlightInfoApi',

Publishing migrations and configuration:, (*6)

You will need some custom configurations so make sure you have published config files:, (*7)

php artisan config:publish ors/orsapi:dev-master

Basic Usage

Set API authorisation:, (*8)

$handler = TypHotelApi::setLogin($agid, $ibeid, $usr, $pass);

A list of available ORS API connections:, (*9)

$connections = ConnConfig::listConnections()

A list of agency passengers:, (*10)

$passengers = PassengerApi::all()

A list of hotel-only destinations (stay 3 nights, 2 adults, 3 months in advance):, (*11)

$params = array(
    'epc' => 2,
    'vnd' => date('Y-m-d'),
    'bsd' => date("Y-m-d", strtotime("+3 months")),
    'tdc' => '3-3',
    'uniqid' => '123456789',
    'ibeid' => 'xxx',
);

$regions = TypHotelApi::regions($params);

Object info (description, images, characteristics, weather, ratings):, (*12)

$params = array(
    'gid' => 6715,
    'toc' => 'FTI',
);

$info = ObjectInfoApi::infoToc($params);

Set API authorisation:, (*13)

$auth = new \Ors\Orsapi\Oam\OAMAuth(array(
    'agid' => XXXX, 
    'usr' => 'api-username', 
    'pass' => 'api-password'
));

$regions = TypHotelApi::setAuthLogin($auth)->regions($params);

Search for reservations by booking id:, (*14)

$filters = array([
    '@attributes' => ['op' => 'AND'],
        'fields' => [
            array('@attributes' => array('name' => 'book_id', 'op' => 'is', 'value' => 3342))           
    ]
]);

$bookings = ReservationsApi::search(array('ibeid' => 62), $filters);

The Versions

31/05 2017

dev-dev

dev-dev

ORS API Laravel Wrapper

  Sources   Download

MIT

The Requires

 

by ors

laravel

06/03 2017

dev-master

9999999-dev

ORS API Laravel Wrapper

  Sources   Download

MIT

The Requires

 

by ors

laravel

06/03 2017

v0.1.12

0.1.12.0

ORS API Laravel Wrapper

  Sources   Download

MIT

The Requires

 

by ors

laravel

01/03 2017

v0.1.11

0.1.11.0

ORS API Laravel Wrapper

  Sources   Download

MIT

The Requires

 

by ors

laravel

01/03 2017

v0.1.10

0.1.10.0

ORS API Laravel Wrapper

  Sources   Download

MIT

The Requires

 

by ors

laravel

01/03 2017

v0.1.9

0.1.9.0

ORS API Laravel Wrapper

  Sources   Download

MIT

The Requires

 

by ors

laravel

22/02 2017

v0.1.8

0.1.8.0

ORS API Laravel Wrapper

  Sources   Download

MIT

The Requires

 

by ors

laravel

10/02 2017

v0.1.7

0.1.7.0

ORS API Laravel Wrapper

  Sources   Download

MIT

The Requires

 

by ors

laravel

06/02 2017

v0.1.6

0.1.6.0

ORS API Laravel Wrapper

  Sources   Download

MIT

The Requires

 

by ors

laravel

06/02 2017

v0.1.5

0.1.5.0

ORS API Laravel Wrapper

  Sources   Download

MIT

The Requires

 

by ors

laravel

06/02 2017

v0.1.4

0.1.4.0

ORS API Laravel Wrapper

  Sources   Download

MIT

The Requires

 

by ors

laravel

25/01 2017

v0.1.3

0.1.3.0

ORS API Laravel Wrapper

  Sources   Download

MIT

The Requires

 

by ors

laravel

21/12 2016

v0.1.2

0.1.2.0

ORS API Laravel Wrapper

  Sources   Download

MIT

The Requires

 

by ors

laravel

19/12 2016

v0.1.1

0.1.1.0

ORS API Laravel Wrapper

  Sources   Download

MIT

The Requires

 

by ors

laravel

13/12 2016

v0.1.0

0.1.0.0

ORS API Laravel Wrapper

  Sources   Download

MIT

The Requires

 

by ors

laravel