increase limit

This commit is contained in:
Athou
2013-08-09 12:18:35 +02:00
parent c980e5dd67
commit 677fb87f71
2 changed files with 4 additions and 4 deletions

View File

@@ -102,7 +102,7 @@ public class CategoryREST extends AbstractREST {
required = true) @DefaultValue("unread") @QueryParam("readType") ReadingMode readType, @ApiParam(
value = "only entries newer than this") @QueryParam("newerThan") Long newerThan,
@ApiParam(value = "offset for paging") @DefaultValue("0") @QueryParam("offset") int offset, @ApiParam(
value = "limit for paging, default 20, maximum 50") @DefaultValue("20") @QueryParam("limit") int limit, @ApiParam(
value = "limit for paging, default 20, maximum 1000") @DefaultValue("20") @QueryParam("limit") int limit, @ApiParam(
value = "date ordering",
allowableValues = "asc,desc") @QueryParam("order") @DefaultValue("desc") ReadingOrder order, @ApiParam(
value = "keywords separated by spaces, 3 characters minimum",
@@ -113,7 +113,7 @@ public class CategoryREST extends AbstractREST {
keywords = StringUtils.trimToNull(keywords);
Preconditions.checkArgument(keywords == null || StringUtils.length(keywords) >= 3);
limit = Math.min(limit, 50);
limit = Math.min(limit, 1000);
limit = Math.max(0, limit);
Entries entries = new Entries();

View File

@@ -139,7 +139,7 @@ public class FeedREST extends AbstractREST {
required = true) @DefaultValue("unread") @QueryParam("readType") ReadingMode readType, @ApiParam(
value = "only entries newer than this") @QueryParam("newerThan") Long newerThan,
@ApiParam(value = "offset for paging") @DefaultValue("0") @QueryParam("offset") int offset, @ApiParam(
value = "limit for paging, default 20, maximum 50") @DefaultValue("20") @QueryParam("limit") int limit, @ApiParam(
value = "limit for paging, default 20, maximum 1000") @DefaultValue("20") @QueryParam("limit") int limit, @ApiParam(
value = "date ordering",
allowableValues = "asc,desc") @QueryParam("order") @DefaultValue("desc") ReadingOrder order, @ApiParam(
value = "keywords separated by spaces, 3 characters minimum",
@@ -151,7 +151,7 @@ public class FeedREST extends AbstractREST {
keywords = StringUtils.trimToNull(keywords);
Preconditions.checkArgument(keywords == null || StringUtils.length(keywords) >= 3);
limit = Math.min(limit, 50);
limit = Math.min(limit, 1000);
limit = Math.max(0, limit);
Entries entries = new Entries();