code: func NewAPI(m *gobot.Master) *API {
  	return &API{
  		master: m,
  		router: pat.New(),
  		Port:   "3000",
  		start: func(a *API) {
  			log.Println("Initializing API on " + a.Host + ":" + a.Port + "...")
  			http.Handle("/", a)
  
  			go func() {
  				if a.Cert != "" && a.Key != "" {
  					http.ListenAndServeTLS(a.Host+":"+a.Port, a.Cert, a.Key, nil)
  				} else {
  					log.Println("WARNING: API using insecure connection. " +
  						"We recommend using an SSL certificate with Gobot.")
  					http.ListenAndServe(a.Host+":"+a.Port, nil)
  				}
  			}()
  		},
  	}
  }
docs: // NewAPI returns a new api instance