package com.bandwidth.sdk.examples;

import com.bandwidth.sdk.model.Message;

/**
 * This examples shows how to send a text message using the sdk
 * @author smitchell
 *
 */
public class TextMessageExample {

	/**
	 * @param args the args.
	 */
	public static void main(final String[] args) {
        // There are two ways to set your creds, e.g. your App Platform userId, api token and api secret
		// you can set these as environment variables or set them with the 
		// BandwidthClient.getInstance(userId, apiToken, apiSecret) method.
		// 
		// Use the setenv.sh script to set the env variables
    	// BANDWIDTH_USER_ID
    	// BANDWIDTH_API_TOKEN
    	// BANDWIDTH_API_SECRET
		// 
		// or uncomment this line and set them here
		// BandwidthClient.getInstance(userId, apiToken, apiSecret);
		
		// put your numbers in here
		final String toNumber = "+1";// your phone number here
		final String fromNumber = "+1";// this is a number that is allocated on the AppPlatform. You can do this
							 // via the dev console or with the SDK (see AllocateNumberExample)
		
		try {

            final Message message = Message.create(toNumber, fromNumber, "Test, test! What up from App Platform");
			
			System.out.println("message:" + message);
		}
		catch(final Exception e) {
			e.printStackTrace();
		}
	}

}

@@ -286,24 +286,18 @@
 args) %7B%0A
-        
+%09%09
 // There
@@ -525,25 +525,24 @@
 method.%0A%09%09//
- 
 %0A%09%09// Use th
@@ -585,20 +585,17 @@
 riables%0A
-    
+%09
 %09// BAND
@@ -608,20 +608,17 @@
 USER_ID%0A
-    
+%09
 %09// BAND
@@ -633,20 +633,17 @@
 I_TOKEN%0A
-    
+%09
 %09// BAND
@@ -663,17 +663,16 @@
 RET%0A%09%09//
- 
 %0A%09%09// or
@@ -773,19 +773,17 @@
 ecret);%0A
-%09%09
 %0A
+
 %09%09// put
@@ -1043,19 +1043,17 @@
 xample)%0A
-%09%09
 %0A
+
 %09%09try %7B%0A
@@ -1057,20 +1057,11 @@
  %7B%0A%0A
-            
+%09%09%09
 fina
@@ -1159,19 +1159,16 @@
 form%22);%0A
-%09%09%09
 %0A%09%09%09Syst

Update TextMessageExample.java