Code Monkey home page Code Monkey logo

google-qpx-express-client-api-advanced's Introduction

Google QPX Express API Advanced - PHP, MySQL, MongoDB

Database configuration

/config.php

define('DB_TYPE', 'mysql'); // Database type
define('DB_HOST', 'localhost'); // Database host
define('DB_NAME', 'database_name'); // Database name
define('DB_USER', 'user_name'); // Database username
define('DB_PASS', 'password'); // Database password
define('DB_PREFIX','prefix'); // Prefix of the tables

Google QPX Express API Key

First of all you have to enter and login in https://console.developers.google.com/apis/dashboard. Then enter to "Library" on the left side of the page. Search 'QPX Express Airfare API' and enable it. Then, go to 'Credentials' click to 'Create Credentials'->'API Key' copy 'key' and click to the 'Restrict Key'.

/application/config/config.development.php

'GPX_API_KEY' => ''

MongoDB configuration

/application/config/config.development.php

'MONGODB_HOST' => '127.0.0.1:27017',
'MONGODB_NAME' => 'tickets_com',

Router configuration

/application/config/settings.php <?php $router->route('requested/url', 'controller/action');

Router regex

":a" => '(\w+)', // only alphabet 
":n" => '(\d+)', // only numeric
":slug" => '([a-z0-9_-]+)', // alpha-numeric and symbols - _
":page" => '([0-9]+)', // only number
":keyword" => '(.+)', // everthing
":request" => '([a-z0-9]{32})', // only alpha-numeric and max 32 characters

Also urls can be checked and passed to variables by router

$router->route('search/:request/:request', 'tickets/result', array('request', 'result_id'));

`search` is slug
`:request` - its will be checked and will be passed to variable by router. 
This variable can be called and used everywhere by `Router::get('request');

Insert Data to Databases


/application/libs/TicketsLogger.php

Request to GOOGLE QPX Express API


/application/libs/TicketAPI.php

public static function SearchTickets() {.....} // Request to API 
public static function simpleSlice(){.....} // Build slice 

Documentation will be published as soon as posibible

google-qpx-express-client-api-advanced's People

Contributors

teymur-mardaliyev avatar

Watchers

 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.