Skip to content

Latest commit

 

History

History
235 lines (172 loc) · 6.95 KB

TodolistApi.md

File metadata and controls

235 lines (172 loc) · 6.95 KB

TodolistApi

All URIs are relative to https://{environment}.programmingwithiko.com/api/v1

Method HTTP request Description
todolistGet GET /todolist Get All Todolist
todolistPost POST /todolist Create New Todolist
todollistTodolistIdDelete DELETE /todollist/{todolistId} Delete existing Todolist
todollistTodolistIdPut PUT /todollist/{todolistId} Update existing Todolist

todolistGet

ArrayTodolist todolistGet(includeDone, name)

Get All Todolist

Get all todolist by default

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.TodolistApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: TodolistAuth
ApiKeyAuth TodolistAuth = (ApiKeyAuth) defaultClient.getAuthentication("TodolistAuth");
TodolistAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//TodolistAuth.setApiKeyPrefix("Token");

TodolistApi apiInstance = new TodolistApi();
Boolean includeDone = false; // Boolean | Include done todolist in the result
String name = "name_example"; // String | Filter todolist by name
try {
    ArrayTodolist result = apiInstance.todolistGet(includeDone, name);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling TodolistApi#todolistGet");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
includeDone Boolean Include done todolist in the result [optional] [default to false]
name String Filter todolist by name [optional]

Return type

ArrayTodolist

Authorization

TodolistAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

todolistPost

Todolist todolistPost(body)

Create New Todolist

Create new todolist to database

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.TodolistApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: TodolistAuth
ApiKeyAuth TodolistAuth = (ApiKeyAuth) defaultClient.getAuthentication("TodolistAuth");
TodolistAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//TodolistAuth.setApiKeyPrefix("Token");

TodolistApi apiInstance = new TodolistApi();
CreateOrUpdateTodolist body = new CreateOrUpdateTodolist(); // CreateOrUpdateTodolist | 
try {
    Todolist result = apiInstance.todolistPost(body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling TodolistApi#todolistPost");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body CreateOrUpdateTodolist

Return type

Todolist

Authorization

TodolistAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

todollistTodolistIdDelete

InlineResponse200 todollistTodolistIdDelete(todolistId)

Delete existing Todolist

Delete existing todolist in database

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.TodolistApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: TodolistAuth
ApiKeyAuth TodolistAuth = (ApiKeyAuth) defaultClient.getAuthentication("TodolistAuth");
TodolistAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//TodolistAuth.setApiKeyPrefix("Token");

TodolistApi apiInstance = new TodolistApi();
String todolistId = "todolistId_example"; // String | Todolist id for updated
try {
    InlineResponse200 result = apiInstance.todollistTodolistIdDelete(todolistId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling TodolistApi#todollistTodolistIdDelete");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
todolistId String Todolist id for updated

Return type

InlineResponse200

Authorization

TodolistAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

todollistTodolistIdPut

Todolist todollistTodolistIdPut(body, todolistId)

Update existing Todolist

Update existing todolist in database

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.TodolistApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: TodolistAuth
ApiKeyAuth TodolistAuth = (ApiKeyAuth) defaultClient.getAuthentication("TodolistAuth");
TodolistAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//TodolistAuth.setApiKeyPrefix("Token");

TodolistApi apiInstance = new TodolistApi();
CreateOrUpdateTodolist body = new CreateOrUpdateTodolist(); // CreateOrUpdateTodolist | 
String todolistId = "todolistId_example"; // String | Todolist id for updated
try {
    Todolist result = apiInstance.todollistTodolistIdPut(body, todolistId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling TodolistApi#todollistTodolistIdPut");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body CreateOrUpdateTodolist
todolistId String Todolist id for updated

Return type

Todolist

Authorization

TodolistAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json