func NewSparkCoreAdaptor(name string, deviceID string, accessToken string) *SparkCoreAdaptor {
	return &SparkCoreAdaptor{
		name:        name,
		DeviceID:    deviceID,
		AccessToken: accessToken,
		APIServer:   "https://api.spark.io",
		Eventer:     gobot.NewEventer(),
	}
}
NewSparkCoreAdaptor creates new spark core adaptor with deviceId and accessToken
using api.spark.io server as default
package spark
import (
	"encoding/json"
	"errors"
	"fmt"
	"io/ioutil"
	"net/http"
	"net/url"
	"strconv"
	"github.com/donovanhide/eventsource"
	"github.com/hybridgroup/gobot"
)
type SparkCoreAdaptor struct {
	name        string
	DeviceID    string
	AccessToken string
	APIServer   string
	gobot.Eventer
}
type Event struct {
	Name  string
	Data  string
	Error error
}
var eventSource = func(url string) (chan eventsource.Event, chan error, error) {
	stream, err := eventsource.Subscribe(url, "")
	if err != nil {
		return nil, nil, err
	}
	return stream.Events, stream.Errors, nil
}