jbnilles / HFSapi

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Historic Fantasy Sports API

Week 7 Team Week C# API Project for Epicodus, November 2nd, 2020

By Mike Manchee, Daniel Schaaf, Joseph Nilles, and Jeff Dinsmore

Description

This Project is a Historical Fantasy Sports API. The Project has full CRUD functionality as well as Token Authentication (database security), and Swagger (API documentation). The API with also be searchable and have a random parks feature.

Specs

Spec Input Output
1. ... ... ...

Setup/Installation Requirements

Project from GitHub

  • Download option

    • Download files from GitHub repository by click Code and Download Zip
    • Extract files into a single directory
    • Run GitBASH in directory
    • Type "dotnet restore" to get bin and obj files
    • Type "dotnet run" in GitBash to run the program
    • Add database per the instructions below.
    • Have fun with HFS API
  • Cloning options

    • For cloning please use the following GitHub tutorial
    • Place files into a single directory
    • Run GitBASH in directory
    • Type "dotnet restore" to get bin and obj files
    • Type "dotnet run" in GitBash to run the program
    • Add database per the instructions below.
    • Have fun with HFS API

Database Setup

  • Go to appsettings.json and change the password if needed.

  • Setup with SQL migrations

    • In the terminal, navigate to the project folder
    • Type "dotnet ef migrations add Initial" and wait for migration file to be built
    • Type "dotnet ef database update" and wait for build confirmation

API Second Application

Authentication Token

{
  "Username": "test",
  "Password": "test"
}
  • Click Send and copy the token
  • Open a new tab, click the Authorization tab, Select 'Bearer Token' from the drop down, and paste the token into Token.
  • You are now able to access this API from Postman.

Swagger

  • Type "dotnet watch run"
  • Paste URL in browser "http://localhost:5000/swagger/"
  • After getting your token, click on the Authorize button Authorize
  • Paste in your token and close
  • Explore API

Known Bugs

No Known Bugs

Technologies Used

Project Specifics

  • C# API

Main Programs

Other Links

GitHub Mike's GitHub
LinkedIn

License

Copyright (c) 2020 {Mike Manchee, Daniel Schaaf, Joseph Nilles, and Jeff Dinsmore} Licensed under MIT

About


Languages

Language:C# 100.0%