This repository has been archived on 2026-10-23. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
nikolark d4f862cb4a Refactor alot
- add django-redis-cache
- remove CurrentTrack db model
2016-04-06 22:16:32 +02:00

15 lines
416 B
Python

from rest_framework.response import Response
from rest_framework.views import APIView
from oliver_screen.lastfm import get_track_data, get_last_track_data
class LastTrackView(APIView):
def get(self, request, format=None):
return Response({'track': get_last_track_data()})
class CurrentTrackView(APIView):
def get(self, request, format=None):
return Response({'track': get_track_data()})