Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restaurant Review API #53

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

mikec2020
Copy link

To run the project, publish the RestaurantReviewsDatabase project to an instance of SQL Server. Update the RestaurantReviewsDatabase connection strings in the appsettings.json and appsettings.Development.json files in the RestaurantReviews.Web project with the server and database name. Then start the RestaurantReviews.Web project in Debug from Visual Studio.

There is a Swagger UI at the root of the web to interact with the API methods.

The Restaurants GET method returns a list of all restaurants in the database for the specified city. Values for the city parameter that will return data are "Pittsburgh" and "Bridgeville". If the city parameter isn't provided, all restaurants are returned.

The Restaurants POST method creates a new restaurant. The restaurant name, address, city, state, and zip code are required.

The Reviews POST method creates a new restaurant review. The restaurantId, userId, and the content of the review are required. Possible values for restaurantId are 1, 2, 3, and 4. Possible values for userId are 1 and 2.

The Reviews DELETE method marks the restaurant review specified by parameter reviewId as deleted.

The UserReviews GET methods returns all active restaurant reviews for the user specified by the userId parameter or the username parameter. Values for the userId parameter that will return data are 1 and 2. Values for the username parameter that will return data are "testuser1" and "testuser2".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant