Giter VIP home page Giter VIP logo

travel-payouts's Introduction

Travel Payouts PHP SDK

Codeship Status for thewulf7/travel-payouts

Installation

###Composer

composer require thewulf7/travel-payouts

or add to your composer.json file, in the "require" section

"thewulf7/travel-payouts": "1.1.*"

##Usage

First of all create main Travel object and pass your token in it

use thewulf7\travelPayouts\Travel; 

$travel = new Travel('YOUR TOKEN HERE');

Then you can use it get different services

###Tickets service

$ticketService = $travel->getTicketsService();
//Get flights found by our users in the last 48 hours from LED to MOW. Return array consists of thewulf7\travelPayouts\Ticket objects.
$flights = $ticketService->getLatestPrices('LED', 'MOW', false, 'rub', 'year', 1, 10);

See documentation

###Flight service

$flightService = $travel->getFlightService();
$flightService
       ->setIp('127.0.0.1')
       ->setHost('aviasales.ru')
       ->setMarker('123')
       ->addPassenger('adults', 2)
       ->addSegment('LED', 'MOW', '2016-02-01');
$searchData    = $flightService->search('ru', 'Y');
$searchResults = $flightService->getSearchResults($searchData['search_id']);

###Partner service

$partnerService = $travel->getPartnerService();
//get user balance and currency of the balance
list($balance, $currency) = $partnerService->getBalance();

###Data service

$dataService = $travel->getDataService();
//get all airports in the system
$airports    = $dataService->getAirports(); 

travel-payouts's People

Contributors

thewulf7 avatar fortis avatar

Watchers

James Cloos avatar  avatar

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.