Compare commits
1 Commits
master
...
Feature/26
Author | SHA1 | Date |
---|---|---|
Ahmed Salah Tawfik Ibrahim | 67ad6eb052 |
|
@ -5,6 +5,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
||||||
## [v2.3.1]
|
## [v2.3.1]
|
||||||
|
|
||||||
- Fixed bug on getting ScopeDescriptor for new scopes.
|
- Fixed bug on getting ScopeDescriptor for new scopes.
|
||||||
|
- Updated version of Social Client dependency (#26508)
|
||||||
|
|
||||||
|
|
||||||
## [v2.3.0]
|
## [v2.3.0]
|
||||||
|
|
2
pom.xml
2
pom.xml
|
@ -130,7 +130,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.social-networking</groupId>
|
<groupId>org.gcube.social-networking</groupId>
|
||||||
<artifactId>social-service-client</artifactId>
|
<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>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.json</groupId>
|
<groupId>org.json</groupId>
|
||||||
|
|
|
@ -9,7 +9,7 @@ import org.gcube.accounting.accounting.summary.access.model.update.AccountingRec
|
||||||
import org.gcube.dataharvest.AccountingDashboardHarvesterPlugin;
|
import org.gcube.dataharvest.AccountingDashboardHarvesterPlugin;
|
||||||
import org.gcube.dataharvest.datamodel.HarvestedDataKey;
|
import org.gcube.dataharvest.datamodel.HarvestedDataKey;
|
||||||
import org.gcube.dataharvest.utils.Utils;
|
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.gcube.social_networking.social_networking_client_library.PostClient;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
@ -67,18 +67,18 @@ public class SocialInteractionsHarvester extends BasicHarvester {
|
||||||
|
|
||||||
private void getJson() throws Exception {
|
private void getJson() throws Exception {
|
||||||
PostClient postClient = new PostClient();
|
PostClient postClient = new PostClient();
|
||||||
List<Feed> vrePosts = postClient.getPostsVRE();
|
List<Post> vrePosts = postClient.getPostsVRE();
|
||||||
|
|
||||||
likes = replies = posts = 0;
|
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()) {
|
if(start.getTime() <= time && time <= end.getTime()) {
|
||||||
posts++;
|
posts++;
|
||||||
replies += Integer.valueOf(feed.getCommentsNo());
|
replies += Integer.valueOf(post.getCommentsNo());
|
||||||
likes += Integer.valueOf(feed.getLikesNo());
|
likes += Integer.valueOf(post.getLikesNo());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue