From ac68ff4d5b0f80c0d7aec23681457d791b2ae381 Mon Sep 17 00:00:00 2001 From: Jan Nidzwetzki Date: Mon, 14 May 2018 20:59:55 +0200 Subject: [PATCH 1/2] Removed deprecated constuctor in example code --- README.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index de26ffe..f17b8bc 100644 --- a/README.md +++ b/README.md @@ -119,15 +119,18 @@ Edit the Summary.java file to contain the following: ``` import com.oanda.v20.Context; +import com.oanda.v20.ContextBuilder; import com.oanda.v20.account.AccountID; import com.oanda.v20.account.AccountSummary; public class Summary { public static void main(String[] args) { - Context ctx = new Context( - "https://api-fxpractice.oanda.com", - ""); + + Context ctx = new ContextBuilder("https://api-fxpractice.oanda.com") + .setToken("") + .setApplication("DemoApp") + .build(); try { AccountSummary summary = ctx.account.summary( From 2d44545392b788b2b851c2bf04f95e4354e84e4e Mon Sep 17 00:00:00 2001 From: Jan Nidzwetzki Date: Mon, 14 May 2018 21:01:09 +0200 Subject: [PATCH 2/2] Fixed indent --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f17b8bc..8c0ee92 100644 --- a/README.md +++ b/README.md @@ -127,7 +127,7 @@ public class Summary { public static void main(String[] args) { - Context ctx = new ContextBuilder("https://api-fxpractice.oanda.com") + Context ctx = new ContextBuilder("https://api-fxpractice.oanda.com") .setToken("") .setApplication("DemoApp") .build();