https://github.com/2beens/spotilizer
Study Go through using Spotify API & Redis to manage personal playlists, tracks, etc. :flashlight:
https://github.com/2beens/spotilizer
api go golang server spotify web
Last synced: 5 months ago
JSON representation
Study Go through using Spotify API & Redis to manage personal playlists, tracks, etc. :flashlight:
- Host: GitHub
- URL: https://github.com/2beens/spotilizer
- Owner: 2beens
- License: mit
- Created: 2019-05-09T21:50:25.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2020-04-30T07:19:47.000Z (about 6 years ago)
- Last Synced: 2024-04-14T09:13:52.172Z (about 2 years ago)
- Topics: api, go, golang, server, spotify, web
- Language: Go
- Homepage:
- Size: 744 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# :notes: spotilizer
[](https://travis-ci.com/2beens/spotilizer)
[](https://github.com/Naereen/StrapDown.js/blob/master/LICENSE)

[](https://GitHub.com/Naereen/StrapDown.js/graphs/commit-activity)
[](https://code.visualstudio.com/)
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.
## :wrench: Install & Run
### :one: 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:
```sh
export SPOTIFY_CLIENT_ID=
export SPOTIFY_CLIENT_SECRET=
```
### :two: 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`:
``` sh
brew install redis
```
Then just run the service :
``` sh
brew services start redis
```
Spotilizer uses default Redis setup, so just starting the service is enough.
### :three: Get Spotilizer
Make sure `golang` is properly installed and set: https://golang.org/doc/install
``` sh
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:
``` sh
yarn install
```
### :four: Run Spotilizer
``` sh
go install
spotilizer
```
By default, logger output is terminal (can be changed to file. see source code `main.go` for more info).
### :five: Web Client
:point_right: Open browser (Chrome, ofc) and go to: http://localhost:8080
:point_right: Click at just about anything you see there :collision:
:point_right: Observe terminal output for what happens in the server
## :mag_right: Testing, Static code analysis ...
#### Linter
`golangci-lint` is used. Make sure it's installed: [GolangCI Lint Installation](https://github.com/golangci/golangci-lint#install).
Run it like so:
``` sh
golangci-lint run
```
#### Unit Tests
Still work in progress, thus not many unit tests exists. Nevertheless:
``` sh
go test -v -cover ./...
```