Skip to content

Commit 6dcacf6

Browse files
committed
0.0.11 - api to get feed post stats (reacts, counts)
1 parent 63fde89 commit 6dcacf6

22 files changed

+1424
-9
lines changed

client/.openapi-generator/FILES

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ docs/FeedPost.md
7878
docs/FeedPostLink.md
7979
docs/FeedPostMediaItem.md
8080
docs/FeedPostMediaItemAsset.md
81+
docs/FeedPostStats.md
82+
docs/FeedPostsStatsResponse.md
8183
docs/FindCommentsByRangeItem.md
8284
docs/FindCommentsByRangeResponse.md
8385
docs/FlagComment200Response.md
@@ -102,6 +104,7 @@ docs/GetEventLogResponse.md
102104
docs/GetFeedPosts200Response.md
103105
docs/GetFeedPostsPublic200Response.md
104106
docs/GetFeedPostsResponse.md
107+
docs/GetFeedPostsStats200Response.md
105108
docs/GetMyNotificationsResponse.md
106109
docs/GetUserBadge200Response.md
107110
docs/GetUserBadgeProgressById200Response.md
@@ -300,6 +303,8 @@ src/main/java/com/fastcomments/model/FeedPost.java
300303
src/main/java/com/fastcomments/model/FeedPostLink.java
301304
src/main/java/com/fastcomments/model/FeedPostMediaItem.java
302305
src/main/java/com/fastcomments/model/FeedPostMediaItemAsset.java
306+
src/main/java/com/fastcomments/model/FeedPostStats.java
307+
src/main/java/com/fastcomments/model/FeedPostsStatsResponse.java
303308
src/main/java/com/fastcomments/model/FindCommentsByRangeItem.java
304309
src/main/java/com/fastcomments/model/FindCommentsByRangeResponse.java
305310
src/main/java/com/fastcomments/model/FlagComment200Response.java
@@ -324,6 +329,7 @@ src/main/java/com/fastcomments/model/GetEventLogResponse.java
324329
src/main/java/com/fastcomments/model/GetFeedPosts200Response.java
325330
src/main/java/com/fastcomments/model/GetFeedPostsPublic200Response.java
326331
src/main/java/com/fastcomments/model/GetFeedPostsResponse.java
332+
src/main/java/com/fastcomments/model/GetFeedPostsStats200Response.java
327333
src/main/java/com/fastcomments/model/GetMyNotificationsResponse.java
328334
src/main/java/com/fastcomments/model/GetUserBadge200Response.java
329335
src/main/java/com/fastcomments/model/GetUserBadgeProgressById200Response.java
@@ -492,7 +498,9 @@ src/test/java/com/fastcomments/model/FCommentTest.java
492498
src/test/java/com/fastcomments/model/FeedPostLinkTest.java
493499
src/test/java/com/fastcomments/model/FeedPostMediaItemAssetTest.java
494500
src/test/java/com/fastcomments/model/FeedPostMediaItemTest.java
501+
src/test/java/com/fastcomments/model/FeedPostStatsTest.java
495502
src/test/java/com/fastcomments/model/FeedPostTest.java
503+
src/test/java/com/fastcomments/model/FeedPostsStatsResponseTest.java
496504
src/test/java/com/fastcomments/model/FindCommentsByRangeItemTest.java
497505
src/test/java/com/fastcomments/model/FindCommentsByRangeResponseTest.java
498506
src/test/java/com/fastcomments/model/FlagComment200ResponseTest.java
@@ -517,6 +525,7 @@ src/test/java/com/fastcomments/model/GetEventLogResponseTest.java
517525
src/test/java/com/fastcomments/model/GetFeedPosts200ResponseTest.java
518526
src/test/java/com/fastcomments/model/GetFeedPostsPublic200ResponseTest.java
519527
src/test/java/com/fastcomments/model/GetFeedPostsResponseTest.java
528+
src/test/java/com/fastcomments/model/GetFeedPostsStats200ResponseTest.java
520529
src/test/java/com/fastcomments/model/GetMyNotificationsResponseTest.java
521530
src/test/java/com/fastcomments/model/GetUserBadge200ResponseTest.java
522531
src/test/java/com/fastcomments/model/GetUserBadgeProgressById200ResponseTest.java

client/README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Add this dependency to your project's POM:
4040
<dependency>
4141
<groupId>com.fastcomments</groupId>
4242
<artifactId>client</artifactId>
43-
<version>0.0.10</version>
43+
<version>0.0.11</version>
4444
<scope>compile</scope>
4545
</dependency>
4646
```
@@ -56,7 +56,7 @@ Add this dependency to your project's build file:
5656
}
5757
5858
dependencies {
59-
implementation "com.fastcomments:client:0.0.10"
59+
implementation "com.fastcomments:client:0.0.11"
6060
}
6161
```
6262

@@ -70,7 +70,7 @@ mvn clean package
7070

7171
Then manually install the following JARs:
7272

73-
* `target/client-0.0.10.jar`
73+
* `target/client-0.0.11.jar`
7474
* `target/lib/*.jar`
7575

7676
## Getting Started
@@ -168,6 +168,7 @@ Class | Method | HTTP request | Description
168168
*PublicApi* | [**getCommentsPublic**](docs/PublicApi.md#getCommentsPublic) | **GET** /comments/{tenantId} |
169169
*PublicApi* | [**getEventLog**](docs/PublicApi.md#getEventLog) | **GET** /event-log/{tenantId} |
170170
*PublicApi* | [**getFeedPostsPublic**](docs/PublicApi.md#getFeedPostsPublic) | **GET** /feed-posts/{tenantId} |
171+
*PublicApi* | [**getFeedPostsStats**](docs/PublicApi.md#getFeedPostsStats) | **GET** /feed-posts/{tenantId}/stats |
171172
*PublicApi* | [**getGlobalEventLog**](docs/PublicApi.md#getGlobalEventLog) | **GET** /event-log/global/{tenantId} |
172173
*PublicApi* | [**getUserNotificationCount**](docs/PublicApi.md#getUserNotificationCount) | **GET** /user-notifications/get-count |
173174
*PublicApi* | [**getUserNotifications**](docs/PublicApi.md#getUserNotifications) | **GET** /user-notifications |
@@ -264,6 +265,8 @@ Class | Method | HTTP request | Description
264265
- [FeedPostLink](docs/FeedPostLink.md)
265266
- [FeedPostMediaItem](docs/FeedPostMediaItem.md)
266267
- [FeedPostMediaItemAsset](docs/FeedPostMediaItemAsset.md)
268+
- [FeedPostStats](docs/FeedPostStats.md)
269+
- [FeedPostsStatsResponse](docs/FeedPostsStatsResponse.md)
267270
- [FindCommentsByRangeItem](docs/FindCommentsByRangeItem.md)
268271
- [FindCommentsByRangeResponse](docs/FindCommentsByRangeResponse.md)
269272
- [FlagComment200Response](docs/FlagComment200Response.md)
@@ -288,6 +291,7 @@ Class | Method | HTTP request | Description
288291
- [GetFeedPosts200Response](docs/GetFeedPosts200Response.md)
289292
- [GetFeedPostsPublic200Response](docs/GetFeedPostsPublic200Response.md)
290293
- [GetFeedPostsResponse](docs/GetFeedPostsResponse.md)
294+
- [GetFeedPostsStats200Response](docs/GetFeedPostsStats200Response.md)
291295
- [GetMyNotificationsResponse](docs/GetMyNotificationsResponse.md)
292296
- [GetUserBadge200Response](docs/GetUserBadge200Response.md)
293297
- [GetUserBadgeProgressById200Response](docs/GetUserBadgeProgressById200Response.md)

client/api/openapi.yaml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -987,6 +987,45 @@ paths:
987987
x-content-type: application/json
988988
x-accepts:
989989
- application/json
990+
/feed-posts/{tenantId}/stats:
991+
get:
992+
operationId: GetFeedPostsStats
993+
parameters:
994+
- explode: false
995+
in: path
996+
name: tenantId
997+
required: true
998+
schema:
999+
type: string
1000+
style: simple
1001+
- explode: true
1002+
in: query
1003+
name: postIds
1004+
required: true
1005+
schema:
1006+
items:
1007+
type: string
1008+
type: array
1009+
style: form
1010+
- explode: true
1011+
in: query
1012+
name: sso
1013+
required: false
1014+
schema:
1015+
type: string
1016+
style: form
1017+
responses:
1018+
"200":
1019+
content:
1020+
application/json:
1021+
schema:
1022+
$ref: '#/components/schemas/GetFeedPostsStats_200_response'
1023+
description: Ok
1024+
security: []
1025+
tags:
1026+
- Public
1027+
x-accepts:
1028+
- application/json
9901029
/event-log/{tenantId}:
9911030
get:
9921031
description: |2-
@@ -4811,6 +4850,44 @@ components:
48114850
properties: {}
48124851
type: object
48134852
type: object
4853+
FeedPostStats:
4854+
additionalProperties: false
4855+
example:
4856+
reacts:
4857+
key: 0
4858+
commentCount: 6
4859+
properties:
4860+
reacts:
4861+
additionalProperties:
4862+
format: int32
4863+
type: integer
4864+
properties: {}
4865+
type: object
4866+
commentCount:
4867+
format: int32
4868+
type: integer
4869+
type: object
4870+
FeedPostsStatsResponse:
4871+
additionalProperties: false
4872+
example:
4873+
stats:
4874+
key:
4875+
reacts:
4876+
key: 0
4877+
commentCount: 6
4878+
status: success
4879+
properties:
4880+
status:
4881+
$ref: '#/components/schemas/APIStatus'
4882+
stats:
4883+
additionalProperties:
4884+
$ref: '#/components/schemas/FeedPostStats'
4885+
properties: {}
4886+
type: object
4887+
required:
4888+
- stats
4889+
- status
4890+
type: object
48144891
EventLogEntry:
48154892
additionalProperties: false
48164893
example:
@@ -8723,6 +8800,10 @@ components:
87238800
anyOf:
87248801
- $ref: '#/components/schemas/DeleteFeedPostPublic_200_response_anyOf'
87258802
- $ref: '#/components/schemas/APIError'
8803+
GetFeedPostsStats_200_response:
8804+
anyOf:
8805+
- $ref: '#/components/schemas/FeedPostsStatsResponse'
8806+
- $ref: '#/components/schemas/APIError'
87268807
GetEventLog_200_response:
87278808
anyOf:
87288809
- $ref: '#/components/schemas/GetEventLogResponse'

client/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ apply plugin: 'java'
44
apply plugin: 'com.diffplug.spotless'
55

66
group = 'com.fastcomments'
7-
version = '0.0.10'
7+
version = '0.0.11'
88

99
buildscript {
1010
repositories {

client/build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ lazy val root = (project in file(".")).
22
settings(
33
organization := "com.fastcomments",
44
name := "client",
5-
version := "0.0.10",
5+
version := "0.0.11",
66
scalaVersion := "2.11.4",
77
scalacOptions ++= Seq("-feature"),
88
javacOptions in compile ++= Seq("-Xlint:deprecation"),

client/docs/FeedPostStats.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
3+
# FeedPostStats
4+
5+
6+
## Properties
7+
8+
| Name | Type | Description | Notes |
9+
|------------ | ------------- | ------------- | -------------|
10+
|**reacts** | **Map&lt;String, Integer&gt;** | | [optional] |
11+
|**commentCount** | **Integer** | | [optional] |
12+
13+
14+
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
3+
# FeedPostsStatsResponse
4+
5+
6+
## Properties
7+
8+
| Name | Type | Description | Notes |
9+
|------------ | ------------- | ------------- | -------------|
10+
|**status** | **APIStatus** | | |
11+
|**stats** | [**Map&lt;String, FeedPostStats&gt;**](FeedPostStats.md) | | |
12+
13+
14+
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
2+
3+
# GetFeedPostsStats200Response
4+
5+
6+
## Properties
7+
8+
| Name | Type | Description | Notes |
9+
|------------ | ------------- | ------------- | -------------|
10+
|**status** | **ImportedAPIStatusFAILED** | | |
11+
|**stats** | [**Map&lt;String, FeedPostStats&gt;**](FeedPostStats.md) | | |
12+
|**reason** | **String** | | |
13+
|**code** | **String** | | |
14+
|**secondaryCode** | **String** | | [optional] |
15+
|**bannedUntil** | **Double** | | [optional] |
16+
|**maxCharacterLength** | **Double** | | [optional] |
17+
|**translatedError** | **String** | | [optional] |
18+
|**customConfig** | [**CustomConfigParameters**](CustomConfigParameters.md) | | [optional] |
19+
20+
21+

client/docs/PublicApi.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ All URIs are relative to *http://localhost*
1818
| [**getCommentsPublic**](PublicApi.md#getCommentsPublic) | **GET** /comments/{tenantId} | |
1919
| [**getEventLog**](PublicApi.md#getEventLog) | **GET** /event-log/{tenantId} | |
2020
| [**getFeedPostsPublic**](PublicApi.md#getFeedPostsPublic) | **GET** /feed-posts/{tenantId} | |
21+
| [**getFeedPostsStats**](PublicApi.md#getFeedPostsStats) | **GET** /feed-posts/{tenantId}/stats | |
2122
| [**getGlobalEventLog**](PublicApi.md#getGlobalEventLog) | **GET** /event-log/global/{tenantId} | |
2223
| [**getUserNotificationCount**](PublicApi.md#getUserNotificationCount) | **GET** /user-notifications/get-count | |
2324
| [**getUserNotifications**](PublicApi.md#getUserNotifications) | **GET** /user-notifications | |
@@ -1022,6 +1023,72 @@ No authorization required
10221023
|-------------|-------------|------------------|
10231024
| **200** | Ok | - |
10241025

1026+
<a id="getFeedPostsStats"></a>
1027+
# **getFeedPostsStats**
1028+
> GetFeedPostsStats200Response getFeedPostsStats(tenantId, postIds).sso(sso).execute();
1029+
1030+
1031+
1032+
### Example
1033+
```java
1034+
// Import classes:
1035+
import com.fastcomments.invoker.ApiClient;
1036+
import com.fastcomments.invoker.ApiException;
1037+
import com.fastcomments.invoker.Configuration;
1038+
import com.fastcomments.invoker.models.*;
1039+
import com.fastcomments.api.PublicApi;
1040+
1041+
public class Example {
1042+
public static void main(String[] args) {
1043+
ApiClient defaultClient = Configuration.getDefaultApiClient();
1044+
defaultClient.setBasePath("http://localhost");
1045+
1046+
PublicApi apiInstance = new PublicApi(defaultClient);
1047+
String tenantId = "tenantId_example"; // String |
1048+
List<String> postIds = Arrays.asList(); // List<String> |
1049+
String sso = "sso_example"; // String |
1050+
try {
1051+
GetFeedPostsStats200Response result = apiInstance.getFeedPostsStats(tenantId, postIds)
1052+
.sso(sso)
1053+
.execute();
1054+
System.out.println(result);
1055+
} catch (ApiException e) {
1056+
System.err.println("Exception when calling PublicApi#getFeedPostsStats");
1057+
System.err.println("Status code: " + e.getCode());
1058+
System.err.println("Reason: " + e.getResponseBody());
1059+
System.err.println("Response headers: " + e.getResponseHeaders());
1060+
e.printStackTrace();
1061+
}
1062+
}
1063+
}
1064+
```
1065+
1066+
### Parameters
1067+
1068+
| Name | Type | Description | Notes |
1069+
|------------- | ------------- | ------------- | -------------|
1070+
| **tenantId** | **String**| | |
1071+
| **postIds** | [**List&lt;String&gt;**](String.md)| | |
1072+
| **sso** | **String**| | [optional] |
1073+
1074+
### Return type
1075+
1076+
[**GetFeedPostsStats200Response**](GetFeedPostsStats200Response.md)
1077+
1078+
### Authorization
1079+
1080+
No authorization required
1081+
1082+
### HTTP request headers
1083+
1084+
- **Content-Type**: Not defined
1085+
- **Accept**: application/json
1086+
1087+
### HTTP response details
1088+
| Status code | Description | Response headers |
1089+
|-------------|-------------|------------------|
1090+
| **200** | Ok | - |
1091+
10251092
<a id="getGlobalEventLog"></a>
10261093
# **getGlobalEventLog**
10271094
> GetEventLog200Response getGlobalEventLog(tenantId, urlId, userIdWS, startTime, endTime).execute();

client/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<artifactId>client</artifactId>
66
<packaging>jar</packaging>
77
<name>client</name>
8-
<version>0.0.10</version>
8+
<version>0.0.11</version>
99
<url>https://fastcomments.com</url>
1010
<description>FastComments API Client - A SDK for interacting with the FastComments API</description>
1111
<scm>

0 commit comments

Comments
 (0)