StreamFeedClient class abstract
The client class that manages API calls and authentication.
To instantiate the client you need an API key and secret. You can find the key and secret on the Stream dashboard.
If you want to use the API client directly on your web/mobile app you need to generate a user token server-side and pass it.
There are a few different ways to use a StreamFeedClient:
{@macro connect}
Constructors
- StreamFeedClient(String apiKey, {String? secret, String? appId, StreamHttpClientOptions? options, Runner runner = Runner.client, StreamAPI? api, String fayeUrl = 'wss://faye-us-east.stream-io-api.com/faye', Level logLevel = Level.WARNING, LogHandlerFunction? logHandlerFunction})
-
- Instantiate a new client (server side) with
StreamFeedClient.connect
using your apisecret
parameter andapiKey
factory - Instantiate a new client (server side) with
Properties
- batch → BatchOperationsClient
-
Convenient getter for
BatchOperationsClient
no setter - collections → CollectionsClient
-
Convenient getter for
CollectionsClient
:no setter - currentUser → StreamUser?
-
Returns the currentUser assigned to StreamFeedClient
no setter
- files → FileStorageClient
-
Convenient getter for FileStorageClient:
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- images → ImageStorageClient
-
Convenient getter for ImageStorageClient:
no setter
- personalization → PersonalizationClient
-
Convenient getter for
PersonalizationClient
:no setter - reactions → ReactionsClient
-
Convenient getter for ReactionsClient:
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
aggregatedFeed(
String slug, [String? userId]) → AggregatedFeed - Convenient getter for AggregatedFeed:
-
createUser(
String id, Map< String, Object?> data, {bool getOrCreate = false}) → Future<User> - Create a new user in stream
-
deleteUser(
String id) → Future< void> - Delete the user
-
flatFeed(
String slug, [String? userId]) → FlatFeed - Convenient getter for FlatFeed:
-
frontendToken(
String userId, {DateTime? expiresAt}) → Token -
Generate a JWT that includes the
userId
as payload and that is signed using your Stream API Secret. -
getUser(
String id, {bool withFollowCounts = false}) → Future< User> - Get the user data
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notificationFeed(
String slug, [String? userId]) → NotificationFeed -
Convenient getter for
NotificationFeed
: -
og(
String targetUrl) → Future< OpenGraphData> - This endpoint allows you to retrieve open graph information from a URL, which you can then use to add images and a description to activities.
-
setUser(
User user, Token userToken, {Map< String, Object?> ? extraData}) → Future<StreamUser> - Sets the currentUser assigned to StreamFeedClient
-
toString(
) → String -
A string representation of this object.
inherited
-
updateUser(
String id, Map< String, Object?> data) → Future<User> - Update the user
-
user(
String userId) → StreamUser -
Convenient getter for
UsersClient
:
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited