View Source CensysEx.Paginate (censys_ex v2.0.1)
CensysEx.Paginate implements a wrapper for cursor paginated APIs
Summary
Types
function that takes in a keyword list of query params and returns either a map of results or an error
function that takes in the internal results of paginated API calls, returning a [any]
struct to maintain the state of a paginated api call
Types
@type next_page_fn() :: (CensysEx.API.t(), Keyword.t() -> CensysEx.result())
function that takes in a keyword list of query params and returns either a map of results or an error
function that takes in the internal results of paginated API calls, returning a [any]
@type t() :: %CensysEx.Paginate{ client: CensysEx.API.t(), cursor: String.t(), next_fn: next_page_fn(), page: integer(), params: Keyword.t(), results: map(), results_fn: result_extractor() }
struct to maintain the state of a paginated api call
Functions
@spec stream(CensysEx.API.t(), next_page_fn(), result_extractor(), keyword()) :: CensysEx.result_stream(any())