An ASP.NET Core Web API that allows users to access data about the United States National Parks.
- Click here to download a .NET Core SDK from Microsoft Corp.
- Click here to download the 64-bit .NET Core SDK from Microsoft Corp.
Enter the command dotnet tool install -g dotnet-script
in Terminal (macOS) or PowerShell (Windows).
Enter the following commands in Terminal (macOS) or PowerShell (Windows):
cd desktop
git clone https://github.com/kwicz/ParkFinder.Solution
cd ParkFinder.Solution
In your terminal, type the following commands to make sure all necessary packages are included in the project and to launch in your browser:
cd ParkFinder
dotnet restore
dotnet build
Enter the following to update your database and tables for the program:
dotnet ef database update
In your terminal, type:
dotnet watch run
Hold command
while clicking the link in your local terminal to your local address, which should be:
http://127.0.0.1:5000
- Open MySQL WorkBench.
- Navigate to the
Schema
tab. - Right click on
k_wicz
and selectTable Data Import Wizard
. - Select
nationalParks.utf8.csv
from the root directory of the project and clickNext
. - Select
Use existing table
and from the drop down, selectk_wicz.parks
. ClickNext
. - Confirm the data is correct and click
Next
. - Confirm executing the import.
- Congratulations! You have a filled
parks
table that you can now query.
Once you have installed this program, you can use these endpoints on your local host in your browser.
Base URL: https://localhost:5000
GET /api/parks
POST /api/parks
GET /api/parks/{id}
PUT /api/parks/{id}
DELETE /api/parks/{id}
Parameter | Type | Description |
---|---|---|
name | string | Returns matches by park name. |
location | string | Returns all parks in specified location. |
dateEstablished | string | Returns all parks established on specified date. |
area | string | Returns all parks with specifed area. |
description | string | Returns all parks with specified description. |
https://localhost:5000/api/parks/?name=Epicodus&location=Portland&dateEstablished=January%201%2C%202010
You can explore these endpoints further after downloading this repo and exploring this API's Swagger Documentation.
No known bugs at this time.
Have a bug or an issue with this application? Open a new issue here on GitHub.
- C#
- .NET Core 2.2
- ASP.NET Core MVC
- MySQL 2.2.0
- MySQL Workbench 8.0
- EF Core 2.2.0
- Razor 2.2.0
- Swashbuckle 5.0.0
- Badlands Photography by Andreas Eckert
- National Parks CSV from Download Excel Files
Copyright (c) 2020 K Wicz