# README
Smash Bros GO API
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
- Clone the Project:
git clone https://github.com/jameschenn/smashbrosgo-api.git
- Download Dependencies:
go mod tidy
-
Create Postgresql database. I personally used and love using Supabase
-
Create .env file with PORT and DATABASE variables
PORT=3000
DATABASE={YOUR DATABASE CREDENTIALS}
- Migrate tables to database
go run migrations/migrations.go
- Seed Database
go run seeders/seed.go
- 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