// ReactionsAdd adds a reaction.
336803
func (rtm *Client) ReactionsAdd(name string, fileID, fileCommentID, channelID *string, ts *Timestamp) error {
	res := basicResponse{}
	req := NewExternalRequest().
		AsPost().
		WithScheme(APIScheme).
		WithHost(APIEndpoint).
		WithPath("api/reactions.add").
		WithPostData("token", rtm.Token).
		WithPostData("name", name)

	if fileID != nil {
		req = req.WithPostData("file", *fileID)
	} else if fileCommentID != nil {
		req = req.WithPostData("file_comment", *fileCommentID)
	} else if channelID != nil && ts != nil {
		req = req.WithPostData("channel", *channelID)
		req = req.WithPostData("timestamp", ts.String())
	} else {
		return exception.New("`fileId` or `fileCommentID` or (`channelID` and `ts`) must be not be nil.")
	}

	err := req.JSON(&res)

	if err != nil {
		return err
	}

	if !IsEmpty(res.Error) {
		return exception.New(res.Error)
	}

	if !res.OK {
		return exception.New("slack response `ok` is false.")
	}
	return nil
}
839122
func gcmAdd(x, y *gcmFieldElement) gcmFieldElement {
	// Addition in a characteristic 2 field is just XOR.
	return gcmFieldElement{x.low ^ y.low, x.high ^ y.high}
}
145424
func (b *UpdateBuilder) AddNamed(column, name string) *UpdateBuilder {
	return b.addValue(column, param(name))
}
345630
func (a *MandrillAPI) RouteAdd(domain string, pattern string, url string) (Route, error) {
	var response Route
	if domain == "" {
		return response, errors.New("domain cannot be blank")
	}
	if pattern == "" {
		return response, errors.New("pattern cannot be blank")
	}
	if url == "" {
		return response, errors.New("url cannot be blank")
	}
	return getRoute(a, "", domain, pattern, url, add_route_endpoint)
}
1134747
func (m mathUtil) DegreesAdd(baseDegrees, deltaDegrees float64) float64 {
	value := baseDegrees + deltaDegrees
	if value > _2pi {
		return math.Mod(value, 360.0)
	} else if value < 0 {
		return math.Mod(360.0+value, 360.0)
	}
	return value
}
379323
func OptionAddKeyBind(b ...KeyBind) Option {
	return func(p *Prompt) error {
		p.keyBindings = append(p.keyBindings, b...)
		return nil
	}
}
1188055
func (k KeybaseServiceMeasured) FavoriteAdd(ctx context.Context, folder keybase1.Folder) (err error) {
	k.favoriteAddTimer.Time(func() {
		err = k.delegate.FavoriteAdd(ctx, folder)
	})
	return err
}
64612
func DecimalAdd(from1, from2, to *MyDecimal) error {
	to.resultFrac = myMaxInt8(from1.resultFrac, from2.resultFrac)
	if from1.negative == from2.negative {
		return doAdd(from1, from2, to)
	}
	_, err := doSub(from1, from2, to)
	return err
}
343560
func safeAdd(a, b int64) (int64, bool) {
	if b > 0 && a > math.MaxInt64-b {
		return -1, true
	} else if b < 0 && a < math.MinInt64-b {
		return -1, true
	}
	return a + b, false
}
617987
func (s *State) RoleAdd(guildID string, role *Role) error {
	if s == nil {
		return ErrNilState
	}

	guild, err := s.Guild(guildID)
	if err != nil {
		return err
	}

	s.Lock()
	defer s.Unlock()

	for i, r := range guild.Roles {
		if r.ID == role.ID {
			guild.Roles[i] = role
			return nil
		}
	}

	guild.Roles = append(guild.Roles, role)
	return nil
}
633655
func KeyAdd(keyLocation string) error {
	c, err := client.New()

	if err != nil {
		return err
	}

	var key api.KeyCreateRequest

	if keyLocation == "" {
		key, err = chooseKey()
	} else {
		key, err = getKey(keyLocation)
	}

	if err != nil {
		return err
	}

	fmt.Printf("Uploading %s to deis...", path.Base(key.Name))

	if _, err = keys.New(c, key.ID, key.Public); err != nil {
		fmt.Println()
		return err
	}

	fmt.Println(" done")
	return nil
}
1367602
func (_class HostClass) LicenseAdd(sessionID SessionRef, host HostRef, contents string) (_err error) {
	_method := "host.license_add"
	_sessionIDArg, _err := convertSessionRefToXen(fmt.Sprintf("%s(%s)", _method, "session_id"), sessionID)
	if _err != nil {
		return
	}
	_hostArg, _err := convertHostRefToXen(fmt.Sprintf("%s(%s)", _method, "host"), host)
	if _err != nil {
		return
	}
	_contentsArg, _err := convertStringToXen(fmt.Sprintf("%s(%s)", _method, "contents"), contents)
	if _err != nil {
		return
	}
	_, _err =  _class.client.APICall(_method, _sessionIDArg, _hostArg, _contentsArg)
	return
}
1181186
func DomainsAdd(appID, domain string) error {
	c, appID, err := load(appID)

	if err != nil {
		return err
	}

	fmt.Printf("Adding %s to %s... ", domain, appID)

	quit := progress()
	_, err = domains.New(c, appID, domain)
	quit <- true
	<-quit

	if err != nil {
		return err
	}

	fmt.Println("done")
	return nil
}
606475
func (b *CumulativeBucket) MultiAdd(res *Result) {
	if res.Count == 0 {
		return
	}
	atomic.AddInt64(&b.count, res.Count)
	atomic.AddInt64(&b.sum, res.Sum)
	b.sumOfSquares.Add(res.SumOfSquares)
}
923879
func (vs *VSphere) NodeAdded(obj interface{}) {
	node, ok := obj.(*v1.Node)
	if node == nil || !ok {
		klog.Warningf("NodeAdded: unrecognized object %+v", obj)
		return
	}

	klog.V(4).Infof("Node added: %+v", node)
	if err := vs.nodeManager.RegisterNode(node); err != nil {
		klog.Errorf("failed to add node %+v: %v", node, err)
	}
}
569828
func watchAdd(nd node, c chan<- EventInfo, e Event) eventDiff {
	diff := nd.Watch.Add(c, e)
	if wp := nd.Child[""].Watch; len(wp) != 0 {
		e = wp.Total()
		diff[0] |= e
		diff[1] |= e
		if diff[0] == diff[1] {
			return none
		}
	}
	return diff
}
325023
func NewAddOne(ctx *middleware.Context, handler AddOneHandler) *AddOne {
	return &AddOne{Context: ctx, Handler: handler}
}