(String[] args)
| 18 | public static final String BOSS_NUMBER = "3213213213"; |
| 19 | |
| 20 | public static void main(String[] args) throws TwilioRestException { |
| 21 | |
| 22 | TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN); |
| 23 | |
| 24 | String[] randomMessages = { |
| 25 | "Locked out", |
| 26 | "Pipes broke", |
| 27 | "Food poisoning", |
| 28 | "Not feeling well" |
| 29 | }; |
| 30 | |
| 31 | int randomIndex = new Random().nextInt(randomMessages.length); |
| 32 | String finalMessage = (randomMessages[randomIndex]); |
| 33 | |
| 34 | List<NameValuePair> params = new ArrayList<NameValuePair>(); |
| 35 | params.add(new BasicNameValuePair("Body", "Gonna work from home. " + finalMessage)); |
| 36 | params.add(new BasicNameValuePair("From", YOUR_NUMBER)); |
| 37 | params.add(new BasicNameValuePair("To", BOSS_NUMBER)); |
| 38 | |
| 39 | MessageFactory messageFactory = client.getAccount().getMessageFactory(); |
| 40 | Message message = messageFactory.create(params); |
| 41 | System.out.println(message.getSid()); |
| 42 | } |
| 43 | } |
| 44 |
nothing calls this directly
no outgoing calls
no test coverage detected