Updated version of social client dependency

This commit is contained in:
Ahmed Salah Tawfik Ibrahim 2024-01-25 15:45:23 +01:00
parent e76b1c3af3
commit 67ad6eb052
3 changed files with 8 additions and 7 deletions

View File

@ -5,6 +5,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
## [v2.3.1]
- Fixed bug on getting ScopeDescriptor for new scopes.
- Updated version of Social Client dependency (#26508)
## [v2.3.0]

View File

@ -130,7 +130,7 @@
<dependency>
<groupId>org.gcube.social-networking</groupId>
<artifactId>social-service-client</artifactId>
<version>[1.0.0, 2.0.0-SNAPSHOT)</version>
<version>[2.0.0-SNAPSHOT, 3.0.0)</version>
</dependency>
<dependency>
<groupId>org.json</groupId>

View File

@ -9,7 +9,7 @@ import org.gcube.accounting.accounting.summary.access.model.update.AccountingRec
import org.gcube.dataharvest.AccountingDashboardHarvesterPlugin;
import org.gcube.dataharvest.datamodel.HarvestedDataKey;
import org.gcube.dataharvest.utils.Utils;
import org.gcube.portal.databook.shared.Feed;
import org.gcube.social_networking.socialnetworking.model.shared.Post;
import org.gcube.social_networking.social_networking_client_library.PostClient;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -67,18 +67,18 @@ public class SocialInteractionsHarvester extends BasicHarvester {
private void getJson() throws Exception {
PostClient postClient = new PostClient();
List<Feed> vrePosts = postClient.getPostsVRE();
List<Post> vrePosts = postClient.getPostsVRE();
likes = replies = posts = 0;
for(Feed feed : vrePosts) {
for(Post post : vrePosts) {
long time = feed.getTime().getTime();
long time = post.getTime().getTime();
if(start.getTime() <= time && time <= end.getTime()) {
posts++;
replies += Integer.valueOf(feed.getCommentsNo());
likes += Integer.valueOf(feed.getLikesNo());
replies += Integer.valueOf(post.getCommentsNo());
likes += Integer.valueOf(post.getLikesNo());
}
}