spotilizer

command module
v0.0.0-...-a1716bb Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2020 License: MIT Imports: 19 Imported by: 0

README ΒΆ

🎢 spotilizer

Build Status GitHub license golangci-lint Maintenance made-for-VSCode

Study golang through using Spotify API and Redis.

A small project which aims to help managing personal Spotify lists and tracks, but mostly to do what I love to do and study Go in the process.

Came to my mind that I could find this useful, having a history/snapshots of my Spotify Data, because a lot of times it hapens that I screw up my lists (by removing a song from fav songs list), without ability to undo the operation, and also not remembering the name of the removed song. Sadly, Spotify Desktop/Browser Client App does not have undo for that operation. Also, in the future, it can be made to transfer playlists from other Music Services like Deezer, YouTube, etc.

πŸ”§ Install & Run

1⃣ Set Spotify App

Make sure you have a Spotify App, through which spotilizer interacts with Spotify API. That goes out of this scope, so not gonna explain that here. It's all nicelly explained at this location:

https://developer.spotify.com/documentation/web-api/

After Spotify App is created, now we need to 2 set env. variables like so:

export SPOTIFY_CLIENT_ID=<your_spotify_app_client_id_here>
export SPOTIFY_CLIENT_SECRET=<your_spotify_app_client_secret_here>
2⃣ Redis - install and start service

Make sure Redis is installed, up and running. See: https://redis.io/

Maybe more convenient, you can also install and run it using brew:

brew install redis

Then just run the service :

brew services start redis

Spotilizer uses default Redis setup, so just starting the service is enough.

3⃣ Get Spotilizer

Make sure golang is properly installed and set: https://golang.org/doc/install

go get github.com/2beens/spotilizer`
cd $GOPATH/src/github.com/2beens/spotilizer`
go get ./...

Next, we need to get frontend dependencies via PMS yarn, which should be installed on your machine: https://yarnpkg.com/en/docs/install

We are still in the spotilizer project dir, now run:

yarn install
4⃣ Run Spotilizer
go install
spotilizer

By default, logger output is terminal (can be changed to file. see source code main.go for more info).

5⃣ Web Client

πŸ‘‰ Open browser (Chrome, ofc) and go to: http://localhost:8080

πŸ‘‰ Click at just about anything you see there πŸ’₯

πŸ‘‰ Observe terminal output for what happens in the server

πŸ”Ž Testing, Static code analysis ...

Linter

golangci-lint is used. Make sure it's installed: GolangCI Lint Installation.

Run it like so:

golangci-lint run
Unit Tests

Still work in progress, thus not many unit tests exists. Nevertheless:

go test -v -cover ./...

Documentation ΒΆ

The Go Gopher

There is no documentation for this package.

Directories ΒΆ

Path Synopsis

Jump to

Keyboard shortcuts

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