コード例 #1
0
ファイル: campfire.go プロジェクト: dgrijalva/victor
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),
	}
}
コード例 #2
0
ファイル: campfire_adapter.go プロジェクト: bketelsen/victor
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
}