Skip to content

Commit dcfe22e

Browse files
authored
chore(repo): prepare release (#27)
* fix snippet spacing * update core dependency * Add minimal test
1 parent 14ba0b6 commit dcfe22e

File tree

14 files changed

+76
-654
lines changed

14 files changed

+76
-654
lines changed

docs_code_snippets/05_06_notification_feeds.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ late Activity janeActivity;
1111
late Activity saraComment;
1212

1313
Future<void> creatingNotificationActivities() async {
14-
// Eric follows Jane
14+
// Eric follows Jane
1515
await ericFeed.follow(
1616
targetFid: janeFeed.fid,
1717
createNotificationActivity:
1818
true, // When true Jane's notification feed will be updated with follow activity
1919
);
20-
// Eric comments on Jane's activity
20+
// Eric comments on Jane's activity
2121
await ericFeed.addComment(
2222
request: ActivityAddCommentRequest(
2323
comment: 'Agree!',
@@ -26,7 +26,7 @@ Future<void> creatingNotificationActivities() async {
2626
true, // When true Jane's notification feed will be updated with comment activity
2727
),
2828
);
29-
// Eric reacts to Jane's activity
29+
// Eric reacts to Jane's activity
3030
await ericFeed.addReaction(
3131
activityId: janeActivity.activityId,
3232
request: const AddReactionRequest(
@@ -35,7 +35,7 @@ Future<void> creatingNotificationActivities() async {
3535
true, // When true Jane's notification feed will be updated with reaction activity
3636
),
3737
);
38-
// Eric reacts to a comment posted to Jane's activity by Sara
38+
// Eric reacts to a comment posted to Jane's activity by Sara
3939
await ericFeed.addCommentReaction(
4040
commentId: saraComment.activityId,
4141
request: const AddCommentReactionRequest(

docs_code_snippets/06_01_reactions.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ Future<void> overview() async {
1717

1818
Future<void> overviewRead() async {
1919
final feedData = await feed.getOrCreate();
20-
// Last 15 reactions on the first activity
20+
// Last 15 reactions on the first activity
2121
print(feed.state.activities[0].latestReactions);
22-
// Count of reactions by type
22+
// Count of reactions by type
2323
print(feed.state.activities[0].reactionGroups);
2424
}

docs_code_snippets/06_02_bookmarks.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ late StreamFeedsClient client;
66
late Feed feed;
77

88
Future<void> addingBookmarks() async {
9-
// Adding a bookmark to a new folder
9+
// Adding a bookmark to a new folder
1010
final bookmark = await feed.addBookmark(activityId: 'activity_123');
11-
// Adding to an existing folder
11+
// Adding to an existing folder
1212
final bookmarkWithFolder = await feed.addBookmark(
1313
activityId: 'activity_123',
1414
request: const AddBookmarkRequest(folderId: 'folder_456'),
1515
);
16-
// Update a bookmark (without a folder initially) - add custom data and move it to a new folder
16+
// Update a bookmark (without a folder initially) - add custom data and move it to a new folder
1717
final updatedBookmark = await feed.updateBookmark(
1818
activityId: 'activity_123',
1919
request: const UpdateBookmarkRequest(
@@ -24,7 +24,7 @@ Future<void> addingBookmarks() async {
2424
),
2525
),
2626
);
27-
// Update a bookmark - move it from one existing folder to another existing folder
27+
// Update a bookmark - move it from one existing folder to another existing folder
2828
final movedBookmark = await feed.updateBookmark(
2929
activityId: 'activity_123',
3030
request: const UpdateBookmarkRequest(

docs_code_snippets/06_03_comments.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ late StreamFeedsClient client;
66
late Feed feed;
77

88
Future<void> addingComments() async {
9-
// Adding a comment to an activity
9+
// Adding a comment to an activity
1010
final comment = await feed.addComment(
1111
request: const ActivityAddCommentRequest(
1212
comment: 'So great!',
@@ -15,7 +15,7 @@ Future<void> addingComments() async {
1515
activityType: 'activity',
1616
),
1717
);
18-
// Adding a reply to a comment
18+
// Adding a reply to a comment
1919
final reply = await feed.addComment(
2020
request: const ActivityAddCommentRequest(
2121
comment: 'I agree!',

melos.yaml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,9 @@ command:
4040
rxdart: ^0.28.0
4141
shared_preferences: ^2.5.3
4242
state_notifier: ^1.0.0
43+
stream_core: ^0.1.0
4344
uuid: ^4.5.1
4445

45-
# TODO Replace with hosted version when published
46-
stream_core:
47-
git:
48-
url: https://github.com/GetStream/stream-core-flutter.git
49-
ref: 280b1045e39388668fd060439259831611b51b5a
50-
path: packages/stream_core
51-
5246
# List of all the dev_dependencies used in the project.
5347
dev_dependencies:
5448
auto_route_generator: ^10.0.0

packages/stream_feeds/CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
## 0.0.1
1+
## 0.1.0
22

3-
* TODO: Describe initial release.
3+
* Initial release.

packages/stream_feeds/pubspec.yaml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
name: stream_feeds
22
description: The official Dart client for Stream Feeds, a service for building applications with activity feeds.
3-
version: 0.0.1
3+
version: 0.1.0
44
repository: https://github.com/GetStream/stream-feeds-flutter
5-
publish_to: none # Delete when ready to publish
65

76
# Note: The environment configuration and dependency versions are managed by Melos.
87
#
@@ -33,11 +32,7 @@ dependencies:
3332
retrofit: ^4.6.0
3433
rxdart: ^0.28.0
3534
state_notifier: ^1.0.0
36-
stream_core:
37-
git:
38-
url: https://github.com/GetStream/stream-core-flutter.git
39-
ref: 280b1045e39388668fd060439259831611b51b5a
40-
path: packages/stream_core
35+
stream_core: ^0.1.0
4136
uuid: ^4.5.1
4237

4338
dev_dependencies:
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import 'package:stream_feeds/src/client/feeds_client_impl.dart';
2+
import 'package:stream_feeds/stream_feeds.dart';
3+
import 'package:test/test.dart';
4+
5+
const testToken =
6+
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoibHVrZV9za3l3YWxrZXIifQ.hZ59SWtp_zLKVV9ShkqkTsCGi_jdPHly7XNCf5T_Ev0';
7+
void main() {
8+
test('Create a feeds client', () {
9+
final client = StreamFeedsClient(
10+
apiKey: 'apiKey',
11+
user: const User(id: 'userId'),
12+
tokenProvider: TokenProvider.static(UserToken(testToken)),
13+
);
14+
15+
expect(client, isA<StreamFeedsClientImpl>());
16+
});
17+
}

0 commit comments

Comments
 (0)