Todolist RESTful API
- API version: 1
- Build date: 2021-12-18T23:44:38.182Z[GMT]
OpenAPI for Todolist RESTful API
For more information, please visit https://github.com/IkoAfianando
Automatically generated by the Swagger Codegen
Building the API client library requires:
- Java 1.7+
- Maven/Gradle
To install the API client library to your local Maven repository, simply execute:
mvn clean install
To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
mvn clean deploy
Refer to the OSSRH Guide for more information.
Add this dependency to your project's POM:
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-java-client</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
Add this dependency to your project's build file:
compile "io.swagger:swagger-java-client:1.0.0"
At first generate the JAR by executing:
mvn clean package
Then manually install the following JARs:
target/swagger-java-client-1.0.0.jar
target/lib/*.jar
Please follow the installation instruction and execute the following Java code:
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.TodolistApi;
import java.io.File;
import java.util.*;
public class TodolistApiExample {
public static void main(String[] args) {
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();
}
}
}
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.TodolistApi;
import java.io.File;
import java.util.*;
public class TodolistApiExample {
public static void main(String[] args) {
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();
}
}
}
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.TodolistApi;
import java.io.File;
import java.util.*;
public class TodolistApiExample {
public static void main(String[] args) {
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();
}
}
}
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.TodolistApi;
import java.io.File;
import java.util.*;
public class TodolistApiExample {
public static void main(String[] args) {
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();
}
}
}
All URIs are relative to https://{environment}.programmingwithiko.com/api/v1
Class | Method | HTTP request | Description |
---|---|---|---|
TodolistApi | todolistGet | GET /todolist | Get All Todolist |
TodolistApi | todolistPost | POST /todolist | Create New Todolist |
TodolistApi | todollistTodolistIdDelete | DELETE /todollist/{todolistId} | Delete existing Todolist |
TodolistApi | todollistTodolistIdPut | PUT /todollist/{todolistId} | Update existing Todolist |
Authentication schemes defined for the API:
- Type: API key
- API key parameter name: X-API-Key
- Location: HTTP header
It's recommended to create an instance of ApiClient
per thread in a multithreaded environment to avoid any potential issues.