diff --git a/README.md b/README.md index e750a4f..d134359 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ processing and are a very natural way to delineate success and failure cleanly. of throwing exceptions on errors, and allows exceptions to be reserved for truly exceptional behavior as intended. By convention I adapted the Haskell Either type style to this code. What this means is that the Either type's Right -value is the correct one (mnemonic: "right" as in correct) and the Left value is the serviceError. +value is the correct one (mnemonic: "right" as in correct) and the Left value is the `ServiceError`. ### How do I extract the raw value from the Either type? @@ -73,7 +73,7 @@ if(res.isRight()) { GeneralUtilities generalUtilities = GeneralUtilities.builder().apiKey("KEY").secretKey("KEY").build(); Either res = generalUtilities.getServerTime(); -if(res.isRight() { +if(res.isRight()) { ServerTime response = Helpers.extractEitherValueSafely(res.right()); //... } @@ -85,7 +85,7 @@ if(res.isRight() { GeneralUtilities generalUtilities = GeneralUtilities.builder().apiKey("KEY").secretKey("KEY").build(); Either res = generalUtilities.getExchangeInfo(); -if(res.isRight() { +if(res.isRight()) { ExchangeInfo response = Helpers.extractEitherValueSafely(res.right()); //... } @@ -97,7 +97,7 @@ if(res.isRight() { MarketData marketData = MarketData.builder().apiKey("KEY").secretKey("KEY").build(); Either> res = marketData.getCandlestickData("ETHBTC", Interval.ONE_MINUTE); -if(res.isRight() { +if(res.isRight()) { List data = Helpers.extractEitherValueSafely(res.right()); //... } @@ -109,7 +109,7 @@ if(res.isRight() { MarketData marketData = MarketData.builder().apiKey("KEY").secretKey("KEY").build(); Either res = marketData.getOrderBookDepth("ETHBTC", 1000); -if(res.isRight() { +if(res.isRight()) { OrderBookDepth orderBookDepth = Helpers.extractEitherValueSafely(res.right()); //... } @@ -121,7 +121,7 @@ if(res.isRight() { MarketData marketData = MarketData.builder().apiKey("KEY").secretKey("KEY").build(); Either res = marketData.getTickerPriceForSymbol("ETHBTC"); -if(res.isRight() { +if(res.isRight()) { TickerPrice tickerPrice = Helpers.extractEitherValueSafely(res.right()); //... }