Giter VIP home page Giter VIP logo

parks.solution's Introduction

This project is not in a complete or portfolio ready state, and should not be considered representiational of professional work.

United States Parks Lookup API

Epicodus Independent Code Review - Building an API

By Collin Chapman

Technologies Used

  • Git
  • C#
  • .NET 5.0
  • ASP.NET Core
  • Entity Framework Core
  • RESTful Routing, CRUD
  • MySQL & MySQL Workbench
  • Swagger
  • Postman

Description

This is a C# API Framework application built to allow users to make API calls to find National and State parks in the United States. Furthermore, you can query this API by location (e.g. "Oregon") or type (e.g. "National").

Setup/Installation Requirements

  • Requires Visual Studio Code Installation
  • Requires Terminal Installation
  • Open the terminal on your local machine
  • Navigate to the directory inside of which you wish to house this project
  • Clone this project with the following command $ git clone <https://github.com/colchapm/Parks.Solution.git>
  • Next you will need to download and install .NET Core through this link if you don't already have it: https://dotnet.microsoft.com/download
  • After downloading and installing .NET Core, return to your terminal and navigate to the root directory by entering $ cd Parks.Solution
  • Open this project in Visual Studio Code with the command $ code .
  • Still in the terminal, navigate to the desired subdirectory of the repository with the command $ cd Parks
  • Retrieve and install packages listed in the .csproj files with the command $ dotnet restore
  • Create internal content for build with the command $ dotnet build
  • In Visual Studio Code, navigate to the Parks directory and create an appsettings.json file and input the following script (note the name of the database can be whatever you would like (e.g. collin_chapman_test)) Image of appsettings.json example
  • If you do not have MySQL Workbench, it can be downloaded here: https://dev.mysql.com/downloads/file/?id=484391
  • Create Initial SQL migration with the following command $ dotnet ef migrations add Initial
  • _Update the database in MySQL Workbench with the following command $ dotnet ef database update (note this will title the database whatever you listed in your appsettings.json file (e.g. collin_chapman_test)) _
  • _Back in the terminal, navigate to $ cd Parks and run the application with the command $ dotnet run

Documentation

CRUD Structure

GET /api/parks
GET /api/parks/{id}
POST /api/parks
PUT /api/parks/{id}
DELETE /api/parks/{id}

This project also has an additional endpoint to find and return a random park from the database

GET /api/parks/random

Example Query

GET /api/parks/?location=oregon

Swagger

This project utilizes full swagger documentation that can be found here: https://app.swaggerhub.com/apis-docs/colchapm/ParksApi/0.1

Image of swagger documentation

Known Bugs

No known bugs at this time

Improvement Opportunities

  • Eventually have all National and State parks included in the database
  • Create an MVC application that interacts with the API

Link

This project is not hosted on GitHub Pages

License

Copyright (c) 2021 Collin Chapman

This software is licensed under the MIT license

Contact Information

[email protected]

parks.solution's People

Contributors

colchapm avatar

Watchers

 avatar

Forkers

faisalrana

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.