You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Wrong api call from getEnrichedCustomActivities #106
I want to use my custom enriched activity, and I tried to call getEnrichedCustomActivities, but it returns a list of activity data models.
I think it is because now this function is call getActivities api ([domain]/api/v1.0/feed/xxxx),
it should call getEnrichedActivities api ([domain]/api/v1.0/**enrich/**feed/xxxx), right?
@peterdeme hm...but I want to use Custom and Enriched Activities. If I use getEnrichedActivities, I need to create the convertor by myself. For Example:
call getEnrichedActivities
convert to MyCustomEnrichedActivity List
So I want to use these, seems that if these works I no need to convert two times (json -> enrichedActivities -> MyCustomEnrichedActivity list)
In CloudFlatFeed.java, by your function name, should get Enriched and Custom activity list. If I missed understanding, would you mind telling me what cases I can use these functions?
CompletableFuture<List> getEnrichedCustomActivities(
Class type,
Limit limit,
Offset offset,
Filter filter,
EnrichmentFlags flags,
String ranking)
throws StreamException {
final RequestOption[] options =
ranking == null
? new RequestOption[] {limit, offset, filter, flags, DefaultOptions.DEFAULT_MARKER}
: new RequestOption[] {
limit, offset, filter, flags, DefaultOptions.DEFAULT_MARKER, new Ranking(ranking)
};
return getClient() .getActivities(getID(), options) <-- works if call getEnrichedActivities?
.thenApply(
(Response response) -> {
try {
return deserializeContainer(response, type);
} catch (StreamException | IOException e) {
throw new CompletionException(e);
}
});
}
Activity
peterdeme commentedon Mar 25, 2022
@fso-seekers using any of these methods should call the enrich endpoint
fso-msrl commentedon Mar 28, 2022
@peterdeme hm...but I want to use Custom and Enriched Activities. If I use getEnrichedActivities, I need to create the convertor by myself. For Example:
So I want to use these, seems that if these works I no need to convert two times (json -> enrichedActivities -> MyCustomEnrichedActivity list)
In CloudFlatFeed.java, by your function name, should get Enriched and Custom activity list. If I missed understanding, would you mind telling me what cases I can use these functions?
CompletableFuture<List> getEnrichedCustomActivities(
Class type,
Limit limit,
Offset offset,
Filter filter,
EnrichmentFlags flags,
String ranking)
throws StreamException {
final RequestOption[] options =
ranking == null
? new RequestOption[] {limit, offset, filter, flags, DefaultOptions.DEFAULT_MARKER}
: new RequestOption[] {
limit, offset, filter, flags, DefaultOptions.DEFAULT_MARKER, new Ranking(ranking)
};
return getClient()
.getActivities(getID(), options)<-- works if call getEnrichedActivities?.thenApply(
(Response response) -> {
try {
return deserializeContainer(response, type);
} catch (StreamException | IOException e) {
throw new CompletionException(e);
}
});
}