Accessor: services/SemanticYelpSearch

services/SemanticYelpSearch

Perform a Yelp search for local businesses using the Yelp API https://www.yelp.com/developers/documentation/v3/business_search

The full Yelp API allows many parameters for searching for business. This accessor demonstrates a simple query for a particular type of business near specific geographic coordinates.

This accessor extends the YelpSearch accessor to produce a schema.org compatible Turtle ontology. Since schema.org is a linked data ontology, additional information about the ontology can be found by checking out the URIs in the output.

Version:
  • $$Id: SemanticYelpSearch.js 1725 2017-05-19 22:59:11Z cxh $$
Author:
  • Matt Weber
Source:
Inputs:
Name Type Description
searchTerm string The variety of local business to search for (eg. "Restaurants").
latitude number First part of coordinates for local business search. Defaults to UC Berkeley's coordinates.
longitude number Second part of coordinates for local business search. Defaults to UC Berkeley's coordinates.
trigger An input to trigger the search.
Outputs:
Name Type Description
ready boolean WARNING: Triggers may not work correctly before this output has been produced. This accessor produces true on this output when it has successfully loaded its API key and is ready for queries. If this accessor is acquring its API key asynchronously, this may occur after initialization has completed.
semanticObservation The YelpSearch results presented as a turtle ontology.
Parameters:
Name Type Description
getAPIKeySynchronously boolan Not all hosts support synchronous or asynchronous file reading. specify the right mode for this accessor's host here.
APIKey string An authentication token provided by Yelp for using their API. See https://www.yelp.com/developers/documentation/v3/authentication.
expirationPeriod number The duration of time (in milliseconds) from receiving the Yelp response in this accessor after which the observation output on semanticObservation should no longer be considered accurate and is safe to remove from a semantic repository.
timeout int The amount of time (in milliseconds) to wait for a response before triggering a null response and an error. This defaults to 5000.

Members

(inner) N3

Set up the accessor by defining the inputs and outputs.

Source: