Giter Site home page Giter Site logo

spotify's Introduction

Setup

The Spotify service is currently in a development mode and was not yet approved by Spotify. In order to use the service:

  1. Create an app in Spotify Developer dashboard https://developer.spotify.com/dashboard/
  2. Open newly created app and add client id and client secret from the Dashboard to config.cfg file in the Spotify Service
  3. In the app in the Dashboard, select "Edit Settings" and set redirect_uri to 'http://localhost:8888/'. Save it
  4. Select "Users and access" and add a Spotify account.

More information about development mode for Spotify apps can be found at https://developer.spotify.com/community/news/2021/05/27/improving-the-developer-and-user-experience-for-third-party-apps/

In addition, the service requires Beautiful Soup, spotipy, requests, sys packages installed.

Running the service

To start a server locally in terminal enter the command: python3 spotify_service.py

Endpoints

Endpoint for getting top tracks per genre from Beatport that also exist on Spotify: Request method: GET Endpoint: http://127.0.0.1:5000/get_top_tracks Parameter: genre Example: http://127.0.0.1:5000/get_top_tracks?genre=house Returns: top tracks as JSON objects array

Endpoint for creating a playlist on Spotify with top tracks per genre from Beatport that also exist on Spotify: Request method: POST Endpoint: http://127.0.0.1:5000/playlist Parameter: genre Example: http://127.0.0.1:5000/playlist?genre=house

Supported genres by the service: 'house' 'deep-house' 'afro-house' 'breaks-breakbeat-uk-bass' 'bass-club' 'bass-house' '140-deep-dubstep-grime' 'dance-electro-pop' 'dj-tools' 'drum-bass' 'dubstep' 'electro-classic-detroit-modern' 'electronica' 'funky-house' 'hard-dance-hardcore' 'hard-techno' 'indie-dance' 'jackin-house' 'mainstage' 'melodic-house-techno' 'minimal-deep-tech' 'nu-disco-disco' 'organic-house-downtempo' 'progressive-house' 'psy-trance' 'tech-house' 'techno-peak-time-driving' 'techno-raw-deep-hypnotic' 'trance' 'trap-wave' 'uk-garage-bassline'

spotify's People

Contributors

rautskaa avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.