memeLab/Jandig

Create an Django REST API viewset that supports List and Retrieve for Markers

Closed this issue · 1 comments

Feature Request

Create a REST API for Markers using the Django Rest Framework. This API would have a link like /api/v1/markers/ allowing for GET methods, listing all markers with pagination enabled.

Is your feature request related to a problem? Please describe.
Right now, since we don't have an API with pagination, pages with marker selection (upload-artwork) or even that lists our markers (collection) are really cumbersome and slow, as they load all markers that were uploaded

Describe the solution you'd like
A django rest framework viewset class for listing and retrieving markers and a url router for this new viewset. This will enable new features to be implemented later on for Jandig.

Describe alternatives you've considered
Altering the function based views we have right now to support pagination is an option, however it might make the code bigger and messier, a viewset using rest framework seems to reduce the amount of code needed for a robust API for markers.

Additional context
Django REST has a nice tutorial with examples that really cover the basics we need.

Adding options for POST, PATCH, PUT for updates or partial updates isn't really necessary right now, but might be useful in the future for the upload pages and API usage of Jandig. This issue doesn't include this part, but if you feel like it, go for it :)

I would like to implement this feature.