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
9 changes: 5 additions & 4 deletions src/main/java/io/getstream/cloud/CloudAggregatedFeed.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import static io.getstream.core.utils.Serialization.deserializeContainer;

import io.getstream.core.exceptions.StreamException;
import io.getstream.core.http.Response;
import io.getstream.core.models.Activity;
import io.getstream.core.models.EnrichedActivity;
import io.getstream.core.models.FeedID;
Expand Down Expand Up @@ -109,7 +110,7 @@ CompletableFuture<? extends List<? extends Group<Activity>>> getActivities(
return getClient()
.getActivities(getID(), limit, offset, filter, marker)
.thenApply(
response -> {
(Response response) -> {
try {
return deserializeContainer(response, Group.class, Activity.class);
} catch (StreamException | IOException e) {
Expand Down Expand Up @@ -214,7 +215,7 @@ <T> CompletableFuture<? extends List<? extends Group<T>>> getCustomActivities(
return getClient()
.getActivities(getID(), limit, offset, filter, marker)
.thenApply(
response -> {
(Response response) -> {
try {
return deserializeContainer(response, Group.class, type);
} catch (StreamException | IOException e) {
Expand Down Expand Up @@ -441,7 +442,7 @@ CompletableFuture<? extends List<? extends Group<EnrichedActivity>>> getEnriched
return getClient()
.getEnrichedActivities(getID(), limit, offset, filter, marker, flags)
.thenApply(
response -> {
(Response response) -> {
try {
return deserializeContainer(response, Group.class, EnrichedActivity.class);
} catch (StreamException | IOException e) {
Expand Down Expand Up @@ -695,7 +696,7 @@ <T> CompletableFuture<? extends List<? extends Group<T>>> getEnrichedCustomActiv
return getClient()
.getEnrichedActivities(getID(), limit, offset, filter, marker, flags)
.thenApply(
response -> {
(Response response) -> {
try {
return deserializeContainer(response, Group.class, type);
} catch (StreamException | IOException e) {
Expand Down
19 changes: 10 additions & 9 deletions src/main/java/io/getstream/cloud/CloudFeed.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import com.google.common.collect.Iterables;
import io.getstream.core.exceptions.StreamException;
import io.getstream.core.http.Response;
import io.getstream.core.models.Activity;
import io.getstream.core.models.FeedID;
import io.getstream.core.models.FollowRelation;
Expand Down Expand Up @@ -90,7 +91,7 @@ public final <T> CompletableFuture<List<T>> addCustomActivities(Iterable<T> acti
return getClient()
.addActivities(id, custom)
.thenApply(
response -> {
(Response response) -> {
try {
Class<T> element =
(Class<T>)
Expand All @@ -108,7 +109,7 @@ public final CompletableFuture<List<Activity>> addActivities(Activity... activit
return getClient()
.addActivities(id, activities)
.thenApply(
response -> {
(Response response) -> {
try {
return deserializeContainer(response, "activities", Activity.class);
} catch (StreamException | IOException e) {
Expand All @@ -126,7 +127,7 @@ public final <T> CompletableFuture<List<T>> addCustomActivities(T... activities)
return getClient()
.addActivities(id, custom)
.thenApply(
response -> {
(Response response) -> {
try {
Class<T> element = (Class<T>) activities.getClass().getComponentType();
return deserializeContainer(response, "activities", element);
Expand All @@ -140,7 +141,7 @@ public final CompletableFuture<Void> removeActivityByID(String id) throws Stream
return client
.removeActivityByID(this.id, id)
.thenApply(
response -> {
(Response response) -> {
try {
return deserializeError(response);
} catch (StreamException | IOException e) {
Expand All @@ -154,7 +155,7 @@ public final CompletableFuture<Void> removeActivityByForeignID(String foreignID)
return client
.removeActivityByForeignID(id, foreignID)
.thenApply(
response -> {
(Response response) -> {
try {
return deserializeError(response);
} catch (StreamException | IOException e) {
Expand All @@ -177,7 +178,7 @@ public final CompletableFuture<Void> follow(CloudFlatFeed feed, int activityCopy
return client
.follow(id, feed.getID(), activityCopyLimit)
.thenApply(
response -> {
(Response response) -> {
try {
return deserializeError(response);
} catch (StreamException | IOException e) {
Expand Down Expand Up @@ -240,7 +241,7 @@ limit, offset, new CustomQueryParameter("filter", String.join(",", feedIDs))
return client
.getFollowers(id, options)
.thenApply(
response -> {
(Response response) -> {
try {
return deserializeContainer(response, FollowRelation.class);
} catch (StreamException | IOException e) {
Expand Down Expand Up @@ -303,7 +304,7 @@ limit, offset, new CustomQueryParameter("filter", String.join(",", feedIDs))
return client
.getFollowed(id, options)
.thenApply(
response -> {
(Response response) -> {
try {
return deserializeContainer(response, FollowRelation.class);
} catch (StreamException | IOException e) {
Expand All @@ -321,7 +322,7 @@ public final CompletableFuture<Void> unfollow(
return client
.unfollow(id, feed.getID(), new io.getstream.core.options.KeepHistory(keepHistory))
.thenApply(
response -> {
(Response response) -> {
try {
return deserializeError(response);
} catch (StreamException | IOException e) {
Expand Down
9 changes: 5 additions & 4 deletions src/main/java/io/getstream/cloud/CloudFlatFeed.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import static io.getstream.core.utils.Serialization.deserializeContainer;

import io.getstream.core.exceptions.StreamException;
import io.getstream.core.http.Response;
import io.getstream.core.models.Activity;
import io.getstream.core.models.EnrichedActivity;
import io.getstream.core.models.FeedID;
Expand Down Expand Up @@ -95,7 +96,7 @@ limit, offset, filter, DefaultOptions.DEFAULT_MARKER, new Ranking(ranking)
return getClient()
.getActivities(getID(), options)
.thenApply(
response -> {
(Response response) -> {
try {
return deserializeContainer(response, Activity.class);
} catch (StreamException | IOException e) {
Expand Down Expand Up @@ -191,7 +192,7 @@ limit, offset, filter, DefaultOptions.DEFAULT_MARKER, new Ranking(ranking)
return getClient()
.getActivities(getID(), options)
.thenApply(
response -> {
(Response response) -> {
try {
return deserializeContainer(response, type);
} catch (StreamException | IOException e) {
Expand Down Expand Up @@ -407,7 +408,7 @@ limit, offset, filter, flags, DefaultOptions.DEFAULT_MARKER, new Ranking(ranking
return getClient()
.getEnrichedActivities(getID(), options)
.thenApply(
response -> {
(Response response) -> {
try {
return deserializeContainer(response, EnrichedActivity.class);
} catch (StreamException | IOException e) {
Expand Down Expand Up @@ -649,7 +650,7 @@ limit, offset, filter, flags, DefaultOptions.DEFAULT_MARKER, new Ranking(ranking
return getClient()
.getActivities(getID(), options)
.thenApply(
response -> {
(Response response) -> {
try {
return deserializeContainer(response, type);
} catch (StreamException | IOException e) {
Expand Down
9 changes: 5 additions & 4 deletions src/main/java/io/getstream/cloud/CloudNotificationFeed.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import static io.getstream.core.utils.Serialization.deserializeContainer;

import io.getstream.core.exceptions.StreamException;
import io.getstream.core.http.Response;
import io.getstream.core.models.Activity;
import io.getstream.core.models.EnrichedActivity;
import io.getstream.core.models.FeedID;
Expand Down Expand Up @@ -122,7 +123,7 @@ CompletableFuture<List<NotificationGroup<Activity>>> getActivities(
return getClient()
.getActivities(getID(), limit, offset, filter, marker)
.thenApply(
response -> {
(Response response) -> {
try {
return deserializeContainer(response, NotificationGroup.class, Activity.class);
} catch (StreamException | IOException e) {
Expand Down Expand Up @@ -240,7 +241,7 @@ <T> CompletableFuture<List<NotificationGroup<T>>> getCustomActivities(
return getClient()
.getActivities(getID(), limit, offset, filter, marker)
.thenApply(
response -> {
(Response response) -> {
try {
return deserializeContainer(response, NotificationGroup.class, type);
} catch (StreamException | IOException e) {
Expand Down Expand Up @@ -492,7 +493,7 @@ CompletableFuture<List<NotificationGroup<EnrichedActivity>>> getEnrichedActiviti
return getClient()
.getEnrichedActivities(getID(), limit, offset, filter, marker, flags)
.thenApply(
response -> {
(Response response) -> {
try {
return deserializeContainer(
response, NotificationGroup.class, EnrichedActivity.class);
Expand Down Expand Up @@ -772,7 +773,7 @@ <T> CompletableFuture<List<NotificationGroup<T>>> getEnrichedCustomActivities(
return getClient()
.getEnrichedActivities(getID(), limit, offset, filter, marker, flags)
.thenApply(
response -> {
(Response response) -> {
try {
return deserializeContainer(response, NotificationGroup.class, type);
} catch (StreamException | IOException e) {
Expand Down