mirror of https://github.com/vacp2p/rfc.git
Add pubsub topic to store json rpc api (#359)
* adds pubsub topic field * integrates pubsub topic in the examples * Update content/docs/rfcs/16/README.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> * fixes a spacing issue Co-authored-by: Oskar Thorén <ot@oskarthoren.com>
This commit is contained in:
parent
a2ecec5332
commit
405ec84a77
|
@ -218,6 +218,7 @@ The `get_waku_v2_store_v1_messages` method retrieves historical messages on spec
|
||||||
|
|
||||||
| Field | Type | Inclusion | Description |
|
| Field | Type | Inclusion | Description |
|
||||||
| ----: | :---: | :---: |----------- |
|
| ----: | :---: | :---: |----------- |
|
||||||
|
| `pubsubTopic` | `String` | mandatory | The pubsub topic on which a [`WakuMessage`](#WakuMessage) is published |
|
||||||
| `contentFilters` | `Array`[[`ContentFilter`](#contentfilter)] | mandatory | Array of content filters to query for historical messages |
|
| `contentFilters` | `Array`[[`ContentFilter`](#contentfilter)] | mandatory | Array of content filters to query for historical messages |
|
||||||
| `pagingOptions` | [`PagingOptions`](#PagingOptions) | optional | Pagination information |
|
| `pagingOptions` | [`PagingOptions`](#PagingOptions) | optional | Pagination information |
|
||||||
|
|
||||||
|
@ -451,7 +452,7 @@ This method is part of the `store` API and the specific resources to retrieve ar
|
||||||
|
|
||||||
#### Request
|
#### Request
|
||||||
|
|
||||||
```curl -d '{"jsonrpc":"2.0","id":"id","method":"get_waku_v2_store_v1_messages", "params":[["/waku/2/default-content/proto"]]}' --header "Content-Type: application/json" http://localhost:8545```
|
```curl -d '{"jsonrpc":"2.0","id":"id","method":"get_waku_v2_store_v1_messages", "params":["", ["/waku/2/default-content/proto"]]}' --header "Content-Type: application/json" http://localhost:8545```
|
||||||
|
|
||||||
```jsonrpc
|
```jsonrpc
|
||||||
{
|
{
|
||||||
|
@ -459,6 +460,7 @@ This method is part of the `store` API and the specific resources to retrieve ar
|
||||||
"id": "id",
|
"id": "id",
|
||||||
"method": "get_waku_v2_store_v1_messages",
|
"method": "get_waku_v2_store_v1_messages",
|
||||||
"params": [
|
"params": [
|
||||||
|
"",
|
||||||
[
|
[
|
||||||
{"contentTopic": "/waku/2/default-content/proto"}
|
{"contentTopic": "/waku/2/default-content/proto"}
|
||||||
]
|
]
|
||||||
|
@ -508,7 +510,7 @@ This method is part of the `store` API and the specific resources to retrieve ar
|
||||||
|
|
||||||
#### Request
|
#### Request
|
||||||
|
|
||||||
```curl -d '{"jsonrpc":"2.0","id":"id","method":"get_waku_v2_store_v1_messages", "params":[["/waku/2/default-content/proto"],{"pageSize":2,"forward":false}]}' --header "Content-Type: application/json" http://localhost:8545```
|
```curl -d '{"jsonrpc":"2.0","id":"id","method":"get_waku_v2_store_v1_messages", "params":[ "", ["/waku/2/default-content/proto"],{"pageSize":2,"forward":false}]}' --header "Content-Type: application/json" http://localhost:8545```
|
||||||
|
|
||||||
```jsonrpc
|
```jsonrpc
|
||||||
{
|
{
|
||||||
|
@ -516,6 +518,7 @@ This method is part of the `store` API and the specific resources to retrieve ar
|
||||||
"id": "id",
|
"id": "id",
|
||||||
"method": "get_waku_v2_store_v1_messages",
|
"method": "get_waku_v2_store_v1_messages",
|
||||||
"params": [
|
"params": [
|
||||||
|
"",
|
||||||
[
|
[
|
||||||
{"contentTopic": "/waku/2/default-content/proto"}
|
{"contentTopic": "/waku/2/default-content/proto"}
|
||||||
],
|
],
|
||||||
|
@ -569,7 +572,7 @@ This method is part of the `store` API and the specific resources to retrieve ar
|
||||||
|
|
||||||
#### Request
|
#### Request
|
||||||
|
|
||||||
```curl -d '{"jsonrpc":"2.0","id":"id","method":"get_waku_v2_store_v1_messages", "params":[["/waku/2/default-content/proto"],{"pageSize":2,"cursor":{"digest":"abcdef","receivedTime":1605887187.00},"forward":false}]}' --header "Content-Type: application/json" http://localhost:8545```
|
```curl -d '{"jsonrpc":"2.0","id":"id","method":"get_waku_v2_store_v1_messages", "params":[ "", ["/waku/2/default-content/proto"],{"pageSize":2,"cursor":{"digest":"abcdef","receivedTime":1605887187.00},"forward":false}]}' --header "Content-Type: application/json" http://localhost:8545```
|
||||||
|
|
||||||
```jsonrpc
|
```jsonrpc
|
||||||
{
|
{
|
||||||
|
@ -577,6 +580,7 @@ This method is part of the `store` API and the specific resources to retrieve ar
|
||||||
"id": "id",
|
"id": "id",
|
||||||
"method": "get_waku_v2_store_v1_messages",
|
"method": "get_waku_v2_store_v1_messages",
|
||||||
"params": [
|
"params": [
|
||||||
|
"",
|
||||||
[
|
[
|
||||||
{"contentTopic": "/waku/2/default-content/proto"}
|
{"contentTopic": "/waku/2/default-content/proto"}
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in New Issue