Skip to content

Conversation

@xsahil03x
Copy link
Member

@xsahil03x xsahil03x commented Jun 6, 2021

Fixes: #55, Porting our Dart implementation in Java
https://github.com/GetStream/stream-feed-flutter

A sample usage

// APPID IS REQUIRED IN ORDER TO SUBSCRIBE FEEDS
CloudClient cloudClient = CloudClient.builder(apiKey, token, "chris", appId).build();

CloudFlatFeed chris = cloudClient.flatFeed("user", "chris");

// PRINTS ANY CHANGES IN THE FEED
var subscription = chris.subscribe(message -> System.out.println(message.toString())).get();

chris.addActivity(
      Activity.builder()
              .actor("SU:chris")
              .verb("tweet")
              .object("tweet:10")
              .extraField("message", "Beautiful bird!")
              .build()
     ).get();
     
subscription.cancel();

xsahil03x added 5 commits June 6, 2021 20:34
Signed-off-by: Sahil Kumar <xdsahil@gmail.com>
Signed-off-by: Sahil Kumar <xdsahil@gmail.com>
Signed-off-by: Sahil Kumar <xdsahil@gmail.com>
Signed-off-by: Sahil Kumar <xdsahil@gmail.com>
Signed-off-by: Sahil Kumar <xdsahil@gmail.com>
@xsahil03x xsahil03x marked this pull request as ready for review June 7, 2021 09:52
@xsahil03x xsahil03x requested a review from ferhatelmas as a code owner June 7, 2021 09:52
@xsahil03x
Copy link
Member Author

@ferhatelmas I have a different formatting configuration in my IntelliJ, so can you also maybe reformat all and push.

@ferhatelmas
Copy link
Contributor

can you also maybe reformat all and push.

@xsahil03x don't worry about it, will update CI to do it automatically.

Signed-off-by: xsahil03x <xdsahil@gmail.com>
Signed-off-by: xsahil03x <xdsahil@gmail.com>
@ferhatelmas ferhatelmas requested a review from peterdeme January 11, 2022 12:58
@ferhatelmas
Copy link
Contributor

@peterdeme let's review and try to release this

Comment on lines +45 to +49
if (url.startsWith("http")) {
url = url.replace("http", "ws");
} else if (url.startsWith("https")) {
url = url.replace("https", "wss");
}
Copy link
Contributor

@peterdeme peterdeme Jan 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this logic will work how you imagined. You need to swap the conditions.

Copy link
Contributor

@peterdeme peterdeme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xsahil03x looks good to me except for my small comment. Can you add tests too?

@peterdeme
Copy link
Contributor

@xsahil03x @ferhatelmas I copied the contents of this PR and opened a new one: #110

Please follow that one. @xsahil03x - thanks so much for your contribution 🙏 we'll try to release it ASAP.

@peterdeme peterdeme closed this May 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

How I could subscribe to changes like Javascript does

3 participants