Skip to content
This repository was archived by the owner on Aug 10, 2022. It is now read-only.

Commit 9b3eb3c

Browse files
committed
Testing JavaDocs
1 parent d3dcb77 commit 9b3eb3c

2 files changed

Lines changed: 149 additions & 0 deletions

File tree

src/main/java/dev/jgapi/jg_api/entities/calendars/CalendarEvent.java

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,24 @@ public class CalendarEvent extends GuildedObject {
2424
private Instant createdAt;
2525
private CalendarEventCancellation cancellation;
2626

27+
/**
28+
*
29+
* @param jg_api
30+
* @param calendarId
31+
* @param serverId
32+
* @param channelId
33+
* @param name
34+
* @param description
35+
* @param location
36+
* @param url
37+
* @param color
38+
* @param startsAt
39+
* @param duration
40+
* @param isPrivate
41+
* @param mentions
42+
* @param createdAt
43+
* @param cancellation
44+
*/
2745
public CalendarEvent(JG_API jg_api, int calendarId, String serverId, String channelId, String name, String description, String location, String url, int color, Instant startsAt, int duration, boolean isPrivate, Mentions mentions, Instant createdAt, CalendarEventCancellation cancellation) {
2846
super(jg_api);
2947
this.calendarId = calendarId;
@@ -42,6 +60,12 @@ public CalendarEvent(JG_API jg_api, int calendarId, String serverId, String chan
4260
this.cancellation = cancellation;
4361
}
4462

63+
/**
64+
*
65+
* @param calendarEventObj
66+
* @param jg_api
67+
* @return CalendarEvent
68+
*/
4569
public static CalendarEvent parseCalendarEventObj(JSONObject calendarEventObj, JG_API jg_api) {
4670
JSONObject mentionsObj = calendarEventObj.optJSONObject("mentions", null);
4771
JSONObject cancellationObj = calendarEventObj.optJSONObject("cancellation", null);
@@ -68,98 +92,210 @@ public static CalendarEvent parseCalendarEventObj(JSONObject calendarEventObj, J
6892
);
6993
}
7094

95+
/**
96+
*
97+
* @return calendarId
98+
*/
7199
public int getCalendarId() {
72100
return this.calendarId;
73101
}
74102

103+
/**
104+
*
105+
* @return serverId
106+
*/
75107
public String getServerId() {
76108
return this.serverId;
77109
}
78110

111+
/**
112+
*
113+
* @return channelId
114+
*/
79115
public String getChannelId() {
80116
return this.channelId;
81117
}
82118

119+
/**
120+
*
121+
* @return name
122+
*/
83123
public String getName() {
84124
return this.name;
85125
}
86126

127+
/**
128+
*
129+
* @return description
130+
*/
87131
public String getDescription() {
88132
return this.description;
89133
}
90134

135+
/**
136+
*
137+
* @return location
138+
*/
91139
public String getLocation() {
92140
return this.location;
93141
}
94142

143+
/**
144+
*
145+
* @return url
146+
*/
95147
public String getUrl() {
96148
return this.url;
97149
}
98150

151+
/**
152+
*
153+
* @return color
154+
*/
99155
public int getColor() {
100156
return this.color;
101157
}
102158

159+
/**
160+
*
161+
* @return startsAt
162+
*/
103163
public Instant getStartsAt() {
104164
return this.startsAt;
105165
}
106166

167+
/**
168+
*
169+
* @return duration
170+
*/
107171
public int getDuration() {
108172
return this.duration;
109173
}
110174

175+
/**
176+
*
177+
* @return isPrivate
178+
*/
111179
public boolean isPrivate() {
112180
return this.isPrivate;
113181
}
114182

183+
/**
184+
*
185+
* @return Mentions
186+
*/
115187
public Mentions getMentions() {
116188
return this.mentions;
117189
}
118190

191+
/**
192+
*
193+
* @return createdAt
194+
*/
119195
public Instant getCreatedAt() {
120196
return this.createdAt;
121197
}
122198

199+
/**
200+
*
201+
* @return CalendarEventCancellation
202+
*/
123203
public CalendarEventCancellation getCancellation() {
124204
return this.cancellation;
125205
}
126206

207+
/**
208+
*
209+
* @param name
210+
* @return RestAction<CalendarEvent>
211+
*/
127212
public RestAction<CalendarEvent> setName(String name) {
128213
return this.jg_api.getRestClient().updateCalendarEvent(this.channelId, this.calendarId, name, this.description, this.location, this.startsAt, this.url, this.color, this.duration, this.isPrivate);
129214
}
130215

216+
/**
217+
*
218+
* @param description
219+
* @return RestAction<CalendarEvent>
220+
*/
131221
public RestAction<CalendarEvent> setDescription(String description) {
132222
return this.jg_api.getRestClient().updateCalendarEvent(this.channelId, this.calendarId, this.name, description, this.location, this.startsAt, this.url, this.color, this.duration, this.isPrivate);
133223
}
134224

225+
/**
226+
*
227+
* @param location
228+
* @return RestAction<CalendarEvent>
229+
*/
135230
public RestAction<CalendarEvent> setLocation(String location) {
136231
return this.jg_api.getRestClient().updateCalendarEvent(this.channelId, this.calendarId, this.name, this.description, location, this.startsAt, this.url, this.color, this.duration, this.isPrivate);
137232
}
138233

234+
/**
235+
*
236+
* @param startsAt
237+
* @return RestAction<CalendarEvent>
238+
*/
139239
public RestAction<CalendarEvent> setStart(Instant startsAt) {
140240
return this.jg_api.getRestClient().updateCalendarEvent(this.channelId, this.calendarId, this.name, this.description, this.location, startsAt, this.url, this.color, this.duration, this.isPrivate);
141241
}
142242

243+
/**
244+
*
245+
* @param url
246+
* @return RestAction<CalendarEvent>
247+
*/
143248
public RestAction<CalendarEvent> setURL(String url) {
144249
return this.jg_api.getRestClient().updateCalendarEvent(this.channelId, this.calendarId, this.name, this.description, this.location, this.startsAt, url, this.color, this.duration, this.isPrivate);
145250
}
146251

252+
/**
253+
*
254+
* @param color
255+
* @return RestAction<CalendarEvent>
256+
*/
147257
public RestAction<CalendarEvent> setColor(int color) {
148258
return this.jg_api.getRestClient().updateCalendarEvent(this.channelId, this.calendarId, this.name, this.description, this.location, this.startsAt, this.url, color, this.duration, this.isPrivate);
149259
}
150260

261+
/**
262+
*
263+
* @param duration
264+
* @return RestAction<CalendarEvent>
265+
*/
151266
public RestAction<CalendarEvent> setDuration(int duration) {
152267
return this.jg_api.getRestClient().updateCalendarEvent(this.channelId, this.calendarId, this.name, this.description, this.location, this.startsAt, this.url, this.color, duration, this.isPrivate);
153268
}
154269

270+
/**
271+
*
272+
* @param isPrivate
273+
* @return RestAction<CalendarEvent>
274+
*/
155275
public RestAction<CalendarEvent> setPrivate(boolean isPrivate) {
156276
return this.jg_api.getRestClient().updateCalendarEvent(this.channelId, this.calendarId, this.name, this.description, this.location, this.startsAt, this.url, this.color, this.duration, isPrivate);
157277
}
158278

279+
/**
280+
*
281+
* @return RestAction<Boolean>
282+
*/
159283
public RestAction<Boolean> delete() {
160284
return this.jg_api.getRestClient().deleteCalendarEvent(this.channelId, this.calendarId);
161285
}
162286

287+
/**
288+
*
289+
* @param name
290+
* @param description
291+
* @param location
292+
* @param startsAt
293+
* @param url
294+
* @param color
295+
* @param duration
296+
* @param isPrivate
297+
* @return CalendarEvent
298+
*/
163299
public RestAction<CalendarEvent> update(String name, String description, String location, Instant startsAt, String url, int color, int duration, boolean isPrivate) {
164300
return this.jg_api.getRestClient().updateCalendarEvent(this.channelId, this.calendarId, name, description, location, startsAt, url, color, duration, isPrivate);
165301
}

src/main/java/dev/jgapi/jg_api/entities/calendars/CalendarEventCancellation.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,28 @@ public class CalendarEventCancellation {
44
String description;
55
String createdBy;
66

7+
/**
8+
*
9+
* @param description
10+
* @param createdBy
11+
*/
712
public CalendarEventCancellation(String description, String createdBy) {
813
this.description = description;
914
this.createdBy = createdBy;
1015
}
1116

17+
/**
18+
*
19+
* @return description
20+
*/
1221
public String getDescription() {
1322
return description;
1423
}
1524

25+
/**
26+
*
27+
* @return createdBy
28+
*/
1629
public String getCreatedBy() {
1730
return createdBy;
1831
}

0 commit comments

Comments
 (0)