func NewVideoClient(accountSid string, authToken string, httpClient *http.Client) *Client {
	c := newNewClient(accountSid, authToken, VideoBaseUrl, httpClient)
	c.APIVersion = VideoVersion
	c.Rooms = &RoomService{client: c}
	c.VideoRecordings = &VideoRecordingService{client: c}
	return c
}
NewVideoClient returns a new Client to use the video API
package twilio
import (
	"context"
	"encoding/json"
	"fmt"
	"io/ioutil"
	"net/http"
	"net/url"
	"strconv"
	"strings"
	"time"
	"github.com/kevinburke/rest"
)
const Version = "2.2"
const userAgent = "twilio-go/" + Version
var BaseURL = "https://api.twilio.com"
var MonitorBaseURL = "https://monitor.twilio.com"
const MonitorVersion = "v1"
var PricingBaseURL = "https://pricing.twilio.com"
const PricingVersion = "v2"
var FaxBaseURL = "https://fax.twilio.com"
const FaxVersion = "v1"
var WirelessBaseURL = "https://wireless.twilio.com"
const WirelessVersion = "v1"
const APIVersion = "2010-04-01"
const NotifyBaseURL = "https://notify.twilio.com"
const NotifyVersion = "v1"
const LookupBaseURL = "https://lookups.twilio.com"
const LookupVersion = "v1"
const VerifyBaseURL = "https://verify.twilio.com"
const VerifyVersion = "v2"
var VideoBaseUrl = "https://video.twilio.com"
const VideoVersion = "v1"
var TaskRouterBaseUrl = "https://taskrouter.twilio.com"
const TaskRouterVersion = "v1"
type Client struct {
	*rest.Client
	Monitor    *Client
	Pricing    *Client
	Fax        *Client
	Wireless   *Client
	Notify     *Client
	Lookup     *Client
	Verify     *Client
	Video      *Client
	TaskRouter *Client
	FullPath func(pathPart string) string
	APIVersion string
	AccountSid string
	AuthToken  string
	Accounts          *AccountService
	Applications      *ApplicationService
	Calls             *CallService
	Conferences       *ConferenceService
	IncomingNumbers   *IncomingNumberService
	Keys              *KeyService
	Media             *MediaService
	Messages          *MessageService
	OutgoingCallerIDs *OutgoingCallerIDService
	Queues            *QueueService
	Recordings        *RecordingService
	Transcriptions    *TranscriptionService
	AvailableNumbers  *AvailableNumberService
	Alerts *AlertService
	Voice        *VoicePriceService
	Messaging    *MessagingPriceService
	PhoneNumbers *PhoneNumberPriceService
	Faxes *FaxService
	Sims     *SimService
	Commands *CommandService
	Credentials *NotifyCredentialsService
	LookupPhoneNumbers *LookupPhoneNumbersService
	Verifications *VerifyPhoneNumberService
	Rooms           *RoomService
	VideoRecordings *VideoRecordingService
	Workspace func(sid string) *WorkspaceService
}
const defaultTimeout = 30*time.Second + 500*time.Millisecond
var defaultHttpClient *http.Client
func init() {
	defaultHttpClient = &http.Client{
		Timeout:   defaultTimeout,
		Transport: rest.DefaultTransport,
	}
}
type twilioError struct {
	Code     int    `json:"code"`
	Message  string `json:"message"`
	MoreInfo string `json:"more_info"`
	Status int `json:"status"`
}
func parseTwilioError(resp *http.Response) error {
	resBody, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		return err
	}
	if err := resp.Body.Close(); err != nil {
		return err
	}
	rerr := new(twilioError)
	err = json.Unmarshal(resBody, rerr)
	if err != nil {
		return fmt.Errorf("invalid response body: %s", string(resBody))
	}
	if rerr.Message == "" {
		return fmt.Errorf("invalid response body: %s", string(resBody))
	}
	return &rest.Error{
		Title:  rerr.Message,
		Type:   rerr.MoreInfo,
		ID:     strconv.Itoa(rerr.Code),
		Status: resp.StatusCode,
	}
}
func NewFaxClient(accountSid string, authToken string, httpClient *http.Client) *Client {
	if httpClient == nil {
		httpClient = defaultHttpClient
	}
	restClient := rest.NewClient(accountSid, authToken, FaxBaseURL)
	restClient.Client = httpClient
	restClient.UploadType = rest.FormURLEncoded
	restClient.ErrorParser = parseTwilioError
	c := &Client{
		Client:     restClient,
		AccountSid: accountSid,
		AuthToken:  authToken,
	}
	c.FullPath = func(pathPart string) string {
		return "/" + c.APIVersion + "/" + pathPart
	}
	c.APIVersion = FaxVersion
	c.Faxes = &FaxService{client: c}
	return c
}
func newNewClient(sid, token, baseURL string, client *http.Client) *Client {
	if client == nil {
		client = defaultHttpClient
	}
	restClient := rest.NewClient(sid, token, baseURL)
	restClient.Client = client
	restClient.UploadType = rest.FormURLEncoded
	restClient.ErrorParser = parseTwilioError
	c := &Client{
		Client:     restClient,
		AccountSid: sid,
		AuthToken:  token,
	}
	c.FullPath = func(pathPart string) string {
		return "/" + c.APIVersion + "/" + pathPart
	}
	return c
}
func NewWirelessClient(accountSid string, authToken string, httpClient *http.Client) *Client {
	c := newNewClient(accountSid, authToken, WirelessBaseURL, httpClient)
	c.APIVersion = WirelessVersion
	c.Sims = &SimService{client: c}
	c.Commands = &CommandService{client: c}
	return c
}
func NewMonitorClient(accountSid string, authToken string, httpClient *http.Client) *Client {
	c := newNewClient(accountSid, authToken, MonitorBaseURL, httpClient)
	c.APIVersion = MonitorVersion
	c.Alerts = &AlertService{client: c}
	return c
}
func NewTaskRouterClient(accountSid string, authToken string, httpClient *http.Client) *Client {
	if httpClient == nil {
		httpClient = &http.Client{Timeout: defaultTimeout}
	}
	c := newNewClient(accountSid, authToken, TaskRouterBaseUrl, httpClient)
	c.APIVersion = TaskRouterVersion
	c.Workspace = func(sid string) *WorkspaceService {
		return &WorkspaceService{
			Activities: &ActivityService{
				workspaceSid: sid,
				client:       c,
			},
			Queues: &TaskQueueService{
				workspaceSid: sid,
				client:       c,
			},
			Workflows: &WorkflowService{
				workspaceSid: sid,
				client:       c,
			},
			Workers: &WorkerService{
				workspaceSid: sid,
				client:       c,
			},
		}
	}
	return c
}
func NewPricingClient(accountSid string, authToken string, httpClient *http.Client) *Client {
	c := newNewClient(accountSid, authToken, PricingBaseURL, httpClient)
	c.APIVersion = PricingVersion
	c.Voice = &VoicePriceService{
		Countries: &CountryVoicePriceService{client: c},
		Numbers:   &NumberVoicePriceService{client: c},
	}
	c.Messaging = &MessagingPriceService{
		Countries: &CountryMessagingPriceService{client: c},
	}
	c.PhoneNumbers = &PhoneNumberPriceService{
		Countries: &CountryPhoneNumberPriceService{client: c},
	}
	return c
}
func NewNotifyClient(accountSid string, authToken string, httpClient *http.Client) *Client {
	c := newNewClient(accountSid, authToken, NotifyBaseURL, httpClient)
	c.APIVersion = NotifyVersion
	c.Credentials = &NotifyCredentialsService{client: c}
	return c
}
func NewLookupClient(accountSid string, authToken string, httpClient *http.Client) *Client {
	c := newNewClient(accountSid, authToken, LookupBaseURL, httpClient)
	c.APIVersion = LookupVersion
	c.LookupPhoneNumbers = &LookupPhoneNumbersService{client: c}
	return c
}
func NewVerifyClient(accountSid string, authToken string, httpClient *http.Client) *Client {
	c := newNewClient(accountSid, authToken, VerifyBaseURL, httpClient)
	c.APIVersion = VerifyVersion
	c.Verifications = &VerifyPhoneNumberService{client: c}
	return c
}