-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Candidate Date Picker. fixes #246 @3h
- Loading branch information
みぞ@CrazyBeatCoder
committed
Dec 24, 2017
1 parent
d719488
commit 36f53e2
Showing
17 changed files
with
302 additions
and
34 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
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
11 changes: 11 additions & 0 deletions
11
src/main/java/com/mizo0203/hoshiguma/repo/line/messaging/data/MessageObject.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,11 @@ | ||
package com.mizo0203.hoshiguma.repo.line.messaging.data; | ||
|
||
@SuppressWarnings({"unused", "WeakerAccess"}) | ||
public abstract class MessageObject { | ||
|
||
public final String type; | ||
|
||
public MessageObject(String type) { | ||
this.type = type; | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
src/main/java/com/mizo0203/hoshiguma/repo/line/messaging/data/PostBack.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,14 @@ | ||
package com.mizo0203.hoshiguma.repo.line.messaging.data; | ||
|
||
public class PostBack { | ||
|
||
public String data; | ||
public Params params; | ||
|
||
public static class Params { | ||
|
||
public String date; | ||
public String time; | ||
public String datetime; | ||
} | ||
} |
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
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
16 changes: 16 additions & 0 deletions
16
src/main/java/com/mizo0203/hoshiguma/repo/line/messaging/data/TemplateMessageObject.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,16 @@ | ||
package com.mizo0203.hoshiguma.repo.line.messaging.data; | ||
|
||
import com.mizo0203.hoshiguma.repo.line.messaging.data.template.Template; | ||
|
||
@SuppressWarnings({"unused", "WeakerAccess"}) | ||
public class TemplateMessageObject extends MessageObject { | ||
|
||
public final String altText; | ||
public final Template template; | ||
|
||
public TemplateMessageObject(String altText, Template template) { | ||
super("template"); | ||
this.altText = altText; | ||
this.template = template; | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
src/main/java/com/mizo0203/hoshiguma/repo/line/messaging/data/TextMessageObject.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,12 @@ | ||
package com.mizo0203.hoshiguma.repo.line.messaging.data; | ||
|
||
@SuppressWarnings({"unused", "WeakerAccess"}) | ||
public class TextMessageObject extends MessageObject { | ||
|
||
public final String text; | ||
|
||
public TextMessageObject(String text) { | ||
super("text"); | ||
this.text = text; | ||
} | ||
} |
6 changes: 4 additions & 2 deletions
6
...a/repo/line/messaging/data/EventData.java → ...ne/messaging/data/WebHookEventObject.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 |
---|---|---|
@@ -1,13 +1,15 @@ | ||
package com.mizo0203.hoshiguma.repo.line.messaging.data; | ||
|
||
@SuppressWarnings({"unused", "WeakerAccess"}) | ||
public class EventData { | ||
@SuppressWarnings({"unused", "WeakerAccess", "SpellCheckingInspection"}) | ||
public class WebHookEventObject { | ||
|
||
public static final String TYPE_JOIN = "join"; | ||
public static final String TYPE_MESSAGE = "message"; | ||
public static final String TYPE_POST_BACK = "postback"; | ||
public String replyToken; | ||
public String type; | ||
public long timestamp; | ||
public SourceData source; | ||
public MessageData message; | ||
public PostBack postback; | ||
} |
11 changes: 11 additions & 0 deletions
11
src/main/java/com/mizo0203/hoshiguma/repo/line/messaging/data/action/Action.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,11 @@ | ||
package com.mizo0203.hoshiguma.repo.line.messaging.data.action; | ||
|
||
public abstract class Action { | ||
|
||
public final String type; | ||
|
||
public Action(String type) { | ||
this.type = type; | ||
} | ||
|
||
} |
43 changes: 43 additions & 0 deletions
43
...ain/java/com/mizo0203/hoshiguma/repo/line/messaging/data/action/DateTimePickerAction.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,43 @@ | ||
package com.mizo0203.hoshiguma.repo.line.messaging.data.action; | ||
|
||
@SuppressWarnings({"unused", "WeakerAccess"}) | ||
public class DateTimePickerAction extends Action { | ||
|
||
public String label; | ||
public String data; | ||
public String mode; | ||
public String initial; | ||
public String max; | ||
public String min; | ||
|
||
public DateTimePickerAction(String data, Mode mode) { | ||
super("datetimepicker"); | ||
this.data = data; | ||
this.mode = mode.toString(); | ||
} | ||
|
||
public DateTimePickerAction label(String label) { | ||
this.label = label; | ||
return this; | ||
} | ||
|
||
public enum Mode { | ||
DATE, | ||
TIME, | ||
DATE_TIME,; | ||
|
||
@Override | ||
public String toString() { | ||
switch (this) { | ||
case DATE: | ||
return "date"; | ||
case TIME: | ||
return "time"; | ||
case DATE_TIME: | ||
return "datetime"; | ||
default: | ||
throw new IllegalStateException(super.toString()); | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.