(String[] args)
| 21 | public static final String HER_NUMBER = "3213213213"; |
| 22 | |
| 23 | public static void main(String[] args) throws TwilioRestException { |
| 24 | |
| 25 | TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN); |
| 26 | |
| 27 | String[] randomMessages = { |
| 28 | "Working hard", |
| 29 | "Gotta ship this feature", |
| 30 | "Someone fucked the system again", |
| 31 | }; |
| 32 | |
| 33 | int randomIndex = new Random().nextInt(randomMessages.length); |
| 34 | String finalMessage = (randomMessages[randomIndex]); |
| 35 | |
| 36 | List<NameValuePair> params = new ArrayList<NameValuePair>(); |
| 37 | params.add(new BasicNameValuePair("Body", "Late at work. " + finalMessage)); |
| 38 | params.add(new BasicNameValuePair("From", YOUR_NUMBER)); |
| 39 | params.add(new BasicNameValuePair("To", HER_NUMBER)); |
| 40 | |
| 41 | MessageFactory messageFactory = client.getAccount().getMessageFactory(); |
| 42 | Message message = messageFactory.create(params); |
| 43 | System.out.println(message.getSid()); |
| 44 | } |
| 45 | } |
nothing calls this directly
no outgoing calls
no test coverage detected