Skip to content

Commit

Permalink
CLS 99 add endpoint for getting all messages for account (#2)
Browse files Browse the repository at this point in the history
* added address/{hash}/messages endpoint

* added requests for namespace and updated gitignore to ignore private configs

* added requests for namespace

* added convert from MsgAddress to response.Message

* added filtering for addresses messages

* added unit test for storage.Address.Messages

* added unit test for address messages endpoint

* updated api docs

* updated docs
  • Loading branch information
vvuwei committed Oct 26, 2023
1 parent 53aa217 commit a773784
Show file tree
Hide file tree
Showing 14 changed files with 501 additions and 22 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ go.work

# IDE and other 3rd party tools
.idea
*.private.*
16 changes: 16 additions & 0 deletions .run/requests/address.http
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
################################################ Local

### GET All indexed addresses
http://{{host}}/v1/address

### Get count of all indexed addresses
http://{{host}}/v1/address/count

### Get specific address data
http://{{host}}/v1/address/celestia1z4909eqzfzngegw43tr2vle7d69fhww4hmmusw

### Get specific address transactions
http://{{host}}/v1/address/celestia1z4909eqzfzngegw43tr2vle7d69fhww4hmmusw/txs

### Get specific address messages
http://{{host}}/v1/address/celestia1z4909eqzfzngegw43tr2vle7d69fhww4hmmusw/messages
6 changes: 6 additions & 0 deletions .run/requests/namespace.http
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
### GET namespace messages
http://{{host}}/v1/namespace/00000000000000000000000000000000000042690c204d39600fddd3/0/messages?limit=2

### GET namespace messages
http://{{host}}/v1/namespace/00000000000000000000000000000000000042690c204d39600fddd3/0/messages?limit=2

93 changes: 88 additions & 5 deletions cmd/api/docs/docs.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

90 changes: 88 additions & 2 deletions cmd/api/docs/swagger.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a773784

Please sign in to comment.