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

Commit 864d960

Browse files
committed
Added presets and enhanced requirement classes. Finished API requirements generator.
1 parent 5564de9 commit 864d960

File tree

4 files changed

+215
-82
lines changed

4 files changed

+215
-82
lines changed

src/main/java/org/codeoverflow/chatoverflow/api/io/input/event/TipeeestreamEventInput.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import java.util.function.Consumer;
1010

11-
@IsRequirement(requires = "login for the TipeeeStream api")
11+
@IsRequirement(requires = "login for the TipeeeStream api", methodName = "tipeeeStream")
1212
public interface TipeeestreamEventInput extends EventInput<TipeeestreamEvent> {
1313

1414
/**
Lines changed: 121 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
package org.codeoverflow.chatoverflow.api.plugin.configuration;
22

3+
// THIS FILE IS GENERATED WHILE COMPILING. DO NOT CHANGE ANYTHING HERE!
4+
35
import org.codeoverflow.chatoverflow.api.io.input.FileInput;
46
import org.codeoverflow.chatoverflow.api.io.input.SampleInput;
57
import org.codeoverflow.chatoverflow.api.io.input.SerialInput;
68
import org.codeoverflow.chatoverflow.api.io.input.chat.DiscordChatInput;
79
import org.codeoverflow.chatoverflow.api.io.input.chat.MockUpChatInput;
8-
import org.codeoverflow.chatoverflow.api.io.input.event.TipeeestreamEventInput;
910
import org.codeoverflow.chatoverflow.api.io.input.chat.TwitchChatInput;
11+
import org.codeoverflow.chatoverflow.api.io.input.event.TipeeestreamEventInput;
12+
13+
// THIS FILE IS GENERATED WHILE COMPILING. DO NOT CHANGE ANYTHING HERE!
1014

1115
/**
12-
* Syntactic sugar for the plugin developer that provides all input requirements for him
16+
* Select a Input Requirement to get access to the desired platform or values.
1317
*/
1418
public class Input {
1519

@@ -20,87 +24,158 @@ public class Input {
2024
}
2125

2226
/**
23-
* Requires a twitch chat login that has to be created by the framework user.
27+
* Requires a file system access which has to be specified by the user.
2428
*
25-
* @param uniqueRequirementId any unique id by which your plugin can identify the requirement
26-
* @param displayName Is displayed to the framework user to tell him what to enter
27-
* @param isOptional true if this requirement is optional, false if mandatory
28-
* @return the requirement object
29+
* @param uniqueRequirementId a plugin unique identifier which is stored for your plugin
30+
* @param displayName a string to display to the user while setting your requirement
31+
* @param isOptional true if this requirement is optional, false if mandatory
32+
* @return the requirement object. Use the get() method only at runtime!
2933
*/
30-
public Requirement<TwitchChatInput> twitchChat(String uniqueRequirementId, String displayName, boolean isOptional) {
31-
return requirements.requireInput(uniqueRequirementId, displayName, isOptional, TwitchChatInput.class);
34+
public Requirement<FileInput> file(String uniqueRequirementId, String displayName, boolean isOptional) {
35+
return requirements.requireInput(uniqueRequirementId, displayName, isOptional, FileInput.class);
3236
}
3337

3438
/**
35-
* Requires a connected mockup chat that has to be submitted by the user.
39+
* Requires a file system access which has to be specified by the user.
3640
*
37-
* @param uniqueRequirementId any unique id by which your plugin can identify the requirement
38-
* @param displayName Is displayed to the framework user and to tell him what to enter
39-
* @param isOptional true if this requirement is optional, false if mandatory
40-
* @return the requirement object
41+
* @param uniqueRequirementId a plugin unique identifier which is stored for your plugin
42+
* @return the requirement object. Use the get() method only at runtime!
4143
*/
42-
public Requirement<MockUpChatInput> mockupChat(String uniqueRequirementId, String displayName, boolean isOptional) {
43-
return requirements.requireInput(uniqueRequirementId, displayName, isOptional, MockUpChatInput.class);
44+
public Requirement<FileInput> file(String uniqueRequirementId) {
45+
return requirements.requireInput(uniqueRequirementId, "File", false, FileInput.class);
4446
}
4547

4648
/**
47-
* Demonstration requirement for the sample input, to get a idea how requirements work
49+
* Requires a SampleInput which has to be specified by the user.
4850
*
49-
* @param uniqueRequirementId any unique id by which your plugin can identify the requirement
50-
* @param displayName Is displayed to the framework user and to tell him what to enter
51-
* @param isOptional true if this requirement is optional, false if mandatory
52-
* @return the requirement object
51+
* @param uniqueRequirementId a plugin unique identifier which is stored for your plugin
52+
* @param displayName a string to display to the user while setting your requirement
53+
* @param isOptional true if this requirement is optional, false if mandatory
54+
* @return the requirement object. Use the get() method only at runtime!
5355
*/
54-
public Requirement<SampleInput> sampleInput(String uniqueRequirementId, String displayName, boolean isOptional) {
56+
public Requirement<SampleInput> sample(String uniqueRequirementId, String displayName, boolean isOptional) {
5557
return requirements.requireInput(uniqueRequirementId, displayName, isOptional, SampleInput.class);
5658
}
5759

5860
/**
59-
* Requires a discord chat bot that has to be created by the framework user.
61+
* Requires a SampleInput which has to be specified by the user.
6062
*
61-
* @param uniqueRequirementId any unique id by which your plugin can identify the requirement
62-
* @param displayName Is displayed to the framework user to tell him what to enter
63-
* @param isOptional true if this requirement is optional, false if mandatory
64-
* @return the requirement object
63+
* @param uniqueRequirementId a plugin unique identifier which is stored for your plugin
64+
* @return the requirement object. Use the get() method only at runtime!
6565
*/
66-
public Requirement<DiscordChatInput> discordChat(String uniqueRequirementId, String displayName, boolean isOptional) {
67-
return requirements.requireInput(uniqueRequirementId, displayName, isOptional, DiscordChatInput.class);
66+
public Requirement<SampleInput> sample(String uniqueRequirementId) {
67+
return requirements.requireInput(uniqueRequirementId, "Sample", false, SampleInput.class);
6868
}
6969

7070
/**
71-
* Requires a connection with a device connected to a serial port (an Arduino for example)
71+
* Requires a connection with a device connected to a serial port (an Arduino for example) which has to be specified by the user.
7272
*
73-
* @param uniqueRequirementId any unique id by which your plugin can identify the requirement
74-
* @param displayName Is displayed to the framework user and to tell him what to enter
75-
* @param isOptional true if this requirement is optional, false if mandatory
76-
* @return the requirement object
73+
* @param uniqueRequirementId a plugin unique identifier which is stored for your plugin
74+
* @param displayName a string to display to the user while setting your requirement
75+
* @param isOptional true if this requirement is optional, false if mandatory
76+
* @return the requirement object. Use the get() method only at runtime!
7777
*/
7878
public Requirement<SerialInput> serial(String uniqueRequirementId, String displayName, boolean isOptional) {
7979
return requirements.requireInput(uniqueRequirementId, displayName, isOptional, SerialInput.class);
8080
}
8181

8282
/**
83-
* Requires a login for the TipeeeStream api that has to be created by the framework user.
83+
* Requires a connection with a device connected to a serial port (an Arduino for example) which has to be specified by the user.
84+
*
85+
* @param uniqueRequirementId a plugin unique identifier which is stored for your plugin
86+
* @return the requirement object. Use the get() method only at runtime!
87+
*/
88+
public Requirement<SerialInput> serial(String uniqueRequirementId) {
89+
return requirements.requireInput(uniqueRequirementId, "Serial", false, SerialInput.class);
90+
}
91+
92+
/**
93+
* Requires a discord chat bot which has to be specified by the user.
94+
*
95+
* @param uniqueRequirementId a plugin unique identifier which is stored for your plugin
96+
* @param displayName a string to display to the user while setting your requirement
97+
* @param isOptional true if this requirement is optional, false if mandatory
98+
* @return the requirement object. Use the get() method only at runtime!
99+
*/
100+
public Requirement<DiscordChatInput> discordChat(String uniqueRequirementId, String displayName, boolean isOptional) {
101+
return requirements.requireInput(uniqueRequirementId, displayName, isOptional, DiscordChatInput.class);
102+
}
103+
104+
/**
105+
* Requires a discord chat bot which has to be specified by the user.
106+
*
107+
* @param uniqueRequirementId a plugin unique identifier which is stored for your plugin
108+
* @return the requirement object. Use the get() method only at runtime!
109+
*/
110+
public Requirement<DiscordChatInput> discordChat(String uniqueRequirementId) {
111+
return requirements.requireInput(uniqueRequirementId, "Discord Chat", false, DiscordChatInput.class);
112+
}
113+
114+
/**
115+
* Requires a MockUpChatInput which has to be specified by the user.
116+
*
117+
* @param uniqueRequirementId a plugin unique identifier which is stored for your plugin
118+
* @param displayName a string to display to the user while setting your requirement
119+
* @param isOptional true if this requirement is optional, false if mandatory
120+
* @return the requirement object. Use the get() method only at runtime!
121+
*/
122+
public Requirement<MockUpChatInput> mockUpChat(String uniqueRequirementId, String displayName, boolean isOptional) {
123+
return requirements.requireInput(uniqueRequirementId, displayName, isOptional, MockUpChatInput.class);
124+
}
125+
126+
/**
127+
* Requires a MockUpChatInput which has to be specified by the user.
84128
*
85-
* @param uniqueRequirementId any unique id by which your plugin can identify the requirement
86-
* @param displayName Is displayed to the framework user and to tell him what to enter
87-
* @param isOptional true if this requirement is optional, false if mandatory
88-
* @return the requirement object
129+
* @param uniqueRequirementId a plugin unique identifier which is stored for your plugin
130+
* @return the requirement object. Use the get() method only at runtime!
131+
*/
132+
public Requirement<MockUpChatInput> mockUpChat(String uniqueRequirementId) {
133+
return requirements.requireInput(uniqueRequirementId, "Mock Up Chat", false, MockUpChatInput.class);
134+
}
135+
136+
/**
137+
* Requires a TwitchChatInput which has to be specified by the user.
138+
*
139+
* @param uniqueRequirementId a plugin unique identifier which is stored for your plugin
140+
* @param displayName a string to display to the user while setting your requirement
141+
* @param isOptional true if this requirement is optional, false if mandatory
142+
* @return the requirement object. Use the get() method only at runtime!
143+
*/
144+
public Requirement<TwitchChatInput> twitchChat(String uniqueRequirementId, String displayName, boolean isOptional) {
145+
return requirements.requireInput(uniqueRequirementId, displayName, isOptional, TwitchChatInput.class);
146+
}
147+
148+
/**
149+
* Requires a TwitchChatInput which has to be specified by the user.
150+
*
151+
* @param uniqueRequirementId a plugin unique identifier which is stored for your plugin
152+
* @return the requirement object. Use the get() method only at runtime!
153+
*/
154+
public Requirement<TwitchChatInput> twitchChat(String uniqueRequirementId) {
155+
return requirements.requireInput(uniqueRequirementId, "Twitch Chat", false, TwitchChatInput.class);
156+
}
157+
158+
/**
159+
* Requires a login for the TipeeeStream api which has to be specified by the user.
160+
*
161+
* @param uniqueRequirementId a plugin unique identifier which is stored for your plugin
162+
* @param displayName a string to display to the user while setting your requirement
163+
* @param isOptional true if this requirement is optional, false if mandatory
164+
* @return the requirement object. Use the get() method only at runtime!
89165
*/
90166
public Requirement<TipeeestreamEventInput> tipeeeStream(String uniqueRequirementId, String displayName, boolean isOptional) {
91167
return requirements.requireInput(uniqueRequirementId, displayName, isOptional, TipeeestreamEventInput.class);
92168
}
93169

94170
/**
95-
* @param uniqueRequirementId any unique id by which your plugin can identify the requirement
96-
* @param displayName Is displayed to the framework user and to tell him what to enter
97-
* @param isOptional true if this requirement is optional, false if mandatory
98-
* @return the requirement object
171+
* Requires a login for the TipeeeStream api which has to be specified by the user.
172+
*
173+
* @param uniqueRequirementId a plugin unique identifier which is stored for your plugin
174+
* @return the requirement object. Use the get() method only at runtime!
99175
*/
100-
public Requirement<FileInput> file(String uniqueRequirementId, String displayName, boolean isOptional) {
101-
return requirements.requireInput(uniqueRequirementId, displayName, isOptional, FileInput.class);
176+
public Requirement<TipeeestreamEventInput> tipeeeStream(String uniqueRequirementId) {
177+
return requirements.requireInput(uniqueRequirementId, "Tipeeestream Event", false, TipeeestreamEventInput.class);
102178
}
103179

104-
// Add more inputs here
105180

106181
}

0 commit comments

Comments
 (0)