Giter Club home page Giter Club logo

expedia-php-api's Introduction

Expedia-PHP-API

PHP Wrapper for Expedia API

Official API documentation can be found here: http://developer.ean.com/docs/

For usage examples please take a look at source code of example.php file.

Methods

  • __construct( $cid, $key ) - constructs expedia api instance based on client id and api key
  • getHotelList - get hotels list ( doc: http://developer.ean.com/docs/hotel-list/ )
  • getHotelInfo - retrieve single hotel details ( doc: http://developer.ean.com/docs/hotel-info/ )
  • getAvailableRooms - retrieve available rooms for given hotel ( doc: http://developer.ean.com/docs/room-avail/ )
  • getPaymentOptions - retrieve supported payment methods ( doc: http://developer.ean.com/docs/payment-types/ )
  • set_method - set method to call api (GET or POST)
  • set_protocol - set prefix for api url ('http://' or 'https://book.')
  • set_minor_rev - set minimal api version
  • set_locale - set preferred locale which will be used to return results
  • set_currency_code - set currency for results (can be USD, AUD, RUR etc..)
  • set_customer_session_id - set unique customer session, required by api
  • set_customer_ip_address - set customer ip address
  • set_customer_user_agent - set customer user agent
  • set_sig - if you're using signature authentication, then set this
  • * - if you want to use an api method which is not implemented in this wrapper - then simply call it by name and it will be translated to api method call. Example: lets assume that we want to call method rules (http://developer.ean.com/docs/rate-rules/). Then we need to check method name in documentation. We go to documentation page and look for method REST URL and get last part (after v3/) from it. In our case it is rules. Then we simply call it like: $hotelRules = $this->rules(array('hotelId' => 123, ...));.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.