Skip to content

Commit

Permalink
Add an extra client overload (#406)
Browse files Browse the repository at this point in the history
  • Loading branch information
pomadchin authored Sep 23, 2021
1 parent b19b7c7 commit 2826cb8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [Unreleased]
### Chnaged
- Expose client.search overload with an optional filter argument [#406](https://github.com/azavea/stac4s/pull/406)

## [0.7.0] - 2021-09-21
### Fixed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@ trait StreamingStacClientF[F[_], G[_], S] extends StacClientF[F, S] {
def collections: G[StacCollection]
def search: G[StacItem]
def search(filter: S): G[StacItem]
def search(filter: Option[S]): G[StacItem]
def items(collectionId: NonEmptyString): G[StacItem]
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ case class SttpStacClientF[F[_]: MonadThrow, S: Lens[*, Option[PaginationToken]]

def search(filter: S): Stream[F, StacItem] = search(filter.some)

private def search(filter: Option[S]): Stream[F, StacItem] = {
def search(filter: Option[S]): Stream[F, StacItem] = {
val emptyJson = JsonObject.empty.asJson
// the initial filter may contain the paginationToken that is used for the initial query
val initialBody = filter.map(_.asJson).getOrElse(emptyJson)
Expand Down

0 comments on commit 2826cb8

Please sign in to comment.