CoolMusicApp

command module
v0.0.0-...-43c3cf6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 4, 2023 License: MIT Imports: 2 Imported by: 0

README ΒΆ

Cool Music App! - Challenge application for Spotify API

Description

The application connects to the Spotify developer API in order to extract metadata via a unic Spotify ID related to a song, afterwards the application stores it on a SQLite database for further usage

the application is divided into 3 routes

  1. Post - ISRC: The route gets data from the API and saves it on the local database

  2. GET By ISRC: Get a perfect match on the local database

  3. GET LIKE: Get any matches by song name on the local database

Requirements

1 - Have a Spotify development API KEY 2 - Have a SQL Server instance running either on your env or the cloud to connect 3 - Have the latest version of Golang installed

In order to run the app follow the next steps

  1. Clone the repository
git clone https://gitlab.com/vozy/go-vozyengine-hangup-manager.git
  1. Get and compile dependencies
go mod tidy
  1. Set your env keys on a .env file using the following key names (the .env file must be on your project root / also in your test/unit folder if you want to run tests properly)
SPOTIFY_CLIENT_ID="<YOUR SPOTIFY CLIENT ID>"
SPOTIFY_CLIENT_KEY="<YOUR SPOTIFY CLIENT SECRET KEY>"
APP_PORT=8080
  1. Run the project! or build it and run the compiled!
go run main.go
go build
./CoolMusicApp

Test

  1. To run tests go to, /test/unit and run the default test command
cd ./test/unit
go test  || go test -run ''

πŸ”ŽπŸ”ŽπŸ”ŽπŸ”ŽπŸ”ŽπŸ”ŽπŸ”ŽπŸ”ŽπŸ”ŽπŸ”ŽπŸ”ŽπŸ”ŽπŸ”ŽπŸ”ŽπŸ”ŽπŸ”ŽπŸ”ŽπŸ”ŽπŸ”ŽπŸ”ŽπŸ”ŽπŸ”ŽπŸ”ŽπŸ”ŽπŸ”ŽπŸ”ŽπŸ”ŽπŸ”ŽπŸ”ŽπŸ”ŽπŸ”ŽπŸ”Ž

You can explore the Postman collection and documentation here: https://documenter.getpostman.com/view/3678249/2s9Y5WyPUr

Author

Andrew Alizaga

Main dependencies

Golang Version v1.20 Gin Version v1.9.1 Godotenv Version v1.5.1 GORM / SQLITE Version v1.5.3 zmb3 - Spotify library Version v1.3.0

Documentation ΒΆ

The Go Gopher

There is no documentation for this package.

Directories ΒΆ

Path Synopsis
internal
orm

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL