Exemple #1
0
func NewCampfire(name string, account string, token string, rooms []int) *Campfire {
	return &Campfire{
		brain:   NewBrain(name),
		account: account,
		token:   token,
		rooms:   rooms,
		client:  campfire.NewClient(account, token),
	}
}
Exemple #2
0
func (self *Campfire) Client() *campfire.Client {
	if self.client == nil {
		client := campfire.NewClient(
			self.Robot.options["account"],
			self.Robot.options["token"],
		)

		self.client = client
	}

	return self.client
}