A RESTful web API that returns information about restaurants
Businesses.DataAccess
- Interfaces and data classes + a service implementation that uses the Yelp API.Businesses.DataAccess.Tests
- Tests for theBusinesses.DataAccess
project.Businesses.WebApi
- A simple web API that uses the service provided by theBusinesses.DataAccess
project to service requests.Businesses.WebApi.Tests
- Tests for theBusinesses.WebApi
project. (Currently WIP)
The WebApi project uses the dotnet secrets manager to store the Yelp API key and its own authorization key, which is required when calling its end points.
From the terminal:
- Navigate to the
Businesses.WebApi
project directory. - Run
dotnet user-secrets set "YelpSettings:ApiKey" "[YelpApiKey]"
- Run
dotnet user-secrets set "WebApiSettings:ApiKey" "[InternalApiKey]"
Run all tests by executing dotnet test
in the root directory.
Swagger docs are available at:
https://localhost:7055/swagger/index.html
Retrieve specific restaurant details:
https://localhost:7055/api/restaurants/G0AB4-VN3v_Qd-icr8BfEg
Search for matching restaurants:
https://localhost:7055/api/restaurants?location=New%20York%20City&term=sushi