package pl.mobilesolutions.smsapi.test;

import pl.mobilesolutions.smsapi.Message;
import pl.mobilesolutions.smsapi.SMSSender;


public class APITester {
  public final static String USER_KEY = "TO_TRZEBA_WYPELNIC";
  public final static String USER_NAME = "LOGIN";
  public final static String SMS_GATE_HOST = "www.mobile-solutions.pl";
  public final static String SMS_GATE_PATH = "/smsapi/";
  public final static int SMS_GATE_PORT = 80;
  

  public static void main(String[] args) throws Exception {
    System.out.println("--> SMS API demo start");
    
    //create sender obj
    SMSSender smsSender = new SMSSender(SMS_GATE_HOST, SMS_GATE_PORT, SMS_GATE_PATH, USER_NAME, USER_KEY);
    
    //create message
    Message sampleSms = new Message();
    
    sampleSms.setPhoneNumber("123456789");
    sampleSms.setMessage("przykladowa wiadomosc wyslana z SMS API demo");
    //sampleSms.setFlashSms(true);
    //sampleSms.setUtf8(true);
    //sampleSms.setWapAddress("http://www.google.pl");
    
    
    //send message
    String response = smsSender.sendMessage(sampleSms);
    System.out.println("--> response: "+response);
    
    System.out.println("--> SMS API demo end");
  }



}