// List of all Track recordings.
List of all Track recordings.
// List of all Track recordings .
func (c *DefaultApiService) ListRecording(params *ListRecordingParams) (*ListRecordingResponse, error) {
	path := "/v1/Recordings"
	data := url.Values{}
	headers := make(map[string]interface{})
	if params != nil && params.Status != nil {
		data.Set("Status", *params.Status)
	}
	if params != nil && params.SourceSid != nil {
		data.Set("SourceSid", *params.SourceSid)
	}
	if params != nil && params.GroupingSid != nil {
		for _, item := range *params.GroupingSid {
			data.Add("GroupingSid", item)
		}
	}
	if params != nil && params.DateCreatedAfter != nil {
		data.Set("DateCreatedAfter", fmt.Sprint((*params.DateCreatedAfter).Format(time.RFC3339)))
	}
	if params != nil && params.DateCreatedBefore != nil {
		data.Set("DateCreatedBefore", fmt.Sprint((*params.DateCreatedBefore).Format(time.RFC3339)))
	}
	if params != nil && params.MediaType != nil {
		data.Set("MediaType", *params.MediaType)
	}
	if params != nil && params.PageSize != nil {
		data.Set("PageSize", fmt.Sprint(*params.PageSize))
	}
	resp, err := c.requestHandler.Get(c.baseURL+path, data, headers)
	if err != nil {
		return nil, err
	}
	defer resp.Body.Close()
	ps := &ListRecordingResponse{}
	if err := json.NewDecoder(resp.Body).Decode(ps); err != nil {
		return nil, err
	}
	return ps, err
}
func ( c * DefaultApiService ) ListRecording ( params * ListRecordingParams ) ( * ListRecordingResponse , error ) { path := " " data := url . Values { } headers := make ( map [ string ] interface { } ) if params != nil && params . Status != nil { data . Set ( " " , * params . Status ) } if params != nil && params . SourceSid != nil { data . Set ( " " , * params . SourceSid ) } if params != nil && params . GroupingSid != nil { for _ , item := range * params . GroupingSid { data . Add ( " " , item ) } } if params != nil && params . DateCreatedAfter != nil { data . Set ( " " , fmt . Sprint ( ( * params . DateCreatedAfter ) . Format ( time . RFC3339 ) ) ) } if params != nil && params . DateCreatedBefore != nil { data . Set ( " " , fmt . Sprint ( ( * params . DateCreatedBefore ) . Format ( time . RFC3339 ) ) ) } if params != nil && params . MediaType != nil { data . Set ( " " , * params . MediaType ) } if params != nil && params . PageSize != nil { data . Set ( " " , fmt . Sprint ( * params . PageSize ) ) } resp , err := c . requestHandler . Get ( c . baseURL + path , data , headers ) if err != nil { return nil , err } defer resp . Body . Close ( ) ps := & ListRecordingResponse { } if err := json . NewDecoder ( resp . Body ) . Decode ( ps ) ; err != nil { return nil , err } return ps , err }
List of all Track recordings.
List of all Track recordings .