The content API is implemented as an HTTP REST service and uses tokens for authentication.
The base URL for all requests is https://api.hotelwifitest.com/content/v1/.
Every HTTP request should contain an Authorization header with the word Token, followed by a space and a token string.
GET /content/v1/hotels/?page_size=10 HTTP/1.1
Host: api.hotelwifitest.com
Accept: application/json
Authorization: Token YXSmIlNLA2qyk6NXUTXYsCanG9DFq78zi7NjYmD
curl -H "Authorization: Token YXSmIlNLA2qyk6NXUTXYsCanG9DFq78zi7NjYmD" https://api.hotelwifitest.com/content/v1/hotels/?page_size=10
You should have received your access token by email after your application for API access was approved. If you have not received the email or if you need a new access token, please contact us.
Returns a list of tested hotels with WiFi quality information in bulk. The information should be stored in your own database and presented to users when needed. Remember to refresh your database by calling this method at least once a week.
This main use case is to call this method without any parameters for the first page and then to use the page number to iterate the list. You can request data only about specific hotels by adding a list of hotel IDs to the query parameters.
Query Parameters: | |
---|---|
|
|
Request Headers: | |
|
|
Response JSON Object: | |
|
Every element in the results array is a JSON object containing information about a hotel.
Response JSON Array of Objects (results): | |
---|---|
|
GET /content/v1/hotels/?page_size=2 HTTP/1.1
Host: api.hotelwifitest.com
Accept: application/json
Authorization: Token YXSmIlNLA2qyk6NXUTXYsCanG9DFq78zi7NjYmD
curl -H "Authorization: Token YXSmIlNLA2qyk6NXUTXYsCanG9DFq78zi7NjYmD" https://api.hotelwifitest.com/content/v1/hotels/?page_size=2
{
"count": 13493,
"next": "http://api.hotelwifitest.com/content/v1/hotels/?page=2",
"previous": null,
"results": [
{
"id": 83510,
"ean_id": 239056,
"tripadvisor_id": 502385,
"name": "Yasmin Bodrum Resort",
"url": "/hotels/tr/bodrum/yasmin-bodrum-resort-all-inclusive/",
"full_address": "Kadikalesi Mevkii Turgutreis, Bodrum 48800, Turkey",
"expected_speed": 1.57154592426138,
"percentile_rank": 36.309077269,
"confidence": 15.5198397360193,
},
{
"id": 40235,
"ean_id": 121592,
"tripadvisor_id": 86186,
"name": "Courtyard St. Petersburg Clearwater",
"url": "/hotels/us/clearwater/courtyard-by-marriott-clearwater/",
"full_address": "3131 Executive Dr, Clearwater, FL 33762, United States",
"expected_speed": 1.57155381050265,
"percentile_rank": 36.316579144,
"confidence": 4.28571428571428,
}
]
}
© 2013-2016 Hotel WiFi Test Inc.