add example with multiple filters to readme.
This commit is contained in:
parent
b7e33c512c
commit
2d2d9863d1
|
@ -28,6 +28,11 @@ pool.sub({cb:(event, relay) => {...}, filter: {authors: ['<hex1>', '<hex2>', ...
|
|||
|
||||
// get specific event
|
||||
pool.sub({cb: (event, relay) => {...}, filter: {id: '<hex>'}})
|
||||
// or get a specific event plus all the events that reference it in the 'e' tag
|
||||
pool.sub({
|
||||
cb: (event, relay) => {...},
|
||||
filter: [{id: '<hex>'}, {'#e': '<hex>'}]
|
||||
})
|
||||
|
||||
// get all events
|
||||
pool.sub({cb: (event, relay) => {...}, filter: {}})
|
||||
|
|
Loading…
Reference in New Issue