{{ todos }}
```
### Document Resource
```vue
```
Example API:
```vue
todo.doc // doc returned from request
todo.reload() // reload the doc
// update options
todo.update({
doctype: '',
name: ''
})
todo.get // doc resource
todos.get.loading // true when data is being fetched
todos.get.error // error that occurred from making the request
todos.get.promise // promise object of the request, can be awaited
// resource to set value(s) on the document
todos.setValue
todos.setValue.submit({
// field value pairs to set
status: 'Closed',
description: 'Updated description'
})
// same as setValue but debounced
todos.setValueDebounced
// will run once after 500ms
todos.setValueDebounced.submit({
description: 'Updated description'
})
// resource to delete the document
todos.delete
todos.delete.submit()
// if whitelistedMethods is defined
// you get a resource for each whitelisted method
todos.sendEmail
todos.sendEmail.submit
todos.sendEmail.loading
```
### List Resource
List Resource is a wrapper on top of [Resource](./Resource.story.md) for working
with lists. This feature only works with a Frappe Framework backend as of now.
## Usage
A list resource knows how to fetch records of a DocType from a Frappe Framework
backend so there is no need to specify the url. Instead you only define
`doctype`, `fields`, `filters`, etc. You also get methods like `next()`,
`setValue()`, etc.
```vue