Skip to content
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

allow getTrips() and getMessages() with limit directly from Query instance #18

Closed
wants to merge 3 commits into from

Conversation

stklcode
Copy link
Owner

Issue

Querying trips and messages with result limit, like the following example from the README.md is not supported when using filters:

List<Trip> trips = ura.forStops("100000")
                      .forLines("25", "35")
                      .forDirection(1)
                      .getTrips(10);

Actually the unfiltered method works:

List<Trip> trips = ura.getTrips(10);

There is also a workaround for the first example:

Query query = ura.forStops("100000")
                  .forLines("25", "35")
                  .forDirection(1);
List<Trip> trips = ura.getTrips(query, 10);

The wrapper to call it directly from the Query instance is missing though.

Same for getMessages().


Solution

Add both convenience wrappers to the implementation.

@stklcode stklcode added the bug label Nov 21, 2022
@sonarcloud
Copy link

sonarcloud bot commented Nov 21, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@stklcode stklcode closed this Nov 21, 2022
@stklcode stklcode deleted the fix/get-trips-limit branch November 21, 2022 13:43
@stklcode stklcode restored the fix/get-trips-limit branch November 21, 2022 13:45
@stklcode stklcode deleted the fix/get-trips-limit branch November 21, 2022 13:45
@stklcode stklcode added this to the 2.0.4 milestone Nov 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant