package-axios-testing
v1.0.4
Published
This package provides methods to interact with the JSONPlaceholder Todo API.
Downloads
1
Readme
Package Todo API Package
This package provides methods to interact with the JSONPlaceholder Todo API.
Methods
fetchTodoById(id)
Fetches a todo item by its ID.
- Parameters:
id: The ID of the todo item to fetch.
- Returns: A promise that resolves to the todo item object.
createTodo(todo)
Creates a new todo item.
- Parameters:
todo: An object representing the new todo item.- Example:
{ title: 'New Todo', completed: false }
- Example:
- Returns: A promise that resolves to the created todo item object.
