Skip to content

Commit

Permalink
add api summary in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
fluency03 committed May 4, 2018
1 parent c096102 commit 4dcffb4
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 14 deletions.
43 changes: 30 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,48 +35,65 @@ Summary:

### blockchain


```
GET /blockchain
POST /blockchain
DEL /blockchain
GET /blockchain/validity
GET /blockchain/last-block
DEL /blockchain/last-block
POST /blockchain/new-block
POST /blockchain/next-block
GET /blockchain/block/:hash
GET /blockchain/block/:hash/transaction/:id
```


### block

```
GET /blocks
GET /block/:hash
POST /block
DEL /block/:hash
GET /block/:hash/transaction/:id
```



### transaction

```
GET /transactions
GET /transaction/:id
POST /transaction
PUT /transaction/:id
DEL /transaction/:id
```




### network

```
GET /network
POST /peer
GET /peers
GET /peers?names=name1,name2
GET /peer/:name
```



### generic

```
POST /generic/to-sha256
POST /generic/to-base64
POST /generic/from-base64
POST /generic/to-epoch-time
POST /generic/time-from-epoch
```






## Todos

- Complete APIs' Todos
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class BlockchainActor extends ActorSupport {
case None =>
log.error("Blockchain does not exist! Clear the hash-to-index mapping!")
hashIndexMapping.clear()
None
sender() ! None
}

private def onGetTxOfBlock(id: String, hash: String): Unit = getBlockFromChain(hash) match {
Expand Down

0 comments on commit 4dcffb4

Please sign in to comment.