5.6 KiB
\DefaultApi
All URIs are relative to https://localhost/api
Method | HTTP request | Description |
---|---|---|
auth_login_post | Post /auth/login | Authenticate user |
auth_token_post | Post /auth/token | Generate authentication token for another user |
elections_all_get | Get /elections/all | Get all existing elections |
elections_create_post | Post /elections/create | Create new election |
elections_id_get | Get /elections/{id} | Get all existing elections |
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 |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
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 |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
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
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
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 |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
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
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
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 |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]