-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
78d7a1a
commit c0645d6
Showing
4 changed files
with
135 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
When does Guilded4J currently correspond to the Guilded API standard? | ||
|
||
2023-02-02 01:16:00 | ||
072197a827ac7a96416c9658d9b9bc93d29734f6 | ||
2023-02-07 12:26:37 | ||
7fa1f91bb09ca5c2247f6789bdaf5813150cd9c7 |
54 changes: 54 additions & 0 deletions
54
src/main/java/vip/floatationdevice/guilded4j/enums/CalendarEventRepeatType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/* | ||
Copyright (C) 2021-2023 MCUmbrella & contributors | ||
Licensed under the MIT License. See LICENSE in the project root for license information. | ||
*/ | ||
|
||
package vip.floatationdevice.guilded4j.enums; | ||
|
||
public enum CalendarEventRepeatType | ||
{ | ||
ONCE, | ||
EVERY_DAY, | ||
EVERY_WEEK, | ||
EVERY_MONTH, | ||
CUSTOM; | ||
|
||
public static CalendarEventRepeatType fromString(String s) | ||
{ | ||
switch(s) | ||
{ | ||
case "once": | ||
return ONCE; | ||
case "everyDay": | ||
return EVERY_DAY; | ||
case "everyWeek": | ||
return EVERY_WEEK; | ||
case "everyMonth": | ||
return EVERY_MONTH; | ||
case "custom": | ||
return CUSTOM; | ||
default: | ||
throw new IllegalArgumentException("Unknown repeat type"); | ||
} | ||
} | ||
|
||
@Override | ||
public String toString() | ||
{ | ||
switch(this) | ||
{ | ||
case ONCE: | ||
return "once"; | ||
case EVERY_DAY: | ||
return "everyDay"; | ||
case EVERY_WEEK: | ||
return "everyWeek"; | ||
case EVERY_MONTH: | ||
return "everyMonth"; | ||
case CUSTOM: | ||
return "custom"; | ||
default: | ||
throw new RuntimeException("Should not happen"); | ||
} | ||
} | ||
} |
46 changes: 46 additions & 0 deletions
46
src/main/java/vip/floatationdevice/guilded4j/enums/Weekday.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
Copyright (C) 2021-2023 MCUmbrella & contributors | ||
Licensed under the MIT License. See LICENSE in the project root for license information. | ||
*/ | ||
|
||
package vip.floatationdevice.guilded4j.enums; | ||
|
||
public enum Weekday | ||
{ | ||
MON, | ||
TUE, | ||
WED, | ||
THU, | ||
FRI, | ||
SAT, | ||
SUN; | ||
|
||
public static Weekday fromString(String s) | ||
{ | ||
switch (s.toLowerCase()) | ||
{ | ||
case "monday": | ||
return MON; | ||
case "tuesday": | ||
return TUE; | ||
case "wednesday": | ||
return WED; | ||
case "thursday": | ||
return THU; | ||
case "friday": | ||
return FRI; | ||
case "saturday": | ||
return SAT; | ||
case "sunday": | ||
return SUN; | ||
default: | ||
throw new IllegalArgumentException("Invalid weekday"); | ||
} | ||
} | ||
|
||
@Override | ||
public String toString() | ||
{ | ||
return name().toLowerCase(); | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
src/main/java/vip/floatationdevice/guilded4j/object/misc/CalendatEventRepeatInfo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
Copyright (C) 2021-2023 MCUmbrella & contributors | ||
Licensed under the MIT License. See LICENSE in the project root for license information. | ||
*/ | ||
|
||
package vip.floatationdevice.guilded4j.object.misc; | ||
|
||
import vip.floatationdevice.guilded4j.enums.CalendarEventRepeatType; | ||
import vip.floatationdevice.guilded4j.enums.Weekday; | ||
|
||
public class CalendatEventRepeatInfo //TODO | ||
{ | ||
public enum Interval | ||
{ | ||
DAY, | ||
WEEK, | ||
MONTH, | ||
YEAR; | ||
|
||
@Override | ||
public String toString() | ||
{ | ||
return name().toLowerCase(); | ||
} | ||
} | ||
|
||
private CalendarEventRepeatType type; | ||
private Integer everyCount; | ||
private Interval interval; | ||
private Integer endsAfterOccurrences; | ||
private String endDate; | ||
private Weekday on; | ||
} |