# \DefaultApi All URIs are relative to *https://localhost/api* Method | HTTP request | Description ------------- | ------------- | ------------- [**auth_login_post**](DefaultApi.md#auth_login_post) | **Post** /auth/login | Authenticate user [**auth_token_post**](DefaultApi.md#auth_token_post) | **Post** /auth/token | Generate authentication token for another user [**elections_all_get**](DefaultApi.md#elections_all_get) | **Get** /elections/all | Get all existing elections [**elections_create_post**](DefaultApi.md#elections_create_post) | **Post** /elections/create | Create new election [**elections_id_get**](DefaultApi.md#elections_id_get) | **Get** /elections/{id} | Get all existing elections [**elections_id_post**](DefaultApi.md#elections_id_post) | **Post** /elections/{id} | Vote in exsisting election # **auth_login_post** > ::models::InlineResponse200 auth_login_post(ctx, credentials) Authenticate user ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context containing the authentication | nil if no authentication **credentials** | [**Credentials**](Credentials.md)| | ### Return type [**::models::InlineResponse200**](inline_response_200.md) ### Authorization [JWT](../README.md#JWT) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **auth_token_post** > ::models::InlineResponse2001 auth_token_post(ctx, authorization, token) Generate authentication token for another user ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context containing the authentication | nil if no authentication **authorization** | **String**| Your authorization token | **token** | [**Authorization**](Authorization.md)| | ### Return type [**::models::InlineResponse2001**](inline_response_200_1.md) ### Authorization [JWT](../README.md#JWT) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **elections_all_get** > ::models::ElectionList elections_all_get(ctx, authorization) Get all existing elections ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context containing the authentication | nil if no authentication **authorization** | **String**| Your authorization token | ### Return type [**::models::ElectionList**](ElectionList.md) ### Authorization [JWT](../README.md#JWT) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **elections_create_post** > ::models::Election elections_create_post(ctx, authorization, election) Create new election ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context containing the authentication | nil if no authentication **authorization** | **String**| Your authorization token | **election** | [**Election**](Election.md)| | ### Return type [**::models::Election**](Election.md) ### Authorization [JWT](../README.md#JWT) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **elections_id_get** > ::models::Election elections_id_get(ctx, authorization, id) Get all existing elections ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context containing the authentication | nil if no authentication **authorization** | **String**| Your authorization token | **id** | **String**| | ### Return type [**::models::Election**](Election.md) ### Authorization [JWT](../README.md#JWT) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **elections_id_post** > ::models::Vote elections_id_post(ctx, authorization, election) Vote in exsisting election ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context containing the authentication | nil if no authentication **authorization** | **String**| Your authorization token | **election** | [**Vote**](Vote.md)| | ### Return type [**::models::Vote**](Vote.md) ### Authorization [JWT](../README.md#JWT) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)