Add A Todo Item
View all prompts

Add A Todo Item

Here is the definition of an API for TODO list management. ``` openapi: 3.0.1 info: title: TODO Plugin description: A plugin that allows the user to create and manage a TODO list using ChatGPT. If you do not know the user's username, ask them first before making queries to the plugin. Otherwise, use the username "global". version: 'v1' servers: - url: http://localhost:5003 paths: /todos/{username}: get: operationId: getTodos summary: Get the list of todos parameters: - in: path name: username schema: type: string required: true description: The name of the user. responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/getTodosResponse' post: operationId: addTodo summary: Add a todo to the list parameters: - in: path name: username schema: type: string required: true description: The name of the user. requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/addTodoRequest' responses: "200": description: OK delete: operationId: deleteTodo summary: Delete a todo from the list parameters: - in: path name: username schema: type: string required: true description: The name of the user. requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/deleteTodoRequest' responses: "200": description: OK components: schemas: getTodosResponse: type: object properties: todos: type: array items: type: string description: The list of todos. addTodoRequest: type: object required: - todo properties: todo: type: string description: The todo to add to the list. required: true deleteTodoRequest: type: object required: - todo_idx properties: todo_idx: type: integer description: The index of the todo to delete. required: true ``` I want to add a todo with description "Buy the milk" using this API. What is the body of the request I should send ?

Keywords

  • Software Development
  • Coding
  • Project Management
  • Productivity Tools
  • Todo Management
  • Api Usage
  • Chat GPT Plugin
  • Task Tracking
  • Open API Documentation

Source