##About
Pearson's eyewitness api details here
$ npm install eyewitness
Searches the Eyewitness Guides for information based on the search criteria, returning the results in the requested format.
var params = {
q: 'queen'
, apikey: 'Your Key'
};
var guidebook = 'london'
eyewitness.guide(params, guidebook ,function (err, data) {
if(err){
console.log('-> testGuide ERROR');
}
else {
console.log('-> testGuide OK');
};
});
Searches the Eyewitness Guides for information based on the search criteria with additional filters, returning the results in the requested format. This is the same API as Search for Entries, with additional parameters
var params = {
q: 'queen'
, category: 'Restaurants'
, entry_type: 'chapters'
, apikey: 'Your Key'
};
var guidebook = 'london'
eyewitness.guideWithFilter(params, guidebook, function (err, data) {
if(err){
console.log('-> testGuideWithFilter ERROR');
}
else {
console.log('-> testGuideWithFilter OK');
}
});
Lists the categories of entries available in the Eyewitness Guides, returning a list in the requested format.
var params = {
apikey: 'Your Key'
};
var guidebook = 'london'
eyewitness.guideCategories(params, guidebook, function (err, data) {
if(err){
console.log('-> testGuideCategories ERROR');
}
else {
console.log('-> testGuideCategories OK');
}
});
Lists the entries for a specified category from the Eyewitness Guides, returning a list in the requested format. If you need to find entries in multiple categories, use the more powerful List Entries with Filters
var params = {
apikey: 'Your Key'
};
var categoryName = 'Museums'
var guidebook = 'london'
eyewitness.guideEntriesInCategories(params, guidebook, categoryName, function (err, data) {
if(err){
console.log('-> testGuideEntriesCategories ERROR');
}
else {
console.log('-> testGuideEntriesCategories OK');
}
});
Searches the Eyewitness Guides for information based on a given geolocation. The nearest 25 matches are returned, in the requested format.
var params = {
lon: '0.1062'
, lat: '52.5171'
, apikey: 'Your Key'
};
var guidebook = 'london'
eyewitness.geosearchForEntries(params, guidebook, function (err, data) {
if(err){
console.log('-> testGeosearchEntries ERROR');
}
else {
console.log('-> testGeosearchEntries OK');
}
});
Searches the Eyewitness Guides for information based on a given geolocation and additional filters. The nearest 25 matches are returned, in the requested format.
var params = {
lon: '0.1062'
, lat: '51.5171'
, apikey: 'Your Key'
, category: 'Pubs_And_Bars'
};
var guidebook = 'london'
eyewitness.geosearchForEntriesWithFilters(params, guidebook, function (err, data) {
if(err){
console.log('-> testGeosearchFilters ERROR');
}
else {
console.log('-> testGeosearchFilters OK');
}
});
Retrieves a specific entry from the Eyewitness Guides, returning the results in the requested format.
var params = {
apikey: 'Your Key'
};
var entryId = 'EWTG_LONDON168STGIL_002'
var guidebook = 'london'
eyewitness.entryFromGuide(params, guidebook, entryId, function (err, data) {
if(err){
console.log('-> testEntryGuide ERROR');
}
else {
console.log('-> testEntryGuide OK');
}
});