Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs_code_snippets/05_06_notification_feeds.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ late Activity janeActivity;
late Activity saraComment;

Future<void> creatingNotificationActivities() async {
// Eric follows Jane
// Eric follows Jane
await ericFeed.follow(
targetFid: janeFeed.fid,
createNotificationActivity:
true, // When true Jane's notification feed will be updated with follow activity
);
// Eric comments on Jane's activity
// Eric comments on Jane's activity
await ericFeed.addComment(
request: ActivityAddCommentRequest(
comment: 'Agree!',
Expand All @@ -26,7 +26,7 @@ Future<void> creatingNotificationActivities() async {
true, // When true Jane's notification feed will be updated with comment activity
),
);
// Eric reacts to Jane's activity
// Eric reacts to Jane's activity
await ericFeed.addReaction(
activityId: janeActivity.activityId,
request: const AddReactionRequest(
Expand All @@ -35,7 +35,7 @@ Future<void> creatingNotificationActivities() async {
true, // When true Jane's notification feed will be updated with reaction activity
),
);
// Eric reacts to a comment posted to Jane's activity by Sara
// Eric reacts to a comment posted to Jane's activity by Sara
await ericFeed.addCommentReaction(
commentId: saraComment.activityId,
request: const AddCommentReactionRequest(
Expand Down
4 changes: 2 additions & 2 deletions docs_code_snippets/06_01_reactions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ Future<void> overview() async {

Future<void> overviewRead() async {
final feedData = await feed.getOrCreate();
// Last 15 reactions on the first activity
// Last 15 reactions on the first activity
print(feed.state.activities[0].latestReactions);
// Count of reactions by type
// Count of reactions by type
print(feed.state.activities[0].reactionGroups);
}
8 changes: 4 additions & 4 deletions docs_code_snippets/06_02_bookmarks.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ late StreamFeedsClient client;
late Feed feed;

Future<void> addingBookmarks() async {
// Adding a bookmark to a new folder
// Adding a bookmark to a new folder
final bookmark = await feed.addBookmark(activityId: 'activity_123');
// Adding to an existing folder
// Adding to an existing folder
final bookmarkWithFolder = await feed.addBookmark(
activityId: 'activity_123',
request: const AddBookmarkRequest(folderId: 'folder_456'),
);
// Update a bookmark (without a folder initially) - add custom data and move it to a new folder
// Update a bookmark (without a folder initially) - add custom data and move it to a new folder
final updatedBookmark = await feed.updateBookmark(
activityId: 'activity_123',
request: const UpdateBookmarkRequest(
Expand All @@ -24,7 +24,7 @@ Future<void> addingBookmarks() async {
),
),
);
// Update a bookmark - move it from one existing folder to another existing folder
// Update a bookmark - move it from one existing folder to another existing folder
final movedBookmark = await feed.updateBookmark(
activityId: 'activity_123',
request: const UpdateBookmarkRequest(
Expand Down
4 changes: 2 additions & 2 deletions docs_code_snippets/06_03_comments.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ late StreamFeedsClient client;
late Feed feed;

Future<void> addingComments() async {
// Adding a comment to an activity
// Adding a comment to an activity
final comment = await feed.addComment(
request: const ActivityAddCommentRequest(
comment: 'So great!',
Expand All @@ -15,7 +15,7 @@ Future<void> addingComments() async {
activityType: 'activity',
),
);
// Adding a reply to a comment
// Adding a reply to a comment
final reply = await feed.addComment(
request: const ActivityAddCommentRequest(
comment: 'I agree!',
Expand Down
8 changes: 1 addition & 7 deletions melos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,9 @@ command:
rxdart: ^0.28.0
shared_preferences: ^2.5.3
state_notifier: ^1.0.0
stream_core: ^0.1.0
uuid: ^4.5.1

# TODO Replace with hosted version when published
stream_core:
git:
url: https://github.com/GetStream/stream-core-flutter.git
ref: 280b1045e39388668fd060439259831611b51b5a
path: packages/stream_core

# List of all the dev_dependencies used in the project.
dev_dependencies:
auto_route_generator: ^10.0.0
Expand Down
4 changes: 2 additions & 2 deletions packages/stream_feeds/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
## 0.0.1
## 0.1.0

* TODO: Describe initial release.
* Initial release.
9 changes: 2 additions & 7 deletions packages/stream_feeds/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
name: stream_feeds
description: The official Dart client for Stream Feeds, a service for building applications with activity feeds.
version: 0.0.1
version: 0.1.0
repository: https://github.com/GetStream/stream-feeds-flutter
publish_to: none # Delete when ready to publish

# Note: The environment configuration and dependency versions are managed by Melos.
#
Expand Down Expand Up @@ -33,11 +32,7 @@ dependencies:
retrofit: ^4.6.0
rxdart: ^0.28.0
state_notifier: ^1.0.0
stream_core:
git:
url: https://github.com/GetStream/stream-core-flutter.git
ref: 280b1045e39388668fd060439259831611b51b5a
path: packages/stream_core
stream_core: ^0.1.0
uuid: ^4.5.1

dev_dependencies:
Expand Down
17 changes: 17 additions & 0 deletions packages/stream_feeds/test/client/feeds_client_impl_test.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import 'package:stream_feeds/src/client/feeds_client_impl.dart';
import 'package:stream_feeds/stream_feeds.dart';
import 'package:test/test.dart';

const testToken =
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoibHVrZV9za3l3YWxrZXIifQ.hZ59SWtp_zLKVV9ShkqkTsCGi_jdPHly7XNCf5T_Ev0';
void main() {
test('Create a feeds client', () {
final client = StreamFeedsClient(
apiKey: 'apiKey',
user: const User(id: 'userId'),
tokenProvider: TokenProvider.static(UserToken(testToken)),
);

expect(client, isA<StreamFeedsClientImpl>());
});
}
Loading
Loading