_id
stringlengths
2
7
title
stringlengths
1
88
partition
stringclasses
3 values
text
stringlengths
75
19.8k
language
stringclasses
1 value
meta_information
dict
q29400
Client.studio
train
def studio(self): """ Access the Studio Twilio Domain :returns: Studio Twilio Domain :rtype: twilio.rest.studio.Studio """ if self._studio is None: from twilio.rest.studio import Studio self._studio = Studio(self) return self._studio
python
{ "resource": "" }
q29401
Client.sync
train
def sync(self): """ Access the Sync Twilio Domain :returns: Sync Twilio Domain :rtype: twilio.rest.sync.Sync """ if self._sync is None: from twilio.rest.sync import Sync self._sync = Sync(self) return self._sync
python
{ "resource": "" }
q29402
Client.taskrouter
train
def taskrouter(self): """ Access the Taskrouter Twilio Domain :returns: Taskrouter Twilio Domain :rtype: twilio.rest.taskrouter.Taskrouter """ if self._taskrouter is None: from twilio.rest.taskrouter import Taskrouter self._taskrouter = Taskrouter(self) return self._taskrouter
python
{ "resource": "" }
q29403
Client.trunking
train
def trunking(self): """ Access the Trunking Twilio Domain :returns: Trunking Twilio Domain :rtype: twilio.rest.trunking.Trunking """ if self._trunking is None: from twilio.rest.trunking import Trunking self._trunking = Trunking(self) return self._trunking
python
{ "resource": "" }
q29404
Client.verify
train
def verify(self): """ Access the Verify Twilio Domain :returns: Verify Twilio Domain :rtype: twilio.rest.verify.Verify """ if self._verify is None: from twilio.rest.verify import Verify self._verify = Verify(self) return self._verify
python
{ "resource": "" }
q29405
Client.video
train
def video(self): """ Access the Video Twilio Domain :returns: Video Twilio Domain :rtype: twilio.rest.video.Video """ if self._video is None: from twilio.rest.video import Video self._video = Video(self) return self._video
python
{ "resource": "" }
q29406
Client.voice
train
def voice(self): """ Access the Voice Twilio Domain :returns: Voice Twilio Domain :rtype: twilio.rest.voice.Voice """ if self._voice is None: from twilio.rest.voice import Voice self._voice = Voice(self) return self._voice
python
{ "resource": "" }
q29407
Client.wireless
train
def wireless(self): """ Access the Wireless Twilio Domain :returns: Wireless Twilio Domain :rtype: twilio.rest.wireless.Wireless """ if self._wireless is None: from twilio.rest.wireless import Wireless self._wireless = Wireless(self) return self._wireless
python
{ "resource": "" }
q29408
AuthTypeRegistrationsPage.get_instance
train
def get_instance(self, payload): """ Build an instance of AuthTypeRegistrationsInstance :param dict payload: Payload response from the API :returns: twilio.rest.api.v2010.account.sip.domain.auth_types.auth_registrations_mapping.AuthTypeRegistrationsInstance :rtype: twilio.rest.api.v2010.account.sip.domain.auth_types.auth_registrations_mapping.AuthTypeRegistrationsInstance """ return AuthTypeRegistrationsInstance( self._version, payload, account_sid=self._solution['account_sid'], domain_sid=self._solution['domain_sid'], )
python
{ "resource": "" }
q29409
ServiceContext.alpha_senders
train
def alpha_senders(self): """ Access the alpha_senders :returns: twilio.rest.messaging.v1.service.alpha_sender.AlphaSenderList :rtype: twilio.rest.messaging.v1.service.alpha_sender.AlphaSenderList """ if self._alpha_senders is None: self._alpha_senders = AlphaSenderList(self._version, service_sid=self._solution['sid'], ) return self._alpha_senders
python
{ "resource": "" }
q29410
NewKeyPage.get_instance
train
def get_instance(self, payload): """ Build an instance of NewKeyInstance :param dict payload: Payload response from the API :returns: twilio.rest.api.v2010.account.new_key.NewKeyInstance :rtype: twilio.rest.api.v2010.account.new_key.NewKeyInstance """ return NewKeyInstance(self._version, payload, account_sid=self._solution['account_sid'], )
python
{ "resource": "" }
q29411
FieldList.create
train
def create(self, field_type, unique_name): """ Create a new FieldInstance :param unicode field_type: The Field Type of this field :param unicode unique_name: An application-defined string that uniquely identifies the new resource :returns: Newly created FieldInstance :rtype: twilio.rest.autopilot.v1.assistant.task.field.FieldInstance """ data = values.of({'FieldType': field_type, 'UniqueName': unique_name, }) payload = self._version.create( 'POST', self._uri, data=data, ) return FieldInstance( self._version, payload, assistant_sid=self._solution['assistant_sid'], task_sid=self._solution['task_sid'], )
python
{ "resource": "" }
q29412
FieldList.get
train
def get(self, sid): """ Constructs a FieldContext :param sid: The unique string that identifies the resource :returns: twilio.rest.autopilot.v1.assistant.task.field.FieldContext :rtype: twilio.rest.autopilot.v1.assistant.task.field.FieldContext """ return FieldContext( self._version, assistant_sid=self._solution['assistant_sid'], task_sid=self._solution['task_sid'], sid=sid, )
python
{ "resource": "" }
q29413
FieldPage.get_instance
train
def get_instance(self, payload): """ Build an instance of FieldInstance :param dict payload: Payload response from the API :returns: twilio.rest.autopilot.v1.assistant.task.field.FieldInstance :rtype: twilio.rest.autopilot.v1.assistant.task.field.FieldInstance """ return FieldInstance( self._version, payload, assistant_sid=self._solution['assistant_sid'], task_sid=self._solution['task_sid'], )
python
{ "resource": "" }
q29414
MachineToMachinePage.get_instance
train
def get_instance(self, payload): """ Build an instance of MachineToMachineInstance :param dict payload: Payload response from the API :returns: twilio.rest.api.v2010.account.available_phone_number.machine_to_machine.MachineToMachineInstance :rtype: twilio.rest.api.v2010.account.available_phone_number.machine_to_machine.MachineToMachineInstance """ return MachineToMachineInstance( self._version, payload, account_sid=self._solution['account_sid'], country_code=self._solution['country_code'], )
python
{ "resource": "" }
q29415
YearlyPage.get_instance
train
def get_instance(self, payload): """ Build an instance of YearlyInstance :param dict payload: Payload response from the API :returns: twilio.rest.api.v2010.account.usage.record.yearly.YearlyInstance :rtype: twilio.rest.api.v2010.account.usage.record.yearly.YearlyInstance """ return YearlyInstance(self._version, payload, account_sid=self._solution['account_sid'], )
python
{ "resource": "" }
q29416
FunctionVersionList.create
train
def create(self, path, visibility): """ Create a new FunctionVersionInstance :param unicode path: The path :param FunctionVersionInstance.Visibility visibility: The visibility :returns: Newly created FunctionVersionInstance :rtype: twilio.rest.serverless.v1.service.function.function_version.FunctionVersionInstance """ data = values.of({'Path': path, 'Visibility': visibility, }) payload = self._version.create( 'POST', self._uri, data=data, ) return FunctionVersionInstance( self._version, payload, service_sid=self._solution['service_sid'], function_sid=self._solution['function_sid'], )
python
{ "resource": "" }
q29417
FunctionVersionList.get
train
def get(self, sid): """ Constructs a FunctionVersionContext :param sid: The sid :returns: twilio.rest.serverless.v1.service.function.function_version.FunctionVersionContext :rtype: twilio.rest.serverless.v1.service.function.function_version.FunctionVersionContext """ return FunctionVersionContext( self._version, service_sid=self._solution['service_sid'], function_sid=self._solution['function_sid'], sid=sid, )
python
{ "resource": "" }
q29418
FunctionVersionPage.get_instance
train
def get_instance(self, payload): """ Build an instance of FunctionVersionInstance :param dict payload: Payload response from the API :returns: twilio.rest.serverless.v1.service.function.function_version.FunctionVersionInstance :rtype: twilio.rest.serverless.v1.service.function.function_version.FunctionVersionInstance """ return FunctionVersionInstance( self._version, payload, service_sid=self._solution['service_sid'], function_sid=self._solution['function_sid'], )
python
{ "resource": "" }
q29419
FunctionVersionContext.fetch
train
def fetch(self): """ Fetch a FunctionVersionInstance :returns: Fetched FunctionVersionInstance :rtype: twilio.rest.serverless.v1.service.function.function_version.FunctionVersionInstance """ params = values.of({}) payload = self._version.fetch( 'GET', self._uri, params=params, ) return FunctionVersionInstance( self._version, payload, service_sid=self._solution['service_sid'], function_sid=self._solution['function_sid'], sid=self._solution['sid'], )
python
{ "resource": "" }
q29420
ActivityList.create
train
def create(self, friendly_name, available=values.unset): """ Create a new ActivityInstance :param unicode friendly_name: A human-readable name for the Activity, such as 'On Call', 'Break', 'Email', etc. :param bool available: Boolean value indicating whether the worker should be eligible to receive a Task when they occupy this Activity. :returns: Newly created ActivityInstance :rtype: twilio.rest.taskrouter.v1.workspace.activity.ActivityInstance """ data = values.of({'FriendlyName': friendly_name, 'Available': available, }) payload = self._version.create( 'POST', self._uri, data=data, ) return ActivityInstance(self._version, payload, workspace_sid=self._solution['workspace_sid'], )
python
{ "resource": "" }
q29421
ActivityList.get
train
def get(self, sid): """ Constructs a ActivityContext :param sid: The sid :returns: twilio.rest.taskrouter.v1.workspace.activity.ActivityContext :rtype: twilio.rest.taskrouter.v1.workspace.activity.ActivityContext """ return ActivityContext(self._version, workspace_sid=self._solution['workspace_sid'], sid=sid, )
python
{ "resource": "" }
q29422
ActivityPage.get_instance
train
def get_instance(self, payload): """ Build an instance of ActivityInstance :param dict payload: Payload response from the API :returns: twilio.rest.taskrouter.v1.workspace.activity.ActivityInstance :rtype: twilio.rest.taskrouter.v1.workspace.activity.ActivityInstance """ return ActivityInstance(self._version, payload, workspace_sid=self._solution['workspace_sid'], )
python
{ "resource": "" }
q29423
InstalledAddOnExtensionList.get
train
def get(self, sid): """ Constructs a InstalledAddOnExtensionContext :param sid: The unique Extension Sid :returns: twilio.rest.preview.marketplace.installed_add_on.installed_add_on_extension.InstalledAddOnExtensionContext :rtype: twilio.rest.preview.marketplace.installed_add_on.installed_add_on_extension.InstalledAddOnExtensionContext """ return InstalledAddOnExtensionContext( self._version, installed_add_on_sid=self._solution['installed_add_on_sid'], sid=sid, )
python
{ "resource": "" }
q29424
InstalledAddOnExtensionPage.get_instance
train
def get_instance(self, payload): """ Build an instance of InstalledAddOnExtensionInstance :param dict payload: Payload response from the API :returns: twilio.rest.preview.marketplace.installed_add_on.installed_add_on_extension.InstalledAddOnExtensionInstance :rtype: twilio.rest.preview.marketplace.installed_add_on.installed_add_on_extension.InstalledAddOnExtensionInstance """ return InstalledAddOnExtensionInstance( self._version, payload, installed_add_on_sid=self._solution['installed_add_on_sid'], )
python
{ "resource": "" }
q29425
InstalledAddOnExtensionContext.fetch
train
def fetch(self): """ Fetch a InstalledAddOnExtensionInstance :returns: Fetched InstalledAddOnExtensionInstance :rtype: twilio.rest.preview.marketplace.installed_add_on.installed_add_on_extension.InstalledAddOnExtensionInstance """ params = values.of({}) payload = self._version.fetch( 'GET', self._uri, params=params, ) return InstalledAddOnExtensionInstance( self._version, payload, installed_add_on_sid=self._solution['installed_add_on_sid'], sid=self._solution['sid'], )
python
{ "resource": "" }
q29426
InstalledAddOnExtensionContext.update
train
def update(self, enabled): """ Update the InstalledAddOnExtensionInstance :param bool enabled: A Boolean indicating if the Extension will be invoked :returns: Updated InstalledAddOnExtensionInstance :rtype: twilio.rest.preview.marketplace.installed_add_on.installed_add_on_extension.InstalledAddOnExtensionInstance """ data = values.of({'Enabled': enabled, }) payload = self._version.update( 'POST', self._uri, data=data, ) return InstalledAddOnExtensionInstance( self._version, payload, installed_add_on_sid=self._solution['installed_add_on_sid'], sid=self._solution['sid'], )
python
{ "resource": "" }
q29427
AddressList.create
train
def create(self, customer_name, street, city, region, postal_code, iso_country, friendly_name=values.unset, emergency_enabled=values.unset, auto_correct_address=values.unset): """ Create a new AddressInstance :param unicode customer_name: The name to associate with the new address :param unicode street: The number and street address of the new address :param unicode city: The city of the new address :param unicode region: The state or region of the new address :param unicode postal_code: The postal code of the new address :param unicode iso_country: The ISO country code of the new address :param unicode friendly_name: A string to describe the new resource :param bool emergency_enabled: Whether to enable emergency calling on the new address :param bool auto_correct_address: Whether we should automatically correct the address :returns: Newly created AddressInstance :rtype: twilio.rest.api.v2010.account.address.AddressInstance """ data = values.of({ 'CustomerName': customer_name, 'Street': street, 'City': city, 'Region': region, 'PostalCode': postal_code, 'IsoCountry': iso_country, 'FriendlyName': friendly_name, 'EmergencyEnabled': emergency_enabled, 'AutoCorrectAddress': auto_correct_address, }) payload = self._version.create( 'POST', self._uri, data=data, ) return AddressInstance(self._version, payload, account_sid=self._solution['account_sid'], )
python
{ "resource": "" }
q29428
AddressList.page
train
def page(self, customer_name=values.unset, friendly_name=values.unset, iso_country=values.unset, page_token=values.unset, page_number=values.unset, page_size=values.unset): """ Retrieve a single page of AddressInstance records from the API. Request is executed immediately :param unicode customer_name: The `customer_name` of the Address resources to read :param unicode friendly_name: The string that identifies the Address resources to read :param unicode iso_country: The ISO country code of the Address resources to read :param str page_token: PageToken provided by the API :param int page_number: Page Number, this value is simply for client state :param int page_size: Number of records to return, defaults to 50 :returns: Page of AddressInstance :rtype: twilio.rest.api.v2010.account.address.AddressPage """ params = values.of({ 'CustomerName': customer_name, 'FriendlyName': friendly_name, 'IsoCountry': iso_country, 'PageToken': page_token, 'Page': page_number, 'PageSize': page_size, }) response = self._version.page( 'GET', self._uri, params=params, ) return AddressPage(self._version, response, self._solution)
python
{ "resource": "" }
q29429
AddressList.get
train
def get(self, sid): """ Constructs a AddressContext :param sid: The unique string that identifies the resource :returns: twilio.rest.api.v2010.account.address.AddressContext :rtype: twilio.rest.api.v2010.account.address.AddressContext """ return AddressContext(self._version, account_sid=self._solution['account_sid'], sid=sid, )
python
{ "resource": "" }
q29430
AddressPage.get_instance
train
def get_instance(self, payload): """ Build an instance of AddressInstance :param dict payload: Payload response from the API :returns: twilio.rest.api.v2010.account.address.AddressInstance :rtype: twilio.rest.api.v2010.account.address.AddressInstance """ return AddressInstance(self._version, payload, account_sid=self._solution['account_sid'], )
python
{ "resource": "" }
q29431
AddressContext.dependent_phone_numbers
train
def dependent_phone_numbers(self): """ Access the dependent_phone_numbers :returns: twilio.rest.api.v2010.account.address.dependent_phone_number.DependentPhoneNumberList :rtype: twilio.rest.api.v2010.account.address.dependent_phone_number.DependentPhoneNumberList """ if self._dependent_phone_numbers is None: self._dependent_phone_numbers = DependentPhoneNumberList( self._version, account_sid=self._solution['account_sid'], address_sid=self._solution['sid'], ) return self._dependent_phone_numbers
python
{ "resource": "" }
q29432
WorkflowStatisticsList.get
train
def get(self): """ Constructs a WorkflowStatisticsContext :returns: twilio.rest.taskrouter.v1.workspace.workflow.workflow_statistics.WorkflowStatisticsContext :rtype: twilio.rest.taskrouter.v1.workspace.workflow.workflow_statistics.WorkflowStatisticsContext """ return WorkflowStatisticsContext( self._version, workspace_sid=self._solution['workspace_sid'], workflow_sid=self._solution['workflow_sid'], )
python
{ "resource": "" }
q29433
WorkflowStatisticsPage.get_instance
train
def get_instance(self, payload): """ Build an instance of WorkflowStatisticsInstance :param dict payload: Payload response from the API :returns: twilio.rest.taskrouter.v1.workspace.workflow.workflow_statistics.WorkflowStatisticsInstance :rtype: twilio.rest.taskrouter.v1.workspace.workflow.workflow_statistics.WorkflowStatisticsInstance """ return WorkflowStatisticsInstance( self._version, payload, workspace_sid=self._solution['workspace_sid'], workflow_sid=self._solution['workflow_sid'], )
python
{ "resource": "" }
q29434
DocumentPermissionList.get
train
def get(self, identity): """ Constructs a DocumentPermissionContext :param identity: Identity of the user to whom the Sync Document Permission applies. :returns: twilio.rest.sync.v1.service.document.document_permission.DocumentPermissionContext :rtype: twilio.rest.sync.v1.service.document.document_permission.DocumentPermissionContext """ return DocumentPermissionContext( self._version, service_sid=self._solution['service_sid'], document_sid=self._solution['document_sid'], identity=identity, )
python
{ "resource": "" }
q29435
DocumentPermissionPage.get_instance
train
def get_instance(self, payload): """ Build an instance of DocumentPermissionInstance :param dict payload: Payload response from the API :returns: twilio.rest.sync.v1.service.document.document_permission.DocumentPermissionInstance :rtype: twilio.rest.sync.v1.service.document.document_permission.DocumentPermissionInstance """ return DocumentPermissionInstance( self._version, payload, service_sid=self._solution['service_sid'], document_sid=self._solution['document_sid'], )
python
{ "resource": "" }
q29436
DocumentPermissionContext.fetch
train
def fetch(self): """ Fetch a DocumentPermissionInstance :returns: Fetched DocumentPermissionInstance :rtype: twilio.rest.sync.v1.service.document.document_permission.DocumentPermissionInstance """ params = values.of({}) payload = self._version.fetch( 'GET', self._uri, params=params, ) return DocumentPermissionInstance( self._version, payload, service_sid=self._solution['service_sid'], document_sid=self._solution['document_sid'], identity=self._solution['identity'], )
python
{ "resource": "" }
q29437
DocumentPermissionContext.update
train
def update(self, read, write, manage): """ Update the DocumentPermissionInstance :param bool read: Read access. :param bool write: Write access. :param bool manage: Manage access. :returns: Updated DocumentPermissionInstance :rtype: twilio.rest.sync.v1.service.document.document_permission.DocumentPermissionInstance """ data = values.of({'Read': read, 'Write': write, 'Manage': manage, }) payload = self._version.update( 'POST', self._uri, data=data, ) return DocumentPermissionInstance( self._version, payload, service_sid=self._solution['service_sid'], document_sid=self._solution['document_sid'], identity=self._solution['identity'], )
python
{ "resource": "" }
q29438
SyncStreamList.get
train
def get(self, sid): """ Constructs a SyncStreamContext :param sid: Stream SID or unique name. :returns: twilio.rest.sync.v1.service.sync_stream.SyncStreamContext :rtype: twilio.rest.sync.v1.service.sync_stream.SyncStreamContext """ return SyncStreamContext(self._version, service_sid=self._solution['service_sid'], sid=sid, )
python
{ "resource": "" }
q29439
SyncStreamPage.get_instance
train
def get_instance(self, payload): """ Build an instance of SyncStreamInstance :param dict payload: Payload response from the API :returns: twilio.rest.sync.v1.service.sync_stream.SyncStreamInstance :rtype: twilio.rest.sync.v1.service.sync_stream.SyncStreamInstance """ return SyncStreamInstance(self._version, payload, service_sid=self._solution['service_sid'], )
python
{ "resource": "" }
q29440
SyncStreamContext.stream_messages
train
def stream_messages(self): """ Access the stream_messages :returns: twilio.rest.sync.v1.service.sync_stream.stream_message.StreamMessageList :rtype: twilio.rest.sync.v1.service.sync_stream.stream_message.StreamMessageList """ if self._stream_messages is None: self._stream_messages = StreamMessageList( self._version, service_sid=self._solution['service_sid'], stream_sid=self._solution['sid'], ) return self._stream_messages
python
{ "resource": "" }
q29441
SyncStreamInstance.update
train
def update(self, ttl=values.unset): """ Update the SyncStreamInstance :param unicode ttl: Stream TTL. :returns: Updated SyncStreamInstance :rtype: twilio.rest.sync.v1.service.sync_stream.SyncStreamInstance """ return self._proxy.update(ttl=ttl, )
python
{ "resource": "" }
q29442
obsolete_client
train
def obsolete_client(func): """This is a decorator which can be used to mark Client classes as obsolete. It will result in an error being emitted when the class is instantiated.""" @functools.wraps(func) def new_func(*args, **kwargs): raise ObsoleteException( "{} has been removed from this version of the library. " "Please refer to current documentation for guidance." .format(func.__name__) ) return new_func
python
{ "resource": "" }
q29443
ValidationClient.request
train
def request(self, method, url, params=None, data=None, headers=None, auth=None, timeout=None, allow_redirects=False): """ Make a signed HTTP Request :param str method: The HTTP method to use :param str url: The URL to request :param dict params: Query parameters to append to the URL :param dict data: Parameters to go in the body of the HTTP request :param dict headers: HTTP Headers to send with the request :param tuple auth: Basic Auth arguments :param float timeout: Socket/Read timeout for the request :param boolean allow_redirects: Whether or not to allow redirects See the requests documentation for explanation of all these parameters :return: An http response :rtype: A :class:`Response <twilio.rest.http.response.Response>` object """ session = self.session or Session() request = Request(method.upper(), url, params=params, data=data, headers=headers, auth=auth) prepared_request = session.prepare_request(request) if 'Host' not in prepared_request.headers and 'host' not in prepared_request.headers: prepared_request.headers['Host'] = self._get_host(prepared_request) validation_payload = self._build_validation_payload(prepared_request) jwt = ClientValidationJwt(self.account_sid, self.api_key_sid, self.credential_sid, self.private_key, validation_payload) prepared_request.headers['Twilio-Client-Validation'] = jwt.to_jwt() response = session.send( prepared_request, allow_redirects=allow_redirects, timeout=timeout, ) return Response(int(response.status_code), response.text)
python
{ "resource": "" }
q29444
CallList.create
train
def create(self, to, from_, method=values.unset, fallback_url=values.unset, fallback_method=values.unset, status_callback=values.unset, status_callback_event=values.unset, status_callback_method=values.unset, send_digits=values.unset, timeout=values.unset, record=values.unset, recording_channels=values.unset, recording_status_callback=values.unset, recording_status_callback_method=values.unset, sip_auth_username=values.unset, sip_auth_password=values.unset, machine_detection=values.unset, machine_detection_timeout=values.unset, recording_status_callback_event=values.unset, trim=values.unset, caller_id=values.unset, machine_detection_speech_threshold=values.unset, machine_detection_speech_end_threshold=values.unset, machine_detection_silence_timeout=values.unset, url=values.unset, application_sid=values.unset): """ Create a new CallInstance :param unicode to: Phone number, SIP address, or client identifier to call :param unicode from_: Twilio number from which to originate the call :param unicode method: HTTP method to use to fetch TwiML :param unicode fallback_url: Fallback URL in case of error :param unicode fallback_method: HTTP Method to use with fallback_url :param unicode status_callback: The URL we should call to send status information to your application :param unicode status_callback_event: The call progress events that we send to the `status_callback` URL. :param unicode status_callback_method: HTTP Method to use with status_callback :param unicode send_digits: The digits to dial after connecting to the number :param unicode timeout: Number of seconds to wait for an answer :param bool record: Whether or not to record the call :param unicode recording_channels: The number of channels in the final recording :param unicode recording_status_callback: The URL that we call when the recording is available to be accessed :param unicode recording_status_callback_method: The HTTP method we should use when calling the `recording_status_callback` URL :param unicode sip_auth_username: The username used to authenticate the caller making a SIP call :param unicode sip_auth_password: The password required to authenticate the user account specified in `sip_auth_username`. :param unicode machine_detection: Enable machine detection or end of greeting detection :param unicode machine_detection_timeout: Number of seconds to wait for machine detection :param unicode recording_status_callback_event: The recording status events that will trigger calls to the URL specified in `recording_status_callback` :param unicode trim: Set this parameter to control trimming of silence on the recording. :param unicode caller_id: The phone number, SIP address, or Client identifier that made this call. Phone numbers are in E.164 format (e.g., +16175551212). SIP addresses are formatted as `name@company.com`. :param unicode machine_detection_speech_threshold: Number of milliseconds for measuring stick for the length of the speech activity :param unicode machine_detection_speech_end_threshold: Number of milliseconds of silence after speech activity :param unicode machine_detection_silence_timeout: Number of milliseconds of initial silence :param unicode url: The absolute URL that returns TwiML for this call :param unicode application_sid: The SID of the Application resource that will handle the call :returns: Newly created CallInstance :rtype: twilio.rest.api.v2010.account.call.CallInstance """ data = values.of({ 'To': to, 'From': from_, 'Url': url, 'ApplicationSid': application_sid, 'Method': method, 'FallbackUrl': fallback_url, 'FallbackMethod': fallback_method, 'StatusCallback': status_callback, 'StatusCallbackEvent': serialize.map(status_callback_event, lambda e: e), 'StatusCallbackMethod': status_callback_method, 'SendDigits': send_digits, 'Timeout': timeout, 'Record': record, 'RecordingChannels': recording_channels, 'RecordingStatusCallback': recording_status_callback, 'RecordingStatusCallbackMethod': recording_status_callback_method, 'SipAuthUsername': sip_auth_username, 'SipAuthPassword': sip_auth_password, 'MachineDetection': machine_detection, 'MachineDetectionTimeout': machine_detection_timeout, 'RecordingStatusCallbackEvent': serialize.map(recording_status_callback_event, lambda e: e), 'Trim': trim, 'CallerId': caller_id, 'MachineDetectionSpeechThreshold': machine_detection_speech_threshold, 'MachineDetectionSpeechEndThreshold': machine_detection_speech_end_threshold, 'MachineDetectionSilenceTimeout': machine_detection_silence_timeout, }) payload = self._version.create( 'POST', self._uri, data=data, ) return CallInstance(self._version, payload, account_sid=self._solution['account_sid'], )
python
{ "resource": "" }
q29445
CallList.stream
train
def stream(self, to=values.unset, from_=values.unset, parent_call_sid=values.unset, status=values.unset, start_time_before=values.unset, start_time=values.unset, start_time_after=values.unset, end_time_before=values.unset, end_time=values.unset, end_time_after=values.unset, limit=None, page_size=None): """ Streams CallInstance records from the API as a generator stream. This operation lazily loads records as efficiently as possible until the limit is reached. The results are returned as a generator, so this operation is memory efficient. :param unicode to: Phone number or Client identifier of calls to include :param unicode from_: Phone number or Client identifier to filter `from` on :param unicode parent_call_sid: Parent call SID to filter on :param CallInstance.Status status: The status of the resources to read :param datetime start_time_before: Only include calls that started on or after this date :param datetime start_time: Only include calls that started on or after this date :param datetime start_time_after: Only include calls that started on or after this date :param datetime end_time_before: Only include usage that occurred on or before this date :param datetime end_time: Only include usage that occurred on or before this date :param datetime end_time_after: Only include usage that occurred on or before this date :param int limit: Upper limit for the number of records to return. stream() guarantees to never return more than limit. Default is no limit :param int page_size: Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, stream() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000) :returns: Generator that will yield up to limit results :rtype: list[twilio.rest.api.v2010.account.call.CallInstance] """ limits = self._version.read_limits(limit, page_size) page = self.page( to=to, from_=from_, parent_call_sid=parent_call_sid, status=status, start_time_before=start_time_before, start_time=start_time, start_time_after=start_time_after, end_time_before=end_time_before, end_time=end_time, end_time_after=end_time_after, page_size=limits['page_size'], ) return self._version.stream(page, limits['limit'], limits['page_limit'])
python
{ "resource": "" }
q29446
CallList.page
train
def page(self, to=values.unset, from_=values.unset, parent_call_sid=values.unset, status=values.unset, start_time_before=values.unset, start_time=values.unset, start_time_after=values.unset, end_time_before=values.unset, end_time=values.unset, end_time_after=values.unset, page_token=values.unset, page_number=values.unset, page_size=values.unset): """ Retrieve a single page of CallInstance records from the API. Request is executed immediately :param unicode to: Phone number or Client identifier of calls to include :param unicode from_: Phone number or Client identifier to filter `from` on :param unicode parent_call_sid: Parent call SID to filter on :param CallInstance.Status status: The status of the resources to read :param datetime start_time_before: Only include calls that started on or after this date :param datetime start_time: Only include calls that started on or after this date :param datetime start_time_after: Only include calls that started on or after this date :param datetime end_time_before: Only include usage that occurred on or before this date :param datetime end_time: Only include usage that occurred on or before this date :param datetime end_time_after: Only include usage that occurred on or before this date :param str page_token: PageToken provided by the API :param int page_number: Page Number, this value is simply for client state :param int page_size: Number of records to return, defaults to 50 :returns: Page of CallInstance :rtype: twilio.rest.api.v2010.account.call.CallPage """ params = values.of({ 'To': to, 'From': from_, 'ParentCallSid': parent_call_sid, 'Status': status, 'StartTime<': serialize.iso8601_datetime(start_time_before), 'StartTime': serialize.iso8601_datetime(start_time), 'StartTime>': serialize.iso8601_datetime(start_time_after), 'EndTime<': serialize.iso8601_datetime(end_time_before), 'EndTime': serialize.iso8601_datetime(end_time), 'EndTime>': serialize.iso8601_datetime(end_time_after), 'PageToken': page_token, 'Page': page_number, 'PageSize': page_size, }) response = self._version.page( 'GET', self._uri, params=params, ) return CallPage(self._version, response, self._solution)
python
{ "resource": "" }
q29447
CallList.feedback_summaries
train
def feedback_summaries(self): """ Access the feedback_summaries :returns: twilio.rest.api.v2010.account.call.feedback_summary.FeedbackSummaryList :rtype: twilio.rest.api.v2010.account.call.feedback_summary.FeedbackSummaryList """ if self._feedback_summaries is None: self._feedback_summaries = FeedbackSummaryList( self._version, account_sid=self._solution['account_sid'], ) return self._feedback_summaries
python
{ "resource": "" }
q29448
CallList.get
train
def get(self, sid): """ Constructs a CallContext :param sid: The unique string that identifies this resource :returns: twilio.rest.api.v2010.account.call.CallContext :rtype: twilio.rest.api.v2010.account.call.CallContext """ return CallContext(self._version, account_sid=self._solution['account_sid'], sid=sid, )
python
{ "resource": "" }
q29449
CallPage.get_instance
train
def get_instance(self, payload): """ Build an instance of CallInstance :param dict payload: Payload response from the API :returns: twilio.rest.api.v2010.account.call.CallInstance :rtype: twilio.rest.api.v2010.account.call.CallInstance """ return CallInstance(self._version, payload, account_sid=self._solution['account_sid'], )
python
{ "resource": "" }
q29450
AssetVersionList.create
train
def create(self, path, visibility): """ Create a new AssetVersionInstance :param unicode path: The path :param AssetVersionInstance.Visibility visibility: The visibility :returns: Newly created AssetVersionInstance :rtype: twilio.rest.serverless.v1.service.asset.asset_version.AssetVersionInstance """ data = values.of({'Path': path, 'Visibility': visibility, }) payload = self._version.create( 'POST', self._uri, data=data, ) return AssetVersionInstance( self._version, payload, service_sid=self._solution['service_sid'], asset_sid=self._solution['asset_sid'], )
python
{ "resource": "" }
q29451
AssetVersionList.get
train
def get(self, sid): """ Constructs a AssetVersionContext :param sid: The sid :returns: twilio.rest.serverless.v1.service.asset.asset_version.AssetVersionContext :rtype: twilio.rest.serverless.v1.service.asset.asset_version.AssetVersionContext """ return AssetVersionContext( self._version, service_sid=self._solution['service_sid'], asset_sid=self._solution['asset_sid'], sid=sid, )
python
{ "resource": "" }
q29452
AssetVersionPage.get_instance
train
def get_instance(self, payload): """ Build an instance of AssetVersionInstance :param dict payload: Payload response from the API :returns: twilio.rest.serverless.v1.service.asset.asset_version.AssetVersionInstance :rtype: twilio.rest.serverless.v1.service.asset.asset_version.AssetVersionInstance """ return AssetVersionInstance( self._version, payload, service_sid=self._solution['service_sid'], asset_sid=self._solution['asset_sid'], )
python
{ "resource": "" }
q29453
AssetVersionContext.fetch
train
def fetch(self): """ Fetch a AssetVersionInstance :returns: Fetched AssetVersionInstance :rtype: twilio.rest.serverless.v1.service.asset.asset_version.AssetVersionInstance """ params = values.of({}) payload = self._version.fetch( 'GET', self._uri, params=params, ) return AssetVersionInstance( self._version, payload, service_sid=self._solution['service_sid'], asset_sid=self._solution['asset_sid'], sid=self._solution['sid'], )
python
{ "resource": "" }
q29454
CredentialList.public_key
train
def public_key(self): """ Access the public_key :returns: twilio.rest.accounts.v1.credential.public_key.PublicKeyList :rtype: twilio.rest.accounts.v1.credential.public_key.PublicKeyList """ if self._public_key is None: self._public_key = PublicKeyList(self._version, ) return self._public_key
python
{ "resource": "" }
q29455
CredentialList.aws
train
def aws(self): """ Access the aws :returns: twilio.rest.accounts.v1.credential.aws.AwsList :rtype: twilio.rest.accounts.v1.credential.aws.AwsList """ if self._aws is None: self._aws = AwsList(self._version, ) return self._aws
python
{ "resource": "" }
q29456
TaskStatisticsList.get
train
def get(self): """ Constructs a TaskStatisticsContext :returns: twilio.rest.autopilot.v1.assistant.task.task_statistics.TaskStatisticsContext :rtype: twilio.rest.autopilot.v1.assistant.task.task_statistics.TaskStatisticsContext """ return TaskStatisticsContext( self._version, assistant_sid=self._solution['assistant_sid'], task_sid=self._solution['task_sid'], )
python
{ "resource": "" }
q29457
TaskStatisticsPage.get_instance
train
def get_instance(self, payload): """ Build an instance of TaskStatisticsInstance :param dict payload: Payload response from the API :returns: twilio.rest.autopilot.v1.assistant.task.task_statistics.TaskStatisticsInstance :rtype: twilio.rest.autopilot.v1.assistant.task.task_statistics.TaskStatisticsInstance """ return TaskStatisticsInstance( self._version, payload, assistant_sid=self._solution['assistant_sid'], task_sid=self._solution['task_sid'], )
python
{ "resource": "" }
q29458
SyncMapList.get
train
def get(self, sid): """ Constructs a SyncMapContext :param sid: The sid :returns: twilio.rest.sync.v1.service.sync_map.SyncMapContext :rtype: twilio.rest.sync.v1.service.sync_map.SyncMapContext """ return SyncMapContext(self._version, service_sid=self._solution['service_sid'], sid=sid, )
python
{ "resource": "" }
q29459
SyncMapPage.get_instance
train
def get_instance(self, payload): """ Build an instance of SyncMapInstance :param dict payload: Payload response from the API :returns: twilio.rest.sync.v1.service.sync_map.SyncMapInstance :rtype: twilio.rest.sync.v1.service.sync_map.SyncMapInstance """ return SyncMapInstance(self._version, payload, service_sid=self._solution['service_sid'], )
python
{ "resource": "" }
q29460
SyncMapContext.sync_map_items
train
def sync_map_items(self): """ Access the sync_map_items :returns: twilio.rest.sync.v1.service.sync_map.sync_map_item.SyncMapItemList :rtype: twilio.rest.sync.v1.service.sync_map.sync_map_item.SyncMapItemList """ if self._sync_map_items is None: self._sync_map_items = SyncMapItemList( self._version, service_sid=self._solution['service_sid'], map_sid=self._solution['sid'], ) return self._sync_map_items
python
{ "resource": "" }
q29461
SyncMapContext.sync_map_permissions
train
def sync_map_permissions(self): """ Access the sync_map_permissions :returns: twilio.rest.sync.v1.service.sync_map.sync_map_permission.SyncMapPermissionList :rtype: twilio.rest.sync.v1.service.sync_map.sync_map_permission.SyncMapPermissionList """ if self._sync_map_permissions is None: self._sync_map_permissions = SyncMapPermissionList( self._version, service_sid=self._solution['service_sid'], map_sid=self._solution['sid'], ) return self._sync_map_permissions
python
{ "resource": "" }
q29462
WorkflowList.create
train
def create(self, friendly_name, configuration, assignment_callback_url=values.unset, fallback_assignment_callback_url=values.unset, task_reservation_timeout=values.unset): """ Create a new WorkflowInstance :param unicode friendly_name: A string representing a human readable name for this Workflow. :param unicode configuration: JSON document configuring the rules for this Workflow. :param unicode assignment_callback_url: A valid URL for the application that will process task assignment events. :param unicode fallback_assignment_callback_url: If the request to the AssignmentCallbackUrl fails, the assignment callback will be made to this URL. :param unicode task_reservation_timeout: An integer value controlling how long in seconds TaskRouter will wait for a confirmation response from your application after assigning a Task to a worker. :returns: Newly created WorkflowInstance :rtype: twilio.rest.taskrouter.v1.workspace.workflow.WorkflowInstance """ data = values.of({ 'FriendlyName': friendly_name, 'Configuration': configuration, 'AssignmentCallbackUrl': assignment_callback_url, 'FallbackAssignmentCallbackUrl': fallback_assignment_callback_url, 'TaskReservationTimeout': task_reservation_timeout, }) payload = self._version.create( 'POST', self._uri, data=data, ) return WorkflowInstance(self._version, payload, workspace_sid=self._solution['workspace_sid'], )
python
{ "resource": "" }
q29463
WorkflowList.get
train
def get(self, sid): """ Constructs a WorkflowContext :param sid: The sid :returns: twilio.rest.taskrouter.v1.workspace.workflow.WorkflowContext :rtype: twilio.rest.taskrouter.v1.workspace.workflow.WorkflowContext """ return WorkflowContext(self._version, workspace_sid=self._solution['workspace_sid'], sid=sid, )
python
{ "resource": "" }
q29464
WorkflowPage.get_instance
train
def get_instance(self, payload): """ Build an instance of WorkflowInstance :param dict payload: Payload response from the API :returns: twilio.rest.taskrouter.v1.workspace.workflow.WorkflowInstance :rtype: twilio.rest.taskrouter.v1.workspace.workflow.WorkflowInstance """ return WorkflowInstance(self._version, payload, workspace_sid=self._solution['workspace_sid'], )
python
{ "resource": "" }
q29465
WorkflowInstance.update
train
def update(self, friendly_name=values.unset, assignment_callback_url=values.unset, fallback_assignment_callback_url=values.unset, configuration=values.unset, task_reservation_timeout=values.unset): """ Update the WorkflowInstance :param unicode friendly_name: A string representing a human readable name for this Workflow. :param unicode assignment_callback_url: A valid URL for the application that will process task assignment events. :param unicode fallback_assignment_callback_url: If the request to the AssignmentCallbackUrl fails, the assignment callback will be made to this URL. :param unicode configuration: JSON document configuring the rules for this Workflow. :param unicode task_reservation_timeout: An integer value controlling how long in seconds TaskRouter will wait for a confirmation response from your application after assigning a Task to a worker. :returns: Updated WorkflowInstance :rtype: twilio.rest.taskrouter.v1.workspace.workflow.WorkflowInstance """ return self._proxy.update( friendly_name=friendly_name, assignment_callback_url=assignment_callback_url, fallback_assignment_callback_url=fallback_assignment_callback_url, configuration=configuration, task_reservation_timeout=task_reservation_timeout, )
python
{ "resource": "" }
q29466
BuildList.create
train
def create(self, asset_versions=values.unset, function_versions=values.unset, dependencies=values.unset): """ Create a new BuildInstance :param unicode asset_versions: The asset_versions :param unicode function_versions: The function_versions :param unicode dependencies: The dependencies :returns: Newly created BuildInstance :rtype: twilio.rest.serverless.v1.service.build.BuildInstance """ data = values.of({ 'AssetVersions': serialize.map(asset_versions, lambda e: e), 'FunctionVersions': serialize.map(function_versions, lambda e: e), 'Dependencies': dependencies, }) payload = self._version.create( 'POST', self._uri, data=data, ) return BuildInstance(self._version, payload, service_sid=self._solution['service_sid'], )
python
{ "resource": "" }
q29467
BuildList.get
train
def get(self, sid): """ Constructs a BuildContext :param sid: The sid :returns: twilio.rest.serverless.v1.service.build.BuildContext :rtype: twilio.rest.serverless.v1.service.build.BuildContext """ return BuildContext(self._version, service_sid=self._solution['service_sid'], sid=sid, )
python
{ "resource": "" }
q29468
BuildPage.get_instance
train
def get_instance(self, payload): """ Build an instance of BuildInstance :param dict payload: Payload response from the API :returns: twilio.rest.serverless.v1.service.build.BuildInstance :rtype: twilio.rest.serverless.v1.service.build.BuildInstance """ return BuildInstance(self._version, payload, service_sid=self._solution['service_sid'], )
python
{ "resource": "" }
q29469
BindingList.create
train
def create(self, identity, binding_type, address, tag=values.unset, notification_protocol_version=values.unset, credential_sid=values.unset, endpoint=values.unset): """ Create a new BindingInstance :param unicode identity: The `identity` value that identifies the new resource's User :param BindingInstance.BindingType binding_type: The type of the Binding :param unicode address: The channel-specific address :param unicode tag: A tag that can be used to select the Bindings to notify :param unicode notification_protocol_version: The protocol version to use to send the notification :param unicode credential_sid: The SID of the Credential resource to be used to send notifications to this Binding :param unicode endpoint: Deprecated :returns: Newly created BindingInstance :rtype: twilio.rest.notify.v1.service.binding.BindingInstance """ data = values.of({ 'Identity': identity, 'BindingType': binding_type, 'Address': address, 'Tag': serialize.map(tag, lambda e: e), 'NotificationProtocolVersion': notification_protocol_version, 'CredentialSid': credential_sid, 'Endpoint': endpoint, }) payload = self._version.create( 'POST', self._uri, data=data, ) return BindingInstance(self._version, payload, service_sid=self._solution['service_sid'], )
python
{ "resource": "" }
q29470
BindingList.stream
train
def stream(self, start_date=values.unset, end_date=values.unset, identity=values.unset, tag=values.unset, limit=None, page_size=None): """ Streams BindingInstance records from the API as a generator stream. This operation lazily loads records as efficiently as possible until the limit is reached. The results are returned as a generator, so this operation is memory efficient. :param date start_date: Only include usage that has occurred on or after this date :param date end_date: Only include usage that occurred on or before this date :param unicode identity: The `identity` value of the resources to read :param unicode tag: Only list Bindings that have all of the specified Tags :param int limit: Upper limit for the number of records to return. stream() guarantees to never return more than limit. Default is no limit :param int page_size: Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, stream() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000) :returns: Generator that will yield up to limit results :rtype: list[twilio.rest.notify.v1.service.binding.BindingInstance] """ limits = self._version.read_limits(limit, page_size) page = self.page( start_date=start_date, end_date=end_date, identity=identity, tag=tag, page_size=limits['page_size'], ) return self._version.stream(page, limits['limit'], limits['page_limit'])
python
{ "resource": "" }
q29471
BindingList.page
train
def page(self, start_date=values.unset, end_date=values.unset, identity=values.unset, tag=values.unset, page_token=values.unset, page_number=values.unset, page_size=values.unset): """ Retrieve a single page of BindingInstance records from the API. Request is executed immediately :param date start_date: Only include usage that has occurred on or after this date :param date end_date: Only include usage that occurred on or before this date :param unicode identity: The `identity` value of the resources to read :param unicode tag: Only list Bindings that have all of the specified Tags :param str page_token: PageToken provided by the API :param int page_number: Page Number, this value is simply for client state :param int page_size: Number of records to return, defaults to 50 :returns: Page of BindingInstance :rtype: twilio.rest.notify.v1.service.binding.BindingPage """ params = values.of({ 'StartDate': serialize.iso8601_date(start_date), 'EndDate': serialize.iso8601_date(end_date), 'Identity': serialize.map(identity, lambda e: e), 'Tag': serialize.map(tag, lambda e: e), 'PageToken': page_token, 'Page': page_number, 'PageSize': page_size, }) response = self._version.page( 'GET', self._uri, params=params, ) return BindingPage(self._version, response, self._solution)
python
{ "resource": "" }
q29472
BindingList.get
train
def get(self, sid): """ Constructs a BindingContext :param sid: The unique string that identifies the resource :returns: twilio.rest.notify.v1.service.binding.BindingContext :rtype: twilio.rest.notify.v1.service.binding.BindingContext """ return BindingContext(self._version, service_sid=self._solution['service_sid'], sid=sid, )
python
{ "resource": "" }
q29473
BindingPage.get_instance
train
def get_instance(self, payload): """ Build an instance of BindingInstance :param dict payload: Payload response from the API :returns: twilio.rest.notify.v1.service.binding.BindingInstance :rtype: twilio.rest.notify.v1.service.binding.BindingInstance """ return BindingInstance(self._version, payload, service_sid=self._solution['service_sid'], )
python
{ "resource": "" }
q29474
InstalledAddOnList.create
train
def create(self, available_add_on_sid, accept_terms_of_service, configuration=values.unset, unique_name=values.unset): """ Create a new InstalledAddOnInstance :param unicode available_add_on_sid: A string that uniquely identifies the Add-on to install :param bool accept_terms_of_service: A boolean reflecting your acceptance of the Terms of Service :param dict configuration: The JSON object representing the configuration :param unicode unique_name: The string that uniquely identifies this Add-on installation :returns: Newly created InstalledAddOnInstance :rtype: twilio.rest.preview.marketplace.installed_add_on.InstalledAddOnInstance """ data = values.of({ 'AvailableAddOnSid': available_add_on_sid, 'AcceptTermsOfService': accept_terms_of_service, 'Configuration': serialize.object(configuration), 'UniqueName': unique_name, }) payload = self._version.create( 'POST', self._uri, data=data, ) return InstalledAddOnInstance(self._version, payload, )
python
{ "resource": "" }
q29475
RoomList.create
train
def create(self, enable_turn=values.unset, type=values.unset, unique_name=values.unset, status_callback=values.unset, status_callback_method=values.unset, max_participants=values.unset, record_participants_on_connect=values.unset, video_codecs=values.unset, media_region=values.unset): """ Create a new RoomInstance :param bool enable_turn: Use Twilio Network Traversal for TURN service. :param RoomInstance.RoomType type: Type of room, either peer-to-peer, group-small or group. :param unicode unique_name: Name of the Room. :param unicode status_callback: A URL that Twilio sends asynchronous webhook requests to on every room event. :param unicode status_callback_method: HTTP method Twilio should use when requesting the above URL. :param unicode max_participants: Maximum number of Participants in the Room. :param bool record_participants_on_connect: Start Participant recording when connected. :param RoomInstance.VideoCodec video_codecs: An array of video codecs supported when publishing a Track in the Room. :param unicode media_region: Region for the media server in Group Rooms. :returns: Newly created RoomInstance :rtype: twilio.rest.video.v1.room.RoomInstance """ data = values.of({ 'EnableTurn': enable_turn, 'Type': type, 'UniqueName': unique_name, 'StatusCallback': status_callback, 'StatusCallbackMethod': status_callback_method, 'MaxParticipants': max_participants, 'RecordParticipantsOnConnect': record_participants_on_connect, 'VideoCodecs': serialize.map(video_codecs, lambda e: e), 'MediaRegion': media_region, }) payload = self._version.create( 'POST', self._uri, data=data, ) return RoomInstance(self._version, payload, )
python
{ "resource": "" }
q29476
RoomList.stream
train
def stream(self, status=values.unset, unique_name=values.unset, date_created_after=values.unset, date_created_before=values.unset, limit=None, page_size=None): """ Streams RoomInstance records from the API as a generator stream. This operation lazily loads records as efficiently as possible until the limit is reached. The results are returned as a generator, so this operation is memory efficient. :param RoomInstance.RoomStatus status: Only show Rooms with the given status. :param unicode unique_name: Only show Rooms with the provided Name. :param datetime date_created_after: Only show Rooms that started on or after this date, given as YYYY-MM-DD. :param datetime date_created_before: Only show Rooms that started before this date, given as YYYY-MM-DD. :param int limit: Upper limit for the number of records to return. stream() guarantees to never return more than limit. Default is no limit :param int page_size: Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, stream() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000) :returns: Generator that will yield up to limit results :rtype: list[twilio.rest.video.v1.room.RoomInstance] """ limits = self._version.read_limits(limit, page_size) page = self.page( status=status, unique_name=unique_name, date_created_after=date_created_after, date_created_before=date_created_before, page_size=limits['page_size'], ) return self._version.stream(page, limits['limit'], limits['page_limit'])
python
{ "resource": "" }
q29477
RoomContext.update
train
def update(self, status): """ Update the RoomInstance :param RoomInstance.RoomStatus status: Set to completed to end the Room. :returns: Updated RoomInstance :rtype: twilio.rest.video.v1.room.RoomInstance """ data = values.of({'Status': status, }) payload = self._version.update( 'POST', self._uri, data=data, ) return RoomInstance(self._version, payload, sid=self._solution['sid'], )
python
{ "resource": "" }
q29478
of
train
def of(d): """ Remove unset values from a dict. :param dict d: A dict to strip. :return dict: A dict with unset values removed. """ return {k: v for k, v in iteritems(d) if v != unset}
python
{ "resource": "" }
q29479
AuthorizedConnectAppList.get
train
def get(self, connect_app_sid): """ Constructs a AuthorizedConnectAppContext :param connect_app_sid: The SID of the Connect App to fetch :returns: twilio.rest.api.v2010.account.authorized_connect_app.AuthorizedConnectAppContext :rtype: twilio.rest.api.v2010.account.authorized_connect_app.AuthorizedConnectAppContext """ return AuthorizedConnectAppContext( self._version, account_sid=self._solution['account_sid'], connect_app_sid=connect_app_sid, )
python
{ "resource": "" }
q29480
AuthorizedConnectAppPage.get_instance
train
def get_instance(self, payload): """ Build an instance of AuthorizedConnectAppInstance :param dict payload: Payload response from the API :returns: twilio.rest.api.v2010.account.authorized_connect_app.AuthorizedConnectAppInstance :rtype: twilio.rest.api.v2010.account.authorized_connect_app.AuthorizedConnectAppInstance """ return AuthorizedConnectAppInstance( self._version, payload, account_sid=self._solution['account_sid'], )
python
{ "resource": "" }
q29481
AuthorizedConnectAppContext.fetch
train
def fetch(self): """ Fetch a AuthorizedConnectAppInstance :returns: Fetched AuthorizedConnectAppInstance :rtype: twilio.rest.api.v2010.account.authorized_connect_app.AuthorizedConnectAppInstance """ params = values.of({}) payload = self._version.fetch( 'GET', self._uri, params=params, ) return AuthorizedConnectAppInstance( self._version, payload, account_sid=self._solution['account_sid'], connect_app_sid=self._solution['connect_app_sid'], )
python
{ "resource": "" }
q29482
TaskActionsList.get
train
def get(self): """ Constructs a TaskActionsContext :returns: twilio.rest.autopilot.v1.assistant.task.task_actions.TaskActionsContext :rtype: twilio.rest.autopilot.v1.assistant.task.task_actions.TaskActionsContext """ return TaskActionsContext( self._version, assistant_sid=self._solution['assistant_sid'], task_sid=self._solution['task_sid'], )
python
{ "resource": "" }
q29483
TaskActionsPage.get_instance
train
def get_instance(self, payload): """ Build an instance of TaskActionsInstance :param dict payload: Payload response from the API :returns: twilio.rest.autopilot.v1.assistant.task.task_actions.TaskActionsInstance :rtype: twilio.rest.autopilot.v1.assistant.task.task_actions.TaskActionsInstance """ return TaskActionsInstance( self._version, payload, assistant_sid=self._solution['assistant_sid'], task_sid=self._solution['task_sid'], )
python
{ "resource": "" }
q29484
TaskActionsContext.fetch
train
def fetch(self): """ Fetch a TaskActionsInstance :returns: Fetched TaskActionsInstance :rtype: twilio.rest.autopilot.v1.assistant.task.task_actions.TaskActionsInstance """ params = values.of({}) payload = self._version.fetch( 'GET', self._uri, params=params, ) return TaskActionsInstance( self._version, payload, assistant_sid=self._solution['assistant_sid'], task_sid=self._solution['task_sid'], )
python
{ "resource": "" }
q29485
WorkerChannelList.get
train
def get(self, sid): """ Constructs a WorkerChannelContext :param sid: The sid :returns: twilio.rest.taskrouter.v1.workspace.worker.worker_channel.WorkerChannelContext :rtype: twilio.rest.taskrouter.v1.workspace.worker.worker_channel.WorkerChannelContext """ return WorkerChannelContext( self._version, workspace_sid=self._solution['workspace_sid'], worker_sid=self._solution['worker_sid'], sid=sid, )
python
{ "resource": "" }
q29486
WorkerChannelPage.get_instance
train
def get_instance(self, payload): """ Build an instance of WorkerChannelInstance :param dict payload: Payload response from the API :returns: twilio.rest.taskrouter.v1.workspace.worker.worker_channel.WorkerChannelInstance :rtype: twilio.rest.taskrouter.v1.workspace.worker.worker_channel.WorkerChannelInstance """ return WorkerChannelInstance( self._version, payload, workspace_sid=self._solution['workspace_sid'], worker_sid=self._solution['worker_sid'], )
python
{ "resource": "" }
q29487
AccountList.create
train
def create(self, friendly_name=values.unset): """ Create a new AccountInstance :param unicode friendly_name: A human readable description of the account :returns: Newly created AccountInstance :rtype: twilio.rest.api.v2010.account.AccountInstance """ data = values.of({'FriendlyName': friendly_name, }) payload = self._version.create( 'POST', self._uri, data=data, ) return AccountInstance(self._version, payload, )
python
{ "resource": "" }
q29488
AccountContext.addresses
train
def addresses(self): """ Access the addresses :returns: twilio.rest.api.v2010.account.address.AddressList :rtype: twilio.rest.api.v2010.account.address.AddressList """ if self._addresses is None: self._addresses = AddressList(self._version, account_sid=self._solution['sid'], ) return self._addresses
python
{ "resource": "" }
q29489
AccountContext.applications
train
def applications(self): """ Access the applications :returns: twilio.rest.api.v2010.account.application.ApplicationList :rtype: twilio.rest.api.v2010.account.application.ApplicationList """ if self._applications is None: self._applications = ApplicationList(self._version, account_sid=self._solution['sid'], ) return self._applications
python
{ "resource": "" }
q29490
AccountContext.authorized_connect_apps
train
def authorized_connect_apps(self): """ Access the authorized_connect_apps :returns: twilio.rest.api.v2010.account.authorized_connect_app.AuthorizedConnectAppList :rtype: twilio.rest.api.v2010.account.authorized_connect_app.AuthorizedConnectAppList """ if self._authorized_connect_apps is None: self._authorized_connect_apps = AuthorizedConnectAppList( self._version, account_sid=self._solution['sid'], ) return self._authorized_connect_apps
python
{ "resource": "" }
q29491
AccountContext.available_phone_numbers
train
def available_phone_numbers(self): """ Access the available_phone_numbers :returns: twilio.rest.api.v2010.account.available_phone_number.AvailablePhoneNumberCountryList :rtype: twilio.rest.api.v2010.account.available_phone_number.AvailablePhoneNumberCountryList """ if self._available_phone_numbers is None: self._available_phone_numbers = AvailablePhoneNumberCountryList( self._version, account_sid=self._solution['sid'], ) return self._available_phone_numbers
python
{ "resource": "" }
q29492
AccountContext.balance
train
def balance(self): """ Access the balance :returns: twilio.rest.api.v2010.account.balance.BalanceList :rtype: twilio.rest.api.v2010.account.balance.BalanceList """ if self._balance is None: self._balance = BalanceList(self._version, account_sid=self._solution['sid'], ) return self._balance
python
{ "resource": "" }
q29493
AccountContext.conferences
train
def conferences(self): """ Access the conferences :returns: twilio.rest.api.v2010.account.conference.ConferenceList :rtype: twilio.rest.api.v2010.account.conference.ConferenceList """ if self._conferences is None: self._conferences = ConferenceList(self._version, account_sid=self._solution['sid'], ) return self._conferences
python
{ "resource": "" }
q29494
AccountContext.connect_apps
train
def connect_apps(self): """ Access the connect_apps :returns: twilio.rest.api.v2010.account.connect_app.ConnectAppList :rtype: twilio.rest.api.v2010.account.connect_app.ConnectAppList """ if self._connect_apps is None: self._connect_apps = ConnectAppList(self._version, account_sid=self._solution['sid'], ) return self._connect_apps
python
{ "resource": "" }
q29495
AccountContext.incoming_phone_numbers
train
def incoming_phone_numbers(self): """ Access the incoming_phone_numbers :returns: twilio.rest.api.v2010.account.incoming_phone_number.IncomingPhoneNumberList :rtype: twilio.rest.api.v2010.account.incoming_phone_number.IncomingPhoneNumberList """ if self._incoming_phone_numbers is None: self._incoming_phone_numbers = IncomingPhoneNumberList( self._version, account_sid=self._solution['sid'], ) return self._incoming_phone_numbers
python
{ "resource": "" }
q29496
AccountContext.new_keys
train
def new_keys(self): """ Access the new_keys :returns: twilio.rest.api.v2010.account.new_key.NewKeyList :rtype: twilio.rest.api.v2010.account.new_key.NewKeyList """ if self._new_keys is None: self._new_keys = NewKeyList(self._version, account_sid=self._solution['sid'], ) return self._new_keys
python
{ "resource": "" }
q29497
AccountContext.new_signing_keys
train
def new_signing_keys(self): """ Access the new_signing_keys :returns: twilio.rest.api.v2010.account.new_signing_key.NewSigningKeyList :rtype: twilio.rest.api.v2010.account.new_signing_key.NewSigningKeyList """ if self._new_signing_keys is None: self._new_signing_keys = NewSigningKeyList(self._version, account_sid=self._solution['sid'], ) return self._new_signing_keys
python
{ "resource": "" }
q29498
AccountContext.outgoing_caller_ids
train
def outgoing_caller_ids(self): """ Access the outgoing_caller_ids :returns: twilio.rest.api.v2010.account.outgoing_caller_id.OutgoingCallerIdList :rtype: twilio.rest.api.v2010.account.outgoing_caller_id.OutgoingCallerIdList """ if self._outgoing_caller_ids is None: self._outgoing_caller_ids = OutgoingCallerIdList(self._version, account_sid=self._solution['sid'], ) return self._outgoing_caller_ids
python
{ "resource": "" }
q29499
AccountContext.queues
train
def queues(self): """ Access the queues :returns: twilio.rest.api.v2010.account.queue.QueueList :rtype: twilio.rest.api.v2010.account.queue.QueueList """ if self._queues is None: self._queues = QueueList(self._version, account_sid=self._solution['sid'], ) return self._queues
python
{ "resource": "" }