libretime/api
jo ee98387264 feat(installer): rewrite install script
- remove unused root packages.ini
- write config to yaml file
- allow to set public_url during install
- force icecast start right after package install
- move config file in place at the end of installation

BREAKING CHANGE: The bash installer has been rewritten, the flags and
options changed, please run `./install --help` to get more details.
2022-06-08 23:23:08 +02:00
..
install/systemd feat(installer): rewrite install script 2022-06-08 23:23:08 +02:00
libretime_api feat: change config dir path to /etc/libretime 2022-06-08 23:23:08 +02:00
Makefile chore(api): format schema using prettier 2022-04-26 08:10:39 +02:00
README.md chore: rename vagrant devices (#1716) 2022-03-29 14:25:34 +02:00
packages.ini feat(api): replace uwsgi with gunicorn (#1785) 2022-04-25 16:09:19 +02:00
pyproject.toml chore(api): add mypy django stubs plugins (#1726) 2022-04-09 12:18:23 +02:00
requirements.txt fix(api): model_bakery is a dev dependency 2022-03-02 22:03:56 +02:00
setup.py chore(api): add mypy django stubs plugins (#1726) 2022-04-09 12:18:23 +02:00

README.md

LibreTime API

This API provides access to LibreTime's database via a Django application. This API supersedes the PHP API.

Deploying

Deploying in a production environment is done in the install script which installs LibreTime. This is how the API is installed in the Vagrant development images too. This method does not automatically reflect changes to this API. After any changes, the libretime-api systemd service needs restarting:

sudo systemctl restart libretime-api

Connections to the API are proxied through the Apache web server by default. Endpoint exploration and documentation is available from http://example.com/api/v2/schema/swagger-ui/, where example.com is the URL for the LibreTime instance.

Development

For a live reloading version within Vagrant:

vagrant up buster
# Run through the web setup http://localhost:8080
vagrant ssh buster
sudo systemctl stop libretime-api
sudo systemctl restart libretime-analyzer libretime-celery libretime-liquidsoap libretime-playout
cd /vagrant/api
sudo pip3 install -e .
sudo -u www-data LIBRETIME_DEBUG=True libretime-api runserver 0.0.0.0:8081

Unit tests can be run in the vagrant environment using

sudo -u www-data LIBRETIME_DEBUG=True libretime-api test libretime_api

3rd Party Licences

libretime_api/tests/resources/song.mp3: Steps - Tears On The Dancefloor (Album Teaser) by mceyedol. Downloaded from https://soundcloud.com/mceyedol/steps-tears-on-the-dancefloor-album-teaser released under a Creative Commons Licence (cc-by-sa-nc-sa)