Skip to content

Commit 21dce96

Browse files
committed
Added unused query parameter to tables endpoint
1 parent 8c47532 commit 21dce96

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

src/main/java/com/imsweb/seerapi/client/staging/StagingService.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,17 @@ public interface StagingService {
114114
@GET("staging/{algorithm}/{version}/tables")
115115
Call<List<StagingTable>> tables(@Path("algorithm") String algorithm, @Path("version") String version, @Query("q") String query);
116116

117+
/**
118+
* Return a list of matching tables
119+
* @param algorithm an algorithm identifier
120+
* @param version a version
121+
* @param query an optional text query
122+
* @param unusedOnly if true, limit to unused tables
123+
* @return a list of staging tables
124+
*/
125+
@GET("staging/{algorithm}/{version}/tables")
126+
Call<List<StagingTable>> tables(@Path("algorithm") String algorithm, @Path("version") String version, @Query("q") String query, @Query("unused") Boolean unusedOnly);
127+
117128
/**
118129
* Return a single table definition by table identifier
119130
* @param algorithm an algorithm identifier

src/test/java/com/imsweb/seerapi/client/staging/StagingTest.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,11 @@ public void testSchemaInvolvedTables() throws IOException {
117117
@Test
118118
public void testListTables() throws IOException {
119119
List<StagingTable> tables = _STAGING.tables(_ALGORITHM, _VERSION, "ssf1").execute().body();
120+
assertThat(tables).isNotEmpty();
120121

122+
tables = _STAGING.tables(_ALGORITHM, _VERSION, null, true).execute().body();
123+
assertThat(tables).isEmpty();
124+
tables = _STAGING.tables(_ALGORITHM, _VERSION, null, false).execute().body();
121125
assertThat(tables).isNotEmpty();
122126
}
123127

0 commit comments

Comments
 (0)