This documentation provides an overview of the YelpAPI
class and its methods, which are used to interact with the Yelp API.
The YelpAPI
class provides static methods to interact with various endpoints of the Yelp API. It includes methods for fetching business details, handling OAuth tokens, managing leads, posting lead events, and gathering daily reports.
The following environment variables are used by the YelpAPI
class and should be set in your environment:
YELP_AUTH_TOKEN
: The authentication token for accessing Yelp API.YELP_CLIENT_ID
: The client ID for Yelp OAuth.YELP_CLIENT_SECRET
: The client secret for Yelp OAuth.PUBLIC_URL
: The public URL of your application.
Fetches details of a business by its ID or alias.
Fetches OAuth token data using a callback code.
Fetches a new access token using a refresh token.
Fetches details of a lead by its ID.
Fetches events related to a lead by its ID.
Posts a new event for a lead.
Gathers daily reports for specified business IDs.
Fetches the result of a previously requested report.