// Add a new Participant to the Session
Add a new Participant to the Session
// Add a new Participant to the Session
func (c *DefaultApiService) CreateParticipant(ServiceSid string, SessionSid string, params *CreateParticipantParams) (*ProxyV1ServiceSessionParticipant, error) {
	path := "/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants"
	path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1)
	path = strings.Replace(path, "{"+"SessionSid"+"}", SessionSid, -1)
	data := url.Values{}
	headers := make(map[string]interface{})
	if params != nil && params.FailOnParticipantConflict != nil {
		data.Set("FailOnParticipantConflict", fmt.Sprint(*params.FailOnParticipantConflict))
	}
	if params != nil && params.FriendlyName != nil {
		data.Set("FriendlyName", *params.FriendlyName)
	}
	if params != nil && params.Identifier != nil {
		data.Set("Identifier", *params.Identifier)
	}
	if params != nil && params.ProxyIdentifier != nil {
		data.Set("ProxyIdentifier", *params.ProxyIdentifier)
	}
	if params != nil && params.ProxyIdentifierSid != nil {
		data.Set("ProxyIdentifierSid", *params.ProxyIdentifierSid)
	}
	resp, err := c.requestHandler.Post(c.baseURL+path, data, headers)
	if err != nil {
		return nil, err
	}
	defer resp.Body.Close()
	ps := &ProxyV1ServiceSessionParticipant{}
	if err := json.NewDecoder(resp.Body).Decode(ps); err != nil {
		return nil, err
	}
	return ps, err
}
func ( c * DefaultApiService ) CreateParticipant ( ServiceSid string , SessionSid string , params * CreateParticipantParams ) ( * ProxyV1ServiceSessionParticipant , error ) { path := " " path = strings . Replace ( path , " " + " " + " " , ServiceSid , - 1 ) path = strings . Replace ( path , " " + " " + " " , SessionSid , - 1 ) data := url . Values { } headers := make ( map [ string ] interface { } ) if params != nil && params . FailOnParticipantConflict != nil { data . Set ( " " , fmt . Sprint ( * params . FailOnParticipantConflict ) ) } if params != nil && params . FriendlyName != nil { data . Set ( " " , * params . FriendlyName ) } if params != nil && params . Identifier != nil { data . Set ( " " , * params . Identifier ) } if params != nil && params . ProxyIdentifier != nil { data . Set ( " " , * params . ProxyIdentifier ) } if params != nil && params . ProxyIdentifierSid != nil { data . Set ( " " , * params . ProxyIdentifierSid ) } resp , err := c . requestHandler . Post ( c . baseURL + path , data , headers ) if err != nil { return nil , err } defer resp . Body . Close ( ) ps := & ProxyV1ServiceSessionParticipant { } if err := json . NewDecoder ( resp . Body ) . Decode ( ps ) ; err != nil { return nil , err } return ps , err }
Add a new Participant to the Session
Add a new Participant to the Session