class SlackApiResponseScroller[F[_], IT, PT, SR <: SlackApiScrollableResponse[IT, PT]] extends LazyScalaCollectionSupport[F, IT, PT, SR]
Support for batch loading remote data
- IT
batch item type
- PT
batch value type
- Alphabetic
- By Inheritance
- SlackApiResponseScroller
- LazyScalaCollectionSupport
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
SlackApiResponseScroller(initialLoader: () ⇒ F[Either[SlackApiClientError, SR]], batchLoader: (PT) ⇒ F[Either[SlackApiClientError, SR]])(implicit arg0: Monad[F])
- initialLoader
a function to initial request for data
- batchLoader
a function to load next batch based on previous state
Type Members
- type AsyncItemType = Either[SlackApiClientError, SR]
- type AsyncValueType = Either[SlackApiClientError, Iterable[IT]]
-
type
SyncStreamType = Stream[IT]
- Definition Classes
- LazyScalaCollectionSupport
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
first(): F[Either[SlackApiClientError, SR]]
Read the initial data
Read the initial data
- returns
a scrollable response with a cursor position
- Note
this functions is mostly available to help to implement your own batching. If it wasn't your intention look at toAsync/SyncScroller or toPublisher
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
next(lastPosition: PT): F[Either[SlackApiClientError, SR]]
Read a next batch providing a last position
Read a next batch providing a last position
- lastPosition
a cursor position
- Note
this functions is mostly available to help to implement your own batching. If it wasn't your intention look at toAsync/SyncScroller or toPublisher
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toAsyncScroller(): AsyncSeqIterator[F, AsyncItemType, AsyncValueType]
Read data as an infinite async iterator
Read data as an infinite async iterator
- returns
infinite async sequence iterator
-
def
toPublisher(maxItems: Option[Long] = None)(implicit ec: ExecutionContext): Publisher[IT]
Read data as a reactive publisher
Read data as a reactive publisher
- maxItems
- limit optionally maximum items you want to receive
- returns
reactive publisher
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
toSyncScroller(scrollerTimeout: FiniteDuration = 60.seconds)(implicit syncScrollerAwaiter: SyncScrollerAwaiter[F], monad: Monad[F]): F[Either[SlackApiClientError, SyncStreamType]]
Lazy load data synchronously batching using standard lazy container
Lazy load data synchronously batching using standard lazy container
- scrollerTimeout
timeout to receive next batch
- returns
lazy stream of data
- Definition Classes
- LazyScalaCollectionSupport
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()