julienfullstack / AnimalShelterAPI.Solution

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Animal Shelter API

By: _Julien Lenaz

A website for an animal shelter api listing the cats and dogs of the shelter

Technologies Used

  • C#
  • MSTest
  • Git
  • Visual Studio Code
  • ASP.NET Core MVC
  • MySQL
  • Razor

Description

_An api which calls stores information regarding available cats and dogs to adopt. _

Setup/Installation Requirements

  • Clone this respository to your desktop_
  • Navigate to the top level of the directory_
  • Open in your code editor_
  • Create a file named "appsettings.json" in the PierresTreats directory with the following code, replacing the "YOUR" statements with applicable information:
     {
       "ConnectionStrings": {
           "DefaultConnection": "Server=localhost;Port=3306;database=YOUR-DATABASE-NAME;uid=YOUR-USERNAME;pwd=YOUR-MYSQL-PASSWORD;"
       }
     }
  • Create the database using the migrations in the project. Open your shell and run [dotnet ef database update].
  • Within the directory "AnimalShelterApi", run dotnet watch run --launch-profile "AnimalShelterApi-Production" to start the project with a watcher.
  • Start the project in development mode with dotnet watch run in the terminal in the "AnimalShelterApi" directory".
  • Using program of your choice to make API calls, use the domain http://localhost:5000.

API Documentation

Endpoints

Base URL: https://localhost:5000

HTTP Request Structure

GET /api/animals
POST /api/animals
GET /api/animals/{id}
PUT /api/animals/{id}
DELETE /api/animals/{id}
GET /api/animals/random
GET /api/v1/stringlist
GET /api/v2/stringlist/

Known Bugs

  • No known bugs.

License

MIT

Copyright (c) 2023 Julien Lenaz

About


Languages

Language:C# 100.0%