API

API endpoints used in the Ekratia application to be consumed inside the application.

The endpoints are located inside /api/v1/<endpoint>

Users

class ekratia.users.api.UserView(**kwargs)

API User details Endpoint

model

alias of User

serializer_class

alias of UserSerializer

class ekratia.users.serializers.UserSerializer(instance=None, data=<class rest_framework.fields.empty>, **kwargs)

Serializer for User Model

Conversations

class ekratia.conversations.api.ThreadDetail(**kwargs)

API class to retrieve, update or delete a thread instance.

serializer_class

alias of ThreadSerializer

class ekratia.conversations.api.ThreadList(**kwargs)

API class to list all threads, or create a new thread.

serializer_class

alias of ThreadSerializer

Delegates

class ekratia.delegates.api.AssignedDelegates(**kwargs)

API class for User Delegates

model

alias of User

serializer_class

alias of UserSerializer

class ekratia.delegates.api.AvailableDelegates(**kwargs)

API class for Users Listing

get_queryset()

Lists the users of the system name: Optional name to filter the user

serializer_class

alias of UserSerializer

class ekratia.delegates.api.UserDelegateDetail(**kwargs)

Delegate Detail View Class

serializer_class

alias of UserDelegateSerializer

Referendums

class ekratia.referendums.api.ReferendumComments(**kwargs)

List Comments of the referendum in a Tree

create_root_comment(referendum)

Creates a root Comment

get(request, pk, format=None)

Lists the tree of comments for the thread

get_referendum(pk)

Get Referendum by Primary Key

update_information_from_tree(tree)

Recursive function to go through tree and update information Updating: User information, Vote value