Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alitayfur/tripadvisor
tripadvisor php class
https://github.com/alitayfur/tripadvisor
Last synced: 3 months ago
JSON representation
tripadvisor php class
- Host: GitHub
- URL: https://github.com/alitayfur/tripadvisor
- Owner: alitayfur
- Created: 2017-07-08T18:53:10.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-07-08T19:32:55.000Z (over 7 years ago)
- Last Synced: 2024-08-01T19:53:06.564Z (6 months ago)
- Language: PHP
- Size: 10.7 KB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome - alitayfur/tripadvisor - tripadvisor php class (PHP)
README
# TRIPADVISOR API SAMPLE CLASS WITH PHP
![tripadvisor](https://static.tacdn.com/img2/langs/tr/branding/rebrand/TA_logo_primary_v2.svg)
# API Description
Approved users of the TripAdvisor Content API can access the following business details for accommodations, restaurants, and attractions:Location ID, name, address, latitude & longitude
Read reviews link, write-a-review link
Overall rating, ranking, subratings, awards, the number of reviews the rating is based on, rating bubbles image
Price level symbol, accommodation category/subcategory, attraction type, restaurant cuisine(s)# Config
private $config = [
'root' => 'data', // query cache folder
'cache_time' => (60*24), // query cache time
'key' => '', // partner key
'v' => '2.0', // version
'url' => 'http://api.tripadvisor.com/api/partner/',
'comment' => true
];# Using
getQuery($template,$value,$query='',$type='')$template = (map|location|location_mapper) [Documentation](https://developer-tripadvisor.com/content-api/documentation/)
$type = (hotels|restaurants|Attractions) [Content API](https://developer-tripadvisor.com/content-api/business-content/categories-subcategories-and-types/)
$ta = new tripadvisor();
$data = $ta->getQuery('map','36.544493,31.987939');
$data = $ta->getQuery('location','89575','','hotels');
$data = $ta->getQuery('location_mapper','37.857257,27.247885',['q'=>'otel Carina']);
$data = $ta->getHotels('37.857257,27.247885','otel Carina');