2017 © Pedro PelĂĄez
 

library data-bindr

Api Integraton for https://www.databindr.com/#!/docs

image

alexandreo/data-bindr

Api Integraton for https://www.databindr.com/#!/docs

  • Thursday, October 26, 2017
  • by alexandreo
  • Repository
  • 1 Watchers
  • 4 Stars
  • 3,145 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 21 % Grown

The README.md

Data Bindr Client

Project for integration with databindr (Hotel Mapping)., (*1)

Install

Composer

"alexandreo/data-bindr": "^1.0"

Integration documentation with the Databindr

https://www.databindr.com/#!/docs, (*2)

How to use


use Alexandreo\DataBindr\HotelBindr; $hotelBindr = new HotelBindr(['key' => 'PLACE YOUR SECURITY KEY HERE']); $requests = [ [ 'country_id' => 'USA',// u can send Alpha2, Alpha3 or Country Name. 'name' => 'RAMADA HIALEAH/MIAMI AIRPORT NORTH', 'address' => '1950 W 49TH STREET, HIALEAH, FLÓRIDA, ESTADOS UNIDOS DA AMÉRICA', 'category' => '***', 'town' => 'Miami', 'zip' => '33012' ], [ 'country_id' => 'USA',// u can send Alpha2, Alpha3 or Country Name. 'name' => 'RAMADA HIALEAH/MIAMI AIRPORT NORTH', 'address' => '1950 W 49TH STREET, HIALEAH, FLÓRIDA, ESTADOS UNIDOS DA AMÉRICA', 'category' => '***', 'town' => 'Miami', 'zip' => '33012' ], [ 'country_id' => 'USA',// u can send Alpha2, Alpha3 or Country Name. 'name' => 'RAMADA HIALEAH/MIAMI AIRPORT NORTH', 'address' => '1950 W 49TH STREET, HIALEAH, FLÓRIDA, ESTADOS UNIDOS DA AMÉRICA', 'category' => '***', 'town' => 'Miami', 'zip' => '33012' ] ]; $hotelBindrRequests = $hotelBindr->hotelbindr($requests); $hotelBindrRequests->each(function($hotelBindrRequest) { if ($hotelBindrRequest->isError()) { //show error echo $hotelBindrRequest->getErrorReason(); } else { //prints BIND ID echo $hotelBindrRequest->getBindId(); echo $hotelBindrRequest; //show request echo $hotelBindrRequest->getHotelBindrRequest()->getName(); } }); //or u can use foreach foreach ($hotelBindrRequests as $hotelBindrRequest){ if ($hotelBindrRequest->isError()) { //show error echo $hotelBindrRequest->getErrorReason(); } else { //prints BIND ID echo $hotelBindrRequest->getBindId(); echo $hotelBindrRequest; //show request echo $hotelBindrRequest->getHotelBindrRequest()->getName(); } }

Exemples

https://github.com/alexandreo/DataBindrClient/blob/master/exemples/, (*3)

The Versions

26/10 2017
06/07 2017

1.0

1.0.0.0

Api Integraton for https://www.databindr.com/#!/docs

  Sources   Download

MIT

The Requires

 

The Development Requires