Skip to content

Commit 822082b

Browse files
author
Ebenezer Ackon
committed
keep reactive stream open by returning Singles
1 parent cb4a470 commit 822082b

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

README.md

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,34 @@
11
# hello_etherscan
22

3-
hello_etherscan is a wrapper for the [Etherscan Api](https://etherscan.io/apis). This is just a module to handle Networking calls.
3+
hello_etherscan is a wrapper for the [Etherscan Api](https://etherscan.io/apis). This is just a module to handle networking calls.
44

55
## Getting Started
6-
No Releases yet, [issues](https://github.com/EbenezerGH/hello_etherscan/issues) to complete.
6+
No Releases yet, [features](https://github.com/EbenezerGH/hello_etherscan/issues) to complete.
77

8-
Call `ApiKey.takeOff.setApiKey("[your api key here]")` if recording api usage in the etherscan.io console [see [Example implementation](https://github.com/EbenezerGH/hello_etherscan/blob/master/app/src/main/java/jfyg/etherscan/helloetherescan/HelloEtherscanApplication.kt)]
8+
Optional: Call `ApiKey.takeOff.setApiKey("[your api key here]")` when recording api usage in the etherscan.io console. [see [Example implementation](https://github.com/EbenezerGH/hello_etherscan/blob/master/app/src/main/java/jfyg/etherscan/helloetherescan/HelloEtherscanApplication.kt)]
99
```
1010
ApiKey.takeOff.setApiKey("1I7CRNU2QIU253UBPFVB5UV2C2PBDURAIYZ")
1111
```
1212

13-
Create an Instance of one of the following and access values [see [Example implementation](https://github.com/EbenezerGH/hello_etherscan/blob/master/app/src/main/java/jfyg/etherscan/helloetherescan/MainActivity.kt)]
13+
Create an Instance of one of the reactive Singles and access values by specifying thread and subscribing. [see [Example implementation](https://github.com/EbenezerGH/hello_etherscan/blob/master/app/src/main/java/jfyg/etherscan/helloetherescan/MainActivity.kt)]
1414

1515
``[accounts, contracts, transactions, blocks, eventLogs, geth, websockets, tokens, stat]``
1616

1717
```
1818
val stat = Stat()
1919
val account = Account()
20-
"The current price of Ether in Usd: ${stat.getLastPriceInUsd()}"
21-
"The Account Balance is: ${account.getBalance("0x82e4499D4b2A669831a3881d61BB24f7b620c61a")}"
20+
21+
//stat test
22+
stat.getLastPriceInBtc()?.observeOn(AndroidSchedulers.mainThread())
23+
?.subscribeBy {
24+
Log.d(TAG, "The current price of Ether in Btc: $it")
25+
}
26+
27+
//account test
28+
account.getTransactions("0x2c1ba59d6f58433fb1eaee7d20b26ed83bda51a3")?.observeOn(AndroidSchedulers.mainThread())
29+
?.subscribeBy {
30+
Log.d(TAG, "The Account Size of Transactions is: ${it.size}")
31+
}
2232
```
2333
## Authors
2434

0 commit comments

Comments
 (0)