TootDataStream
public actor TootDataStream
Provides a holder that returns streams of AsyncSequence data that can be refreshed, posts, account data etc
-
Initialises a TootStream with a given client, it is assumed the client is authorized already
Declaration
Swift
public init(client: TootClient)
Parameters
client
TootClient to provide data streams for
-
refreshStreams()
AsynchronousReloads data in all currently active streams
Declaration
Swift
public func refreshStreams() async throws
-
refresh(_:
Asynchronous) Reloads data in the selected stream for account toot streams
Declaration
Swift
public func refresh(_ stream: AccountTootStreams) async throws
-
Provides an async stream of updates for the given stream
Declaration
Swift
public func stream(_ stream: AccountTootStreams) throws -> AsyncStream<Account>
Parameters
stream
the stream type to update
Return Value
async stream of values
-
Provides an async stream of updates for the given stream
Declaration
Parameters
timeline
the type of post stream to update
pageInfo
PagedInfo object for max/min/since ids
Return Value
async stream of Post values
-
refresh(_:
Asynchronous) Reloads data in the selected stream for post toot streams
Declaration
Swift
public func refresh(_ timeline: Timeline) async throws