From dc693979e3d93facc357a50a2c59548787d669df Mon Sep 17 00:00:00 2001 From: Stephan Fuhrmann Date: Mon, 27 Nov 2017 23:55:44 +0100 Subject: [PATCH] Stream example added --- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 26e9a912..7fc14921 100644 --- a/README.md +++ b/README.md @@ -23,8 +23,13 @@ by creating one instance and using it // 5000ms timeout, user agent is Demo agent/1.0 RadioBrowser browser = new RadioBrowser(5000, "Demo agent/1.0"); - // retrieve the first 16 stations - List stations = browser.listStations(Paging.at(0,16)); + // print the first 64 stations in station name order + browser.listStations(ListParameter.create().order(FieldName.name)) + .limit(64) + .forEach(s -> System.out.printf("%s: %s%n", + s.getName(), + s.getUrl() + )); ### How it is tested