code: func (s *Adaptor) EventStream(source string, name string) (event *gobot.Event, err error) {
  	var url string
  
  	switch source {
  	case "all":
  		url = fmt.Sprintf("%s/v1/events/%s?access_token=%s", s.APIServer, name, s.AccessToken)
  	case "devices":
  		url = fmt.Sprintf("%s/v1/devices/events/%s?access_token=%s", s.APIServer, name, s.AccessToken)
  	case "device":
  		url = fmt.Sprintf("%s/events/%s?access_token=%s", s.deviceURL(), name, s.AccessToken)
  	default:
  		err = errors.New("source param should be: all, devices or device")
  		return
  	}
  
  	events, _, err := eventSource(url)
  	if err != nil {
  		return
  	}
  
  	go func() {
  		for {
  			select {
  			case ev := <-events:
  				if ev.Event() != "" && ev.Data() != "" {
  					s.Publish(ev.Event(), ev.Data())
  				}
  			}
  		}
  	}()
  	return
  }
docs: // EventStream returns a gobot.Event based on the following params:
  //
  // * source - "all"/"devices"/"device" (More info at: http://docs.particle.io/api/#reading-data-from-a-core-events)
  // * name  - Event name to subscribe for, leave blank to subscribe to all events.
  //
  // A new event is emitted as a particle.Event struct