Categorygithub.com/jameschenn/smashbrosgo-api
modulepackage
0.0.0-20240606011255-69143fbfbb86
Repository: https://github.com/jameschenn/smashbrosgo-api.git
Documentation: pkg.go.dev

# README

Smash Bros GO API

Material Bread logo

Smash Bros GO API is a RESTful API built with everyone's favorite gopher language GO aka Golang , the Gin Web Framework, GORM ORM, and a PostgreSQL database. Using this API you can get information on fighters from Super Smash Bros. Ultimate. In the words of Masahiro Sakurai, EVERYONE IS HERE

Getting Started

  1. Clone the Project:
git clone https://github.com/jameschenn/smashbrosgo-api.git
  1. Download Dependencies:
go mod tidy
  1. Create Postgresql database. I personally used and love using Supabase

  2. Create .env file with PORT and DATABASE variables

PORT=3000
DATABASE={YOUR DATABASE CREDENTIALS}
  1. Migrate tables to database
go run migrations/migrations.go
  1. Seed Database
go run seeders/seed.go
  1. Run the API:

[!NOTE] CompileDaemon watches your .go files in a directory and invokes go build if a file changed.

CompileDaemon -command="./smashbrosgo-api"

Routes

GET Fetch All Characters

http://localhost:3000/characters

GET Fetch Character by ID

http://localhost:3000/characters/{ID}

POST Create Character

http://localhost:3000/characters
  {
      "Name": "James Chen",
      "Series": "James Chen",
      "FirstAppearance": "Earth",
      "Description": "test",
      "Tier": "S",
      "Weight": 160,
      "Speed": 3.33,
      "NeutralB": "Code",
      "UpB": "Rising Collaboration",
      "SideB": "Strong Communication",
      "DownB": "Critical Thinking Charge",
      "Final_Smash": "Got the Job!!",
      "Image_URL": "https://avatars.githubusercontent.com/u/73676915?v=4"
  }

UPDATE Edit Character by ID

http://localhost:3000/characters/{ID}
{
    "Tier": "S+"
}

DELETE Delete Character by ID

http://localhost:3000/characters/{ID}

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author