# dsp-api
DSP is digital service provider.
Actually this is proxy server for requests to Spotify and Apple APIs

## Running application with Docker

**1.** Install [Docker](https://www.docker.com/).

**2.** Run the application locally

```bash
$ docker-compose up
```

Application will be up and running on port 8000.

Several environment variables must be set:

* Env for Apple Music API: ``APPLE_MUSICKIT_KEYID``, ``APPLE_MUSICKIT_KEY``
* Env for Spotify API: ``SPOTIFY_CLIENT_ID``, ``SPOTIFY_CLIENT_SECRET``
* Env for Auth: ``DSPAPI_APPKEY``
* Env for Consumer Analytics: ``CONSUMER_ANALYTICS_USER``, ``CONSUMER_ANALYTICS_PASS``, ``CONSUMER_ANALYTICS_API``
* Env for Delphi API: ``DELPHI_API_BASE_URL``, ``DELPHI_API_CLIENT_ID``, ``DELPHI_API_CLIENT_SECRET`` or JSON in ``DELPHI_API``

Run tests

```bash
$ make test
```

Run code style checkers
```bash
$ make checkstyle
```

Run security checkers
```bash
$ make security
```

Run code prittifier
```bash
$ make prittify
```

Run pre-commit script (prittifier, code style & security checkers, tests)
```bash
$ make prittify
```
