go-data-bridge-client/client.go
2019-09-16 13:34:53 -04:00

25 lines
529 B
Go

package databridge
// Config allows a consuming app to set up API Key, Consumer ID, and Topic Slug
type Config struct {
APIKey string
TopicSlug string
}
// Client allows access to the Databridge API
type Client struct {
BaseURL string
APIKey string
TopicSlug string
}
// NewClient returns a new Databridge Client
func NewClient(config Config) (Client, error) {
c := Client{}
c.APIKey = config.APIKey
c.BaseURL = "https://data-bridge.flipsidecrypto.com/api/v1"
c.TopicSlug = config.TopicSlug
return c, nil
}