|
76 | 76 |
|
77 | 77 | OPS = list(OP_MAP.keys())
|
78 | 78 |
|
79 |
| -DEFAULT_LIMIT_AND_MAX_ITEMS = 100 |
| 79 | +# Previously named DEFAULT_LIMIT_AND_MAX_ITEMS |
| 80 | +# aliased for backwards compat |
| 81 | +# https://github.com/stac-utils/pystac-client/pull/273 |
| 82 | +DEFAUL_LIMIT = DEFAULT_LIMIT_AND_MAX_ITEMS = 100 |
80 | 83 |
|
81 | 84 |
|
82 | 85 | # from https://gist.github.com/angstwad/bf22d1822c38a92ec0a9#gistcomment-2622319
|
@@ -140,12 +143,12 @@ class ItemSearch:
|
140 | 143 | the response, it will automatically retry with
|
141 | 144 | ``"GET"`` for all subsequent requests.
|
142 | 145 | max_items : The maximum number of items to return from the search, even
|
143 |
| - if there are more matching results. This client to limit the |
| 146 | + if there are more matching results. This allows the client to limit the |
144 | 147 | total number of Items returned from the :meth:`items`,
|
145 | 148 | :meth:`item_collections`, and :meth:`items_as_dicts methods`. The client
|
146 | 149 | will continue to request pages of items until the number of max items is
|
147 |
| - reached. This parameter defaults to 100. Setting this to ``None`` will |
148 |
| - allow iteration over a possibly very large number of results. |
| 150 | + reached. By default (``max_items=None``) all items matching the query |
| 151 | + will be returned. |
149 | 152 | stac_io: An instance of StacIO for retrieving results. Normally comes
|
150 | 153 | from the Client that returns this ItemSearch client: An instance of a
|
151 | 154 | root Client used to set the root on resulting Items.
|
@@ -217,7 +220,7 @@ def __init__(
|
217 | 220 | url: str,
|
218 | 221 | *,
|
219 | 222 | method: Optional[str] = "POST",
|
220 |
| - max_items: Optional[int] = DEFAULT_LIMIT_AND_MAX_ITEMS, |
| 223 | + max_items: Optional[int] = None, |
221 | 224 | stac_io: Optional[StacApiIO] = None,
|
222 | 225 | client: Optional["_client.Client"] = None,
|
223 | 226 | limit: Optional[int] = DEFAULT_LIMIT_AND_MAX_ITEMS,
|
|
0 commit comments