File tree Expand file tree Collapse file tree
main/java/io/getstream/core/models
test/java/io/getstream/client Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ package io .getstream .core .models ;
2+
3+ import com .fasterxml .jackson .annotation .JsonCreator ;
4+ import com .fasterxml .jackson .annotation .JsonProperty ;
5+
6+ public class APIError {
7+ private String Code ;
8+ private String Message ;
9+ private String Status ;
10+
11+ public String toString () {
12+ return "{Code='" + Code + "', Message=" + Message + "}" ;
13+ }
14+ // Default constructor
15+ public APIError () {}
16+
17+ // Constructor with parameters
18+ @ JsonCreator
19+ public APIError (
20+ @ JsonProperty ("code" ) String code ,
21+ @ JsonProperty ("message" ) String message ,
22+ @ JsonProperty ("status" ) String status ) {
23+ this .Code = code ;
24+ this .Message = message ;
25+ this .Status = status ;
26+ }
27+
28+ // Getters
29+ public String getCode () {
30+ return Code ;
31+ }
32+
33+ public String getMessage () {
34+ return Message ;
35+ }
36+ }
Original file line number Diff line number Diff line change @@ -42,31 +42,3 @@ public String getOriginFeed() {
4242 return OriginFeed ;
4343 }
4444}
45- class APIError {
46- private String Code ;
47- private String Message ;
48- private String Status ;
49-
50- // Default constructor
51- public APIError () {}
52-
53- // Constructor with parameters
54- @ JsonCreator
55- public APIError (
56- @ JsonProperty ("code" ) String code ,
57- @ JsonProperty ("message" ) String message ,
58- @ JsonProperty ("status" ) String status ) {
59- this .Code = code ;
60- this .Message = message ;
61- this .Status = status ;
62- }
63-
64- // Getters
65- public String getCode () {
66- return Code ;
67- }
68-
69- public String getMessage () {
70- return Message ;
71- }
72- }
Original file line number Diff line number Diff line change @@ -22,17 +22,7 @@ public class ModerationClientTest {
2222 Client client ;
2323 @ Before
2424 public void setUp ()throws Exception {
25- client = Client .builder (apiKey , secret ).build ();
26- }
27- public static String addSpacesAfterEachChar (String str ) {
28- StringBuilder stringBuilder = new StringBuilder (); // Using StringBuilder for efficiency
29-
30- for (int i = 0 ; i < str .length (); i ++) {
31- stringBuilder .append (str .charAt (i )); // Append the character
32- stringBuilder .append (' ' ); // Append a space
33- }
34-
35- return stringBuilder .toString ().trim (); // Convert to string and remove the trailing space
25+ client = Client .builder (apiKey , secret ).build ();
3626 }
3727 @ Test
3828 public void testFlagUser () throws Exception {
@@ -122,7 +112,7 @@ public void testActivityModeratedReactions() throws Exception {
122112 kind ("like" ).
123113 activityID (activityResponse .getID ()).
124114 userID ("user123" ).
125- extraField ("p " ,"pissoar" ).
115+ extraField ("text " ,"pissoar" ).
126116 moderationTemplate ("moderation_template_reaction" ).
127117 build ();
128118
You can’t perform that action at this time.
0 commit comments