File tree Expand file tree Collapse file tree 18 files changed +39
-93
lines changed
src/main/java/com/vonage/quickstart Expand file tree Collapse file tree 18 files changed +39
-93
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ private EnvironmentVariables() {}
6363 * @param key the name of the environment variable
6464 * @return the value
6565 */
66- static String envVar (String key ) {
66+ public static String envVar (String key ) {
6767 String value = dotenv .get (key );
6868 if (value == null ) {
6969 throw new IllegalArgumentException ("You must provide the " + key + " environment variable!" );
Original file line number Diff line number Diff line change 2727import static com .vonage .quickstart .EnvironmentVariables .*;
2828
2929public class CreateInstantRoom {
30- public static void main (String [] args ) throws Exception {
31-
32- String VONAGE_APPLICATION_ID = VONAGE_APPLICATION_ID ;
33- String VONAGE_PRIVATE_KEY_PATH = VONAGE_PRIVATE_KEY_PATH ;
34- String DISPLAY_NAME = DISPLAY_NAME ;
30+ public static void main (String [] args ) throws Exception {
31+ String DISPLAY_NAME = envVar ("DISPLAY_NAME" );
3532
3633 VonageClient client = VonageClient .builder ()
3734 .applicationId (VONAGE_APPLICATION_ID )
Original file line number Diff line number Diff line change 2828import java .time .Instant ;
2929
3030public class CreateLongTermRoom {
31- public static void main (String [] args ) throws Exception {
32-
33- String VONAGE_APPLICATION_ID = VONAGE_APPLICATION_ID ;
34- String VONAGE_PRIVATE_KEY_PATH = VONAGE_PRIVATE_KEY_PATH ;
35- String DISPLAY_NAME = DISPLAY_NAME ;
36- Instant EXPIRATION_DATE = Instant .parse (EXPIRATION_DATE );
31+ public static void main (String [] args ) throws Exception {
32+ String DISPLAY_NAME = envVar ("DISPLAY_NAME" );
33+ Instant EXPIRATION_DATE = Instant .parse (envVar ("EXPIRATION_DATE" ));
3734
3835 VonageClient client = VonageClient .builder ()
3936 .applicationId (VONAGE_APPLICATION_ID )
Original file line number Diff line number Diff line change 2626import static com .vonage .quickstart .EnvironmentVariables .*;
2727
2828public class CreateTheme {
29- public static void main (String [] args ) throws Exception {
30-
31- String VONAGE_APPLICATION_ID = VONAGE_APPLICATION_ID ;
32- String VONAGE_PRIVATE_KEY_PATH = VONAGE_PRIVATE_KEY_PATH ;
33- String MAIN_COLOR = MAIN_COLOR ;
34- String BRAND_TEXT = BRAND_TEXT ;
29+ public static void main (String [] args ) throws Exception {
30+ String MAIN_COLOR = envVar ("MAIN_COLOR" );
31+ String BRAND_TEXT = envVar ("BRAND_TEXT" );
3532
3633 VonageClient client = VonageClient .builder ()
3734 .applicationId (VONAGE_APPLICATION_ID )
Original file line number Diff line number Diff line change 2626import java .util .UUID ;
2727
2828public class DeleteRecording {
29- public static void main (String [] args ) throws Exception {
30-
31- String VONAGE_APPLICATION_ID = VONAGE_APPLICATION_ID ;
32- String VONAGE_PRIVATE_KEY_PATH = VONAGE_PRIVATE_KEY_PATH ;
33- UUID RECORDING_ID = UUID .fromString (RECORDING_ID );
29+ public static void main (String [] args ) throws Exception {
30+ UUID RECORDING_ID = UUID .fromString (envVar ("RECORDING_ID" ));
3431
3532 VonageClient client = VonageClient .builder ()
3633 .applicationId (VONAGE_APPLICATION_ID )
Original file line number Diff line number Diff line change 2626import java .util .UUID ;
2727
2828public class DeleteTheme {
29- public static void main (String [] args ) throws Exception {
30-
31- String VONAGE_APPLICATION_ID = VONAGE_APPLICATION_ID ;
32- String VONAGE_PRIVATE_KEY_PATH = VONAGE_PRIVATE_KEY_PATH ;
33- UUID THEME_ID = UUID .fromString (THEME_ID );
29+ public static void main (String [] args ) throws Exception {
30+ UUID THEME_ID = UUID .fromString (envVar ("THEME_ID" ));
3431
3532 VonageClient client = VonageClient .builder ()
3633 .applicationId (VONAGE_APPLICATION_ID )
Original file line number Diff line number Diff line change 2727import java .util .UUID ;
2828
2929public class GetRecording {
30- public static void main (String [] args ) throws Exception {
31-
32- String VONAGE_APPLICATION_ID = VONAGE_APPLICATION_ID ;
33- String VONAGE_PRIVATE_KEY_PATH = VONAGE_PRIVATE_KEY_PATH ;
34- UUID RECORDING_ID = UUID .fromString (RECORDING_ID );
30+ public static void main (String [] args ) throws Exception {
31+ UUID RECORDING_ID = UUID .fromString (envVar ("RECORDING_ID" ));
3532
3633 VonageClient client = VonageClient .builder ()
3734 .applicationId (VONAGE_APPLICATION_ID )
Original file line number Diff line number Diff line change 2727import java .util .UUID ;
2828
2929public class GetRoom {
30- public static void main (String [] args ) throws Exception {
31-
32- String VONAGE_APPLICATION_ID = VONAGE_APPLICATION_ID ;
33- String VONAGE_PRIVATE_KEY_PATH = VONAGE_PRIVATE_KEY_PATH ;
34- UUID ROOM_ID = UUID .fromString (ROOM_ID );
30+ public static void main (String [] args ) throws Exception {
31+ UUID ROOM_ID = UUID .fromString (envVar ("ROOM_ID" ));
3532
3633 VonageClient client = VonageClient .builder ()
3734 .applicationId (VONAGE_APPLICATION_ID )
Original file line number Diff line number Diff line change 2727import java .util .UUID ;
2828
2929public class GetTheme {
30- public static void main (String [] args ) throws Exception {
31-
32- String VONAGE_APPLICATION_ID = VONAGE_APPLICATION_ID ;
33- String VONAGE_PRIVATE_KEY_PATH = VONAGE_PRIVATE_KEY_PATH ;
34- UUID THEME_ID = UUID .fromString (THEME_ID );
30+ public static void main (String [] args ) throws Exception {
31+ UUID THEME_ID = UUID .fromString (envVar ("THEME_ID" ));
3532
3633 VonageClient client = VonageClient .builder ()
3734 .applicationId (VONAGE_APPLICATION_ID )
Original file line number Diff line number Diff line change 2727import java .util .List ;
2828
2929public class ListDialInNumbers {
30- public static void main (String [] args ) throws Exception {
31-
32- String VONAGE_APPLICATION_ID = VONAGE_APPLICATION_ID ;
33- String VONAGE_PRIVATE_KEY_PATH = VONAGE_PRIVATE_KEY_PATH ;
34-
30+ public static void main (String [] args ) throws Exception {
3531 VonageClient client = VonageClient .builder ()
3632 .applicationId (VONAGE_APPLICATION_ID )
3733 .privateKeyPath (VONAGE_PRIVATE_KEY_PATH )
You can’t perform that action at this time.
0 commit comments