-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
listStationsWithAdvancedSearch No paging provided #126
Comments
There are multiple levels to see here. On the other hand, internally usually there is paging used instead of fetching all data with no way for the user to change the fetch size. The HTTP API usually has a default of limit 100000. Can you explain to me the use case why it makes sense to increase the default fetch-limit for the user? |
…ing from the parameters and the paging spliterator is used. #126
I've added support for paging in the advanced search call. |
At present, Lib will automatically use the stream method to load pagging, |
At the moment the code re-uses the stream part and does the paging internally. The libraries main job is to abstract from how things look on HTTP and provide a comfortable Java class view of that. Timeouts are handled with one central mechanism in the library. So if you could wish something, what would it be? |
I want int page = 0; AdvancedSearch advancedTWSearch = AdvancedSearch.builder(); List stations = radioBrowser.listStationsWithAdvancedSearch(advancedTWSearch, page); // return page data if(isEndPage + 1) return emptyList; // new ArrayList(); or int page = 0; AdvancedSearch advancedTWSearch = AdvancedSearch.builder(); List stations = radioBrowser.listStationsWithAdvancedSearch(advancedTWSearch); // return page data if(isEndPage + 1) return emptyList; // new ArrayList(); or int page = 0; AdvancedSearch advancedTWSearch = AdvancedSearch.builder(); List stations = radioBrowser.listStationsWithAdvancedSearch(advancedTWSearch); // return page data if(isEndPage + 1) return emptyList; // new ArrayList(); |
To summarize, your examples are returning Since the other calls are also providing List variants, the most obvious solution is to provide also an advanced search call with paging and a |
Thanks for the input here, that's appreciated! |
https://de1.api.radio-browser.info/#General
Advanced station search
http://de1.api.radio-browser.info/json/stations/search
The official API provides offset and limit
At present, the lib has been hardcoded to prevent users from operating it,
but sometimes users want to control how much data is preloaded.
The text was updated successfully, but these errors were encountered: