Where the f!ck can I HEADBANG tonight?!
Generate personalized playlists from incoming concerts in your town and recommend events based on your tastes.
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.
Start the stack with docker compose:
docker-compose up
This will setup:
- An Elasticsearch single node cluster
- The Cerebro Elasticsearch admin
- The Kibana Sense console
- The Flask API
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
Bootstrap Elasticsearch indices by scrapping Foursquare and Facebook APIs:
python crawler.py -h
python crawler.py --foursquare_venues
python crawler.py --facebook_events
HTTP Verb | API Endpoint | Description |
---|---|---|
GET |
/places?size=10&fields=lat,lng,fbid | Get Foursquare Places ranked by popularity |
POST |
/places |
HTTP Verb | API Endpoint | Description |
---|---|---|
GET |
/events?size=10 | Get Facebook Events |
POST |
/events |