Methods
getJSON(url, options) → {Promise}
A Promise based XHR function to get JSON data from external APIs
Browser compatibility: Chrome, Edge, Firefox, Opera, Safari
Internet Explorer does not support the Promise object natively
Inspired by Chris Ferdinandi's atomic plugin:
Parameters:
| Name |
Type |
Description |
url |
String
|
The request URL |
options |
Object
|
A set of options for the request |
- Source:
- See:
-
Returns:
- The XHR request Promise
-
Type
-
Promise
Type Definitions
Hotels
Type:
Properties:
| Name |
Type |
Description |
name |
string
|
Name of hotel |
id |
string
|
Yelp business ID |
twitter |
string
|
Twitter screen name |
location |
object
|
Hotel coordinates
Properties
| Name |
Type |
Description |
lat |
number
|
Latitude |
lng |
number
|
Longitude |
|
diamonds |
number
|
Diamond rating of hotel |
- Source: