Skip to content

adrienschuler-zz/headbang

Repository files navigation

🤘 HEADBANG 🤘

Where the f!ck can I HEADBANG tonight?!

Concept

Generate personalized playlists from incoming concerts in your town and recommend events based on your tastes.

Stack

Configuration

Rename the apis.yml.template file in apis.yml and add your APIs keys (required by the crawler):

foursquare:
  client_id:
  client_secret:
facebook:
  app_id:
  app_secret:
  access_token:
google:
  api_key:

Also rename the storage.yml.template file in storage.yml.

Install

Start the stack with docker compose:

docker-compose up

This will setup:

Or install the API locally with Python 3.6.4 on OSX:

brew install pyenv
CFLAGS="-I$(brew --prefix openssl)/include" \
LDFLAGS="-L$(brew --prefix openssl)/lib" \
pyenv install -v 3.6.4
virtualenv -p ~/.pyenv/versions/3.6.4/bin/python venv
source venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt

Setup Elasticsearch mappings:

./bin/setup_elasticsearch_mappings.sh

Start the Headbang API using Gunicorn HTTP server:

gunicorn --bind 0.0.0.0:5000 server:app --reload --log-level debug

Crawler

Bootstrap Elasticsearch indices by scrapping Foursquare and Facebook APIs:

python crawler.py -h
python crawler.py --foursquare_venues
python crawler.py --facebook_events

API

Places

HTTP Verb API Endpoint Description
GET /places?size=10&fields=lat,lng,fbid Get Foursquare Places ranked by popularity
POST /places

Events

HTTP Verb API Endpoint Description
GET /events?size=10 Get Facebook Events
POST /events

About

Music events recommendation engine

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published