_id stringlengths 2 7 | title stringlengths 1 88 | partition stringclasses 3 values | text stringlengths 75 19.8k | language stringclasses 1 value | meta_information dict |
|---|---|---|---|---|---|
q29500 | AccountContext.signing_keys | train | def signing_keys(self):
"""
Access the signing_keys
:returns: twilio.rest.api.v2010.account.signing_key.SigningKeyList
:rtype: twilio.rest.api.v2010.account.signing_key.SigningKeyList
"""
if self._signing_keys is None:
self._signing_keys = SigningKeyList(self._version, account_sid=self._solution['sid'], )
return self._signing_keys | python | {
"resource": ""
} |
q29501 | AccountContext.sip | train | def sip(self):
"""
Access the sip
:returns: twilio.rest.api.v2010.account.sip.SipList
:rtype: twilio.rest.api.v2010.account.sip.SipList
"""
if self._sip is None:
self._sip = SipList(self._version, account_sid=self._solution['sid'], )
return self._sip | python | {
"resource": ""
} |
q29502 | AccountContext.tokens | train | def tokens(self):
"""
Access the tokens
:returns: twilio.rest.api.v2010.account.token.TokenList
:rtype: twilio.rest.api.v2010.account.token.TokenList
"""
if self._tokens is None:
self._tokens = TokenList(self._version, account_sid=self._solution['sid'], )
return self._tokens | python | {
"resource": ""
} |
q29503 | AccountContext.transcriptions | train | def transcriptions(self):
"""
Access the transcriptions
:returns: twilio.rest.api.v2010.account.transcription.TranscriptionList
:rtype: twilio.rest.api.v2010.account.transcription.TranscriptionList
"""
if self._transcriptions is None:
self._transcriptions = TranscriptionList(self._version, account_sid=self._solution['sid'], )
return self._transcriptions | python | {
"resource": ""
} |
q29504 | AccountContext.validation_requests | train | def validation_requests(self):
"""
Access the validation_requests
:returns: twilio.rest.api.v2010.account.validation_request.ValidationRequestList
:rtype: twilio.rest.api.v2010.account.validation_request.ValidationRequestList
"""
if self._validation_requests is None:
self._validation_requests = ValidationRequestList(self._version, account_sid=self._solution['sid'], )
return self._validation_requests | python | {
"resource": ""
} |
q29505 | AccountInstance.update | train | def update(self, friendly_name=values.unset, status=values.unset):
"""
Update the AccountInstance
:param unicode friendly_name: FriendlyName to update
:param AccountInstance.Status status: Status to update the Account with
:returns: Updated AccountInstance
:rtype: twilio.rest.api.v2010.account.AccountInstance
"""
return self._proxy.update(friendly_name=friendly_name, status=status, ) | python | {
"resource": ""
} |
q29506 | ValidationRequestList.create | train | def create(self, phone_number, friendly_name=values.unset,
call_delay=values.unset, extension=values.unset,
status_callback=values.unset, status_callback_method=values.unset):
"""
Create a new ValidationRequestInstance
:param unicode phone_number: The phone number to verify in E.164 format
:param unicode friendly_name: A string to describe the resource
:param unicode call_delay: The number of seconds to delay before initiating the verification call
:param unicode extension: The digits to dial after connecting the verification call
:param unicode status_callback: The URL we should call to send status information to your application
:param unicode status_callback_method: The HTTP method we should use to call status_callback
:returns: Newly created ValidationRequestInstance
:rtype: twilio.rest.api.v2010.account.validation_request.ValidationRequestInstance
"""
data = values.of({
'PhoneNumber': phone_number,
'FriendlyName': friendly_name,
'CallDelay': call_delay,
'Extension': extension,
'StatusCallback': status_callback,
'StatusCallbackMethod': status_callback_method,
})
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return ValidationRequestInstance(self._version, payload, account_sid=self._solution['account_sid'], ) | python | {
"resource": ""
} |
q29507 | ValidationRequestPage.get_instance | train | def get_instance(self, payload):
"""
Build an instance of ValidationRequestInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.validation_request.ValidationRequestInstance
:rtype: twilio.rest.api.v2010.account.validation_request.ValidationRequestInstance
"""
return ValidationRequestInstance(self._version, payload, account_sid=self._solution['account_sid'], ) | python | {
"resource": ""
} |
q29508 | ExecutionStepList.get | train | def get(self, sid):
"""
Constructs a ExecutionStepContext
:param sid: Step Sid.
:returns: twilio.rest.studio.v1.flow.execution.execution_step.ExecutionStepContext
:rtype: twilio.rest.studio.v1.flow.execution.execution_step.ExecutionStepContext
"""
return ExecutionStepContext(
self._version,
flow_sid=self._solution['flow_sid'],
execution_sid=self._solution['execution_sid'],
sid=sid,
) | python | {
"resource": ""
} |
q29509 | ExecutionStepPage.get_instance | train | def get_instance(self, payload):
"""
Build an instance of ExecutionStepInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.studio.v1.flow.execution.execution_step.ExecutionStepInstance
:rtype: twilio.rest.studio.v1.flow.execution.execution_step.ExecutionStepInstance
"""
return ExecutionStepInstance(
self._version,
payload,
flow_sid=self._solution['flow_sid'],
execution_sid=self._solution['execution_sid'],
) | python | {
"resource": ""
} |
q29510 | ExecutionStepContext.fetch | train | def fetch(self):
"""
Fetch a ExecutionStepInstance
:returns: Fetched ExecutionStepInstance
:rtype: twilio.rest.studio.v1.flow.execution.execution_step.ExecutionStepInstance
"""
params = values.of({})
payload = self._version.fetch(
'GET',
self._uri,
params=params,
)
return ExecutionStepInstance(
self._version,
payload,
flow_sid=self._solution['flow_sid'],
execution_sid=self._solution['execution_sid'],
sid=self._solution['sid'],
) | python | {
"resource": ""
} |
q29511 | StyleSheetPage.get_instance | train | def get_instance(self, payload):
"""
Build an instance of StyleSheetInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.autopilot.v1.assistant.style_sheet.StyleSheetInstance
:rtype: twilio.rest.autopilot.v1.assistant.style_sheet.StyleSheetInstance
"""
return StyleSheetInstance(self._version, payload, assistant_sid=self._solution['assistant_sid'], ) | python | {
"resource": ""
} |
q29512 | StyleSheetContext.fetch | train | def fetch(self):
"""
Fetch a StyleSheetInstance
:returns: Fetched StyleSheetInstance
:rtype: twilio.rest.autopilot.v1.assistant.style_sheet.StyleSheetInstance
"""
params = values.of({})
payload = self._version.fetch(
'GET',
self._uri,
params=params,
)
return StyleSheetInstance(self._version, payload, assistant_sid=self._solution['assistant_sid'], ) | python | {
"resource": ""
} |
q29513 | SyncMapItemList.create | train | def create(self, key, data, ttl=values.unset, item_ttl=values.unset,
collection_ttl=values.unset):
"""
Create a new SyncMapItemInstance
:param unicode key: The unique user-defined key of this Map Item.
:param dict data: Contains arbitrary user-defined, schema-less data that this Map Item stores, represented by a JSON object, up to 16KB.
:param unicode ttl: Alias for item_ttl
:param unicode item_ttl: Time-to-live of this item in seconds, defaults to no expiration.
:param unicode collection_ttl: Time-to-live of this item's parent Map in seconds, defaults to no expiration.
:returns: Newly created SyncMapItemInstance
:rtype: twilio.rest.sync.v1.service.sync_map.sync_map_item.SyncMapItemInstance
"""
data = values.of({
'Key': key,
'Data': serialize.object(data),
'Ttl': ttl,
'ItemTtl': item_ttl,
'CollectionTtl': collection_ttl,
})
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return SyncMapItemInstance(
self._version,
payload,
service_sid=self._solution['service_sid'],
map_sid=self._solution['map_sid'],
) | python | {
"resource": ""
} |
q29514 | NationalPage.get_instance | train | def get_instance(self, payload):
"""
Build an instance of NationalInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.available_phone_number.national.NationalInstance
:rtype: twilio.rest.api.v2010.account.available_phone_number.national.NationalInstance
"""
return NationalInstance(
self._version,
payload,
account_sid=self._solution['account_sid'],
country_code=self._solution['country_code'],
) | python | {
"resource": ""
} |
q29515 | TriggerList.create | train | def create(self, callback_url, trigger_value, usage_category,
callback_method=values.unset, friendly_name=values.unset,
recurring=values.unset, trigger_by=values.unset):
"""
Create a new TriggerInstance
:param unicode callback_url: The URL we call when the trigger fires
:param unicode trigger_value: The usage value at which the trigger should fire
:param TriggerInstance.UsageCategory usage_category: The usage category the trigger watches
:param unicode callback_method: The HTTP method to use to call callback_url
:param unicode friendly_name: A string to describe the resource
:param TriggerInstance.Recurring recurring: The frequency of a recurring UsageTrigger
:param TriggerInstance.TriggerField trigger_by: The field in the UsageRecord resource that fires the trigger
:returns: Newly created TriggerInstance
:rtype: twilio.rest.api.v2010.account.usage.trigger.TriggerInstance
"""
data = values.of({
'CallbackUrl': callback_url,
'TriggerValue': trigger_value,
'UsageCategory': usage_category,
'CallbackMethod': callback_method,
'FriendlyName': friendly_name,
'Recurring': recurring,
'TriggerBy': trigger_by,
})
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return TriggerInstance(self._version, payload, account_sid=self._solution['account_sid'], ) | python | {
"resource": ""
} |
q29516 | TriggerList.stream | train | def stream(self, recurring=values.unset, trigger_by=values.unset,
usage_category=values.unset, limit=None, page_size=None):
"""
Streams TriggerInstance 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 TriggerInstance.Recurring recurring: The frequency of recurring UsageTriggers to read
:param TriggerInstance.TriggerField trigger_by: The trigger field of the UsageTriggers to read
:param TriggerInstance.UsageCategory usage_category: The usage category of the UsageTriggers to read
: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.usage.trigger.TriggerInstance]
"""
limits = self._version.read_limits(limit, page_size)
page = self.page(
recurring=recurring,
trigger_by=trigger_by,
usage_category=usage_category,
page_size=limits['page_size'],
)
return self._version.stream(page, limits['limit'], limits['page_limit']) | python | {
"resource": ""
} |
q29517 | TriggerList.page | train | def page(self, recurring=values.unset, trigger_by=values.unset,
usage_category=values.unset, page_token=values.unset,
page_number=values.unset, page_size=values.unset):
"""
Retrieve a single page of TriggerInstance records from the API.
Request is executed immediately
:param TriggerInstance.Recurring recurring: The frequency of recurring UsageTriggers to read
:param TriggerInstance.TriggerField trigger_by: The trigger field of the UsageTriggers to read
:param TriggerInstance.UsageCategory usage_category: The usage category of the UsageTriggers 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 TriggerInstance
:rtype: twilio.rest.api.v2010.account.usage.trigger.TriggerPage
"""
params = values.of({
'Recurring': recurring,
'TriggerBy': trigger_by,
'UsageCategory': usage_category,
'PageToken': page_token,
'Page': page_number,
'PageSize': page_size,
})
response = self._version.page(
'GET',
self._uri,
params=params,
)
return TriggerPage(self._version, response, self._solution) | python | {
"resource": ""
} |
q29518 | TriggerList.get | train | def get(self, sid):
"""
Constructs a TriggerContext
:param sid: The unique string that identifies the resource
:returns: twilio.rest.api.v2010.account.usage.trigger.TriggerContext
:rtype: twilio.rest.api.v2010.account.usage.trigger.TriggerContext
"""
return TriggerContext(self._version, account_sid=self._solution['account_sid'], sid=sid, ) | python | {
"resource": ""
} |
q29519 | TriggerPage.get_instance | train | def get_instance(self, payload):
"""
Build an instance of TriggerInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.usage.trigger.TriggerInstance
:rtype: twilio.rest.api.v2010.account.usage.trigger.TriggerInstance
"""
return TriggerInstance(self._version, payload, account_sid=self._solution['account_sid'], ) | python | {
"resource": ""
} |
q29520 | WorkspaceCumulativeStatisticsPage.get_instance | train | def get_instance(self, payload):
"""
Build an instance of WorkspaceCumulativeStatisticsInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.taskrouter.v1.workspace.workspace_cumulative_statistics.WorkspaceCumulativeStatisticsInstance
:rtype: twilio.rest.taskrouter.v1.workspace.workspace_cumulative_statistics.WorkspaceCumulativeStatisticsInstance
"""
return WorkspaceCumulativeStatisticsInstance(
self._version,
payload,
workspace_sid=self._solution['workspace_sid'],
) | python | {
"resource": ""
} |
q29521 | AssignedAddOnExtensionList.get | train | def get(self, sid):
"""
Constructs a AssignedAddOnExtensionContext
:param sid: The unique string that identifies the resource
:returns: twilio.rest.api.v2010.account.incoming_phone_number.assigned_add_on.assigned_add_on_extension.AssignedAddOnExtensionContext
:rtype: twilio.rest.api.v2010.account.incoming_phone_number.assigned_add_on.assigned_add_on_extension.AssignedAddOnExtensionContext
"""
return AssignedAddOnExtensionContext(
self._version,
account_sid=self._solution['account_sid'],
resource_sid=self._solution['resource_sid'],
assigned_add_on_sid=self._solution['assigned_add_on_sid'],
sid=sid,
) | python | {
"resource": ""
} |
q29522 | AssignedAddOnExtensionPage.get_instance | train | def get_instance(self, payload):
"""
Build an instance of AssignedAddOnExtensionInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.incoming_phone_number.assigned_add_on.assigned_add_on_extension.AssignedAddOnExtensionInstance
:rtype: twilio.rest.api.v2010.account.incoming_phone_number.assigned_add_on.assigned_add_on_extension.AssignedAddOnExtensionInstance
"""
return AssignedAddOnExtensionInstance(
self._version,
payload,
account_sid=self._solution['account_sid'],
resource_sid=self._solution['resource_sid'],
assigned_add_on_sid=self._solution['assigned_add_on_sid'],
) | python | {
"resource": ""
} |
q29523 | HighriskSpecialPrefixPage.get_instance | train | def get_instance(self, payload):
"""
Build an instance of HighriskSpecialPrefixInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.voice.v1.dialing_permissions.country.highrisk_special_prefix.HighriskSpecialPrefixInstance
:rtype: twilio.rest.voice.v1.dialing_permissions.country.highrisk_special_prefix.HighriskSpecialPrefixInstance
"""
return HighriskSpecialPrefixInstance(self._version, payload, iso_code=self._solution['iso_code'], ) | python | {
"resource": ""
} |
q29524 | SipList.domains | train | def domains(self):
"""
Access the domains
:returns: twilio.rest.api.v2010.account.sip.domain.DomainList
:rtype: twilio.rest.api.v2010.account.sip.domain.DomainList
"""
if self._domains is None:
self._domains = DomainList(self._version, account_sid=self._solution['account_sid'], )
return self._domains | python | {
"resource": ""
} |
q29525 | SipList.credential_lists | train | def credential_lists(self):
"""
Access the credential_lists
:returns: twilio.rest.api.v2010.account.sip.credential_list.CredentialListList
:rtype: twilio.rest.api.v2010.account.sip.credential_list.CredentialListList
"""
if self._credential_lists is None:
self._credential_lists = CredentialListList(
self._version,
account_sid=self._solution['account_sid'],
)
return self._credential_lists | python | {
"resource": ""
} |
q29526 | SipPage.get_instance | train | def get_instance(self, payload):
"""
Build an instance of SipInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.sip.SipInstance
:rtype: twilio.rest.api.v2010.account.sip.SipInstance
"""
return SipInstance(self._version, payload, account_sid=self._solution['account_sid'], ) | python | {
"resource": ""
} |
q29527 | TaskQueuesStatisticsList.stream | train | def stream(self, end_date=values.unset, friendly_name=values.unset,
minutes=values.unset, start_date=values.unset,
task_channel=values.unset, split_by_wait_time=values.unset,
limit=None, page_size=None):
"""
Streams TaskQueuesStatisticsInstance 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 datetime end_date: Filter cumulative statistics by an end date.
:param unicode friendly_name: Filter the TaskQueue stats based on a TaskQueue's name
:param unicode minutes: Filter cumulative statistics by up to 'x' minutes in the past.
:param datetime start_date: Filter cumulative statistics by a start date.
:param unicode task_channel: Filter real-time and cumulative statistics by TaskChannel.
:param unicode split_by_wait_time: A comma separated values for viewing splits of tasks canceled and accepted above the given threshold in seconds.
: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.taskrouter.v1.workspace.task_queue.task_queues_statistics.TaskQueuesStatisticsInstance]
"""
limits = self._version.read_limits(limit, page_size)
page = self.page(
end_date=end_date,
friendly_name=friendly_name,
minutes=minutes,
start_date=start_date,
task_channel=task_channel,
split_by_wait_time=split_by_wait_time,
page_size=limits['page_size'],
)
return self._version.stream(page, limits['limit'], limits['page_limit']) | python | {
"resource": ""
} |
q29528 | TaskQueuesStatisticsList.page | train | def page(self, end_date=values.unset, friendly_name=values.unset,
minutes=values.unset, start_date=values.unset,
task_channel=values.unset, split_by_wait_time=values.unset,
page_token=values.unset, page_number=values.unset,
page_size=values.unset):
"""
Retrieve a single page of TaskQueuesStatisticsInstance records from the API.
Request is executed immediately
:param datetime end_date: Filter cumulative statistics by an end date.
:param unicode friendly_name: Filter the TaskQueue stats based on a TaskQueue's name
:param unicode minutes: Filter cumulative statistics by up to 'x' minutes in the past.
:param datetime start_date: Filter cumulative statistics by a start date.
:param unicode task_channel: Filter real-time and cumulative statistics by TaskChannel.
:param unicode split_by_wait_time: A comma separated values for viewing splits of tasks canceled and accepted above the given threshold in seconds.
: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 TaskQueuesStatisticsInstance
:rtype: twilio.rest.taskrouter.v1.workspace.task_queue.task_queues_statistics.TaskQueuesStatisticsPage
"""
params = values.of({
'EndDate': serialize.iso8601_datetime(end_date),
'FriendlyName': friendly_name,
'Minutes': minutes,
'StartDate': serialize.iso8601_datetime(start_date),
'TaskChannel': task_channel,
'SplitByWaitTime': split_by_wait_time,
'PageToken': page_token,
'Page': page_number,
'PageSize': page_size,
})
response = self._version.page(
'GET',
self._uri,
params=params,
)
return TaskQueuesStatisticsPage(self._version, response, self._solution) | python | {
"resource": ""
} |
q29529 | TaskQueuesStatisticsPage.get_instance | train | def get_instance(self, payload):
"""
Build an instance of TaskQueuesStatisticsInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.taskrouter.v1.workspace.task_queue.task_queues_statistics.TaskQueuesStatisticsInstance
:rtype: twilio.rest.taskrouter.v1.workspace.task_queue.task_queues_statistics.TaskQueuesStatisticsInstance
"""
return TaskQueuesStatisticsInstance(
self._version,
payload,
workspace_sid=self._solution['workspace_sid'],
) | python | {
"resource": ""
} |
q29530 | EngagementContextList.get | train | def get(self):
"""
Constructs a EngagementContextContext
:returns: twilio.rest.studio.v1.flow.engagement.engagement_context.EngagementContextContext
:rtype: twilio.rest.studio.v1.flow.engagement.engagement_context.EngagementContextContext
"""
return EngagementContextContext(
self._version,
flow_sid=self._solution['flow_sid'],
engagement_sid=self._solution['engagement_sid'],
) | python | {
"resource": ""
} |
q29531 | EngagementContextPage.get_instance | train | def get_instance(self, payload):
"""
Build an instance of EngagementContextInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.studio.v1.flow.engagement.engagement_context.EngagementContextInstance
:rtype: twilio.rest.studio.v1.flow.engagement.engagement_context.EngagementContextInstance
"""
return EngagementContextInstance(
self._version,
payload,
flow_sid=self._solution['flow_sid'],
engagement_sid=self._solution['engagement_sid'],
) | python | {
"resource": ""
} |
q29532 | EngagementContextContext.fetch | train | def fetch(self):
"""
Fetch a EngagementContextInstance
:returns: Fetched EngagementContextInstance
:rtype: twilio.rest.studio.v1.flow.engagement.engagement_context.EngagementContextInstance
"""
params = values.of({})
payload = self._version.fetch(
'GET',
self._uri,
params=params,
)
return EngagementContextInstance(
self._version,
payload,
flow_sid=self._solution['flow_sid'],
engagement_sid=self._solution['engagement_sid'],
) | python | {
"resource": ""
} |
q29533 | ExecutionStepContextList.get | train | def get(self):
"""
Constructs a ExecutionStepContextContext
:returns: twilio.rest.studio.v1.flow.execution.execution_step.execution_step_context.ExecutionStepContextContext
:rtype: twilio.rest.studio.v1.flow.execution.execution_step.execution_step_context.ExecutionStepContextContext
"""
return ExecutionStepContextContext(
self._version,
flow_sid=self._solution['flow_sid'],
execution_sid=self._solution['execution_sid'],
step_sid=self._solution['step_sid'],
) | python | {
"resource": ""
} |
q29534 | ExecutionStepContextPage.get_instance | train | def get_instance(self, payload):
"""
Build an instance of ExecutionStepContextInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.studio.v1.flow.execution.execution_step.execution_step_context.ExecutionStepContextInstance
:rtype: twilio.rest.studio.v1.flow.execution.execution_step.execution_step_context.ExecutionStepContextInstance
"""
return ExecutionStepContextInstance(
self._version,
payload,
flow_sid=self._solution['flow_sid'],
execution_sid=self._solution['execution_sid'],
step_sid=self._solution['step_sid'],
) | python | {
"resource": ""
} |
q29535 | ExecutionStepContextContext.fetch | train | def fetch(self):
"""
Fetch a ExecutionStepContextInstance
:returns: Fetched ExecutionStepContextInstance
:rtype: twilio.rest.studio.v1.flow.execution.execution_step.execution_step_context.ExecutionStepContextInstance
"""
params = values.of({})
payload = self._version.fetch(
'GET',
self._uri,
params=params,
)
return ExecutionStepContextInstance(
self._version,
payload,
flow_sid=self._solution['flow_sid'],
execution_sid=self._solution['execution_sid'],
step_sid=self._solution['step_sid'],
) | python | {
"resource": ""
} |
q29536 | PayloadList.get | train | def get(self, sid):
"""
Constructs a PayloadContext
:param sid: The unique string that identifies the resource to fetch
:returns: twilio.rest.api.v2010.account.recording.add_on_result.payload.PayloadContext
:rtype: twilio.rest.api.v2010.account.recording.add_on_result.payload.PayloadContext
"""
return PayloadContext(
self._version,
account_sid=self._solution['account_sid'],
reference_sid=self._solution['reference_sid'],
add_on_result_sid=self._solution['add_on_result_sid'],
sid=sid,
) | python | {
"resource": ""
} |
q29537 | PayloadPage.get_instance | train | def get_instance(self, payload):
"""
Build an instance of PayloadInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.recording.add_on_result.payload.PayloadInstance
:rtype: twilio.rest.api.v2010.account.recording.add_on_result.payload.PayloadInstance
"""
return PayloadInstance(
self._version,
payload,
account_sid=self._solution['account_sid'],
reference_sid=self._solution['reference_sid'],
add_on_result_sid=self._solution['add_on_result_sid'],
) | python | {
"resource": ""
} |
q29538 | FlowContext.engagements | train | def engagements(self):
"""
Access the engagements
:returns: twilio.rest.studio.v1.flow.engagement.EngagementList
:rtype: twilio.rest.studio.v1.flow.engagement.EngagementList
"""
if self._engagements is None:
self._engagements = EngagementList(self._version, flow_sid=self._solution['sid'], )
return self._engagements | python | {
"resource": ""
} |
q29539 | FlowContext.executions | train | def executions(self):
"""
Access the executions
:returns: twilio.rest.studio.v1.flow.execution.ExecutionList
:rtype: twilio.rest.studio.v1.flow.execution.ExecutionList
"""
if self._executions is None:
self._executions = ExecutionList(self._version, flow_sid=self._solution['sid'], )
return self._executions | python | {
"resource": ""
} |
q29540 | QueryList.create | train | def create(self, language, query, tasks=values.unset, model_build=values.unset,
field=values.unset):
"""
Create a new QueryInstance
:param unicode language: An ISO language-country string of the sample.
:param unicode query: A user-provided string that uniquely identifies this resource as an alternative to the sid. It can be up to 2048 characters long.
:param unicode tasks: Constraints the query to a set of tasks. Useful when you need to constrain the paths the user can take. Tasks should be comma separated task-unique-name-1, task-unique-name-2
:param unicode model_build: The Model Build Sid or unique name of the Model Build to be queried.
:param unicode field: Constraints the query to a given Field with an task. Useful when you know the Field you are expecting. It accepts one field in the format task-unique-name-1:field-unique-name
:returns: Newly created QueryInstance
:rtype: twilio.rest.preview.understand.assistant.query.QueryInstance
"""
data = values.of({
'Language': language,
'Query': query,
'Tasks': tasks,
'ModelBuild': model_build,
'Field': field,
})
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return QueryInstance(self._version, payload, assistant_sid=self._solution['assistant_sid'], ) | python | {
"resource": ""
} |
q29541 | TaskQueueRealTimeStatisticsList.get | train | def get(self):
"""
Constructs a TaskQueueRealTimeStatisticsContext
:returns: twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_real_time_statistics.TaskQueueRealTimeStatisticsContext
:rtype: twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_real_time_statistics.TaskQueueRealTimeStatisticsContext
"""
return TaskQueueRealTimeStatisticsContext(
self._version,
workspace_sid=self._solution['workspace_sid'],
task_queue_sid=self._solution['task_queue_sid'],
) | python | {
"resource": ""
} |
q29542 | TaskQueueRealTimeStatisticsPage.get_instance | train | def get_instance(self, payload):
"""
Build an instance of TaskQueueRealTimeStatisticsInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_real_time_statistics.TaskQueueRealTimeStatisticsInstance
:rtype: twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_real_time_statistics.TaskQueueRealTimeStatisticsInstance
"""
return TaskQueueRealTimeStatisticsInstance(
self._version,
payload,
workspace_sid=self._solution['workspace_sid'],
task_queue_sid=self._solution['task_queue_sid'],
) | python | {
"resource": ""
} |
q29543 | CredentialListMappingList.get | train | def get(self, sid):
"""
Constructs a CredentialListMappingContext
:param sid: A string that identifies the resource to fetch
:returns: twilio.rest.api.v2010.account.sip.domain.credential_list_mapping.CredentialListMappingContext
:rtype: twilio.rest.api.v2010.account.sip.domain.credential_list_mapping.CredentialListMappingContext
"""
return CredentialListMappingContext(
self._version,
account_sid=self._solution['account_sid'],
domain_sid=self._solution['domain_sid'],
sid=sid,
) | python | {
"resource": ""
} |
q29544 | CredentialListMappingPage.get_instance | train | def get_instance(self, payload):
"""
Build an instance of CredentialListMappingInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.sip.domain.credential_list_mapping.CredentialListMappingInstance
:rtype: twilio.rest.api.v2010.account.sip.domain.credential_list_mapping.CredentialListMappingInstance
"""
return CredentialListMappingInstance(
self._version,
payload,
account_sid=self._solution['account_sid'],
domain_sid=self._solution['domain_sid'],
) | python | {
"resource": ""
} |
q29545 | NotificationList.stream | train | def stream(self, log=values.unset, message_date_before=values.unset,
message_date=values.unset, message_date_after=values.unset,
limit=None, page_size=None):
"""
Streams NotificationInstance 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 log: Filter by log level
:param date message_date_before: Filter by date
:param date message_date: Filter by date
:param date message_date_after: Filter by 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.notification.NotificationInstance]
"""
limits = self._version.read_limits(limit, page_size)
page = self.page(
log=log,
message_date_before=message_date_before,
message_date=message_date,
message_date_after=message_date_after,
page_size=limits['page_size'],
)
return self._version.stream(page, limits['limit'], limits['page_limit']) | python | {
"resource": ""
} |
q29546 | NotificationList.page | train | def page(self, log=values.unset, message_date_before=values.unset,
message_date=values.unset, message_date_after=values.unset,
page_token=values.unset, page_number=values.unset,
page_size=values.unset):
"""
Retrieve a single page of NotificationInstance records from the API.
Request is executed immediately
:param unicode log: Filter by log level
:param date message_date_before: Filter by date
:param date message_date: Filter by date
:param date message_date_after: Filter by 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 NotificationInstance
:rtype: twilio.rest.api.v2010.account.call.notification.NotificationPage
"""
params = values.of({
'Log': log,
'MessageDate<': serialize.iso8601_date(message_date_before),
'MessageDate': serialize.iso8601_date(message_date),
'MessageDate>': serialize.iso8601_date(message_date_after),
'PageToken': page_token,
'Page': page_number,
'PageSize': page_size,
})
response = self._version.page(
'GET',
self._uri,
params=params,
)
return NotificationPage(self._version, response, self._solution) | python | {
"resource": ""
} |
q29547 | NotificationList.get | train | def get(self, sid):
"""
Constructs a NotificationContext
:param sid: The unique string that identifies the resource
:returns: twilio.rest.api.v2010.account.call.notification.NotificationContext
:rtype: twilio.rest.api.v2010.account.call.notification.NotificationContext
"""
return NotificationContext(
self._version,
account_sid=self._solution['account_sid'],
call_sid=self._solution['call_sid'],
sid=sid,
) | python | {
"resource": ""
} |
q29548 | CountryList.stream | train | def stream(self, iso_code=values.unset, continent=values.unset,
country_code=values.unset, low_risk_numbers_enabled=values.unset,
high_risk_special_numbers_enabled=values.unset,
high_risk_tollfraud_numbers_enabled=values.unset, limit=None,
page_size=None):
"""
Streams CountryInstance 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 iso_code: Filter to retrieve the country permissions by specifying the ISO country code
:param unicode continent: Filter to retrieve the country permissions by specifying the continent
:param unicode country_code: Country code filter
:param bool low_risk_numbers_enabled: Filter to retrieve the country permissions with dialing to low-risk numbers enabled
:param bool high_risk_special_numbers_enabled: Filter to retrieve the country permissions with dialing to high-risk special service numbers enabled
:param bool high_risk_tollfraud_numbers_enabled: Filter to retrieve the country permissions with dialing to high-risk toll fraud numbers enabled
: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.voice.v1.dialing_permissions.country.CountryInstance]
"""
limits = self._version.read_limits(limit, page_size)
page = self.page(
iso_code=iso_code,
continent=continent,
country_code=country_code,
low_risk_numbers_enabled=low_risk_numbers_enabled,
high_risk_special_numbers_enabled=high_risk_special_numbers_enabled,
high_risk_tollfraud_numbers_enabled=high_risk_tollfraud_numbers_enabled,
page_size=limits['page_size'],
)
return self._version.stream(page, limits['limit'], limits['page_limit']) | python | {
"resource": ""
} |
q29549 | CountryList.page | train | def page(self, iso_code=values.unset, continent=values.unset,
country_code=values.unset, low_risk_numbers_enabled=values.unset,
high_risk_special_numbers_enabled=values.unset,
high_risk_tollfraud_numbers_enabled=values.unset,
page_token=values.unset, page_number=values.unset,
page_size=values.unset):
"""
Retrieve a single page of CountryInstance records from the API.
Request is executed immediately
:param unicode iso_code: Filter to retrieve the country permissions by specifying the ISO country code
:param unicode continent: Filter to retrieve the country permissions by specifying the continent
:param unicode country_code: Country code filter
:param bool low_risk_numbers_enabled: Filter to retrieve the country permissions with dialing to low-risk numbers enabled
:param bool high_risk_special_numbers_enabled: Filter to retrieve the country permissions with dialing to high-risk special service numbers enabled
:param bool high_risk_tollfraud_numbers_enabled: Filter to retrieve the country permissions with dialing to high-risk toll fraud numbers enabled
: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 CountryInstance
:rtype: twilio.rest.voice.v1.dialing_permissions.country.CountryPage
"""
params = values.of({
'IsoCode': iso_code,
'Continent': continent,
'CountryCode': country_code,
'LowRiskNumbersEnabled': low_risk_numbers_enabled,
'HighRiskSpecialNumbersEnabled': high_risk_special_numbers_enabled,
'HighRiskTollfraudNumbersEnabled': high_risk_tollfraud_numbers_enabled,
'PageToken': page_token,
'Page': page_number,
'PageSize': page_size,
})
response = self._version.page(
'GET',
self._uri,
params=params,
)
return CountryPage(self._version, response, self._solution) | python | {
"resource": ""
} |
q29550 | CountryContext.fetch | train | def fetch(self):
"""
Fetch a CountryInstance
:returns: Fetched CountryInstance
:rtype: twilio.rest.voice.v1.dialing_permissions.country.CountryInstance
"""
params = values.of({})
payload = self._version.fetch(
'GET',
self._uri,
params=params,
)
return CountryInstance(self._version, payload, iso_code=self._solution['iso_code'], ) | python | {
"resource": ""
} |
q29551 | CountryContext.highrisk_special_prefixes | train | def highrisk_special_prefixes(self):
"""
Access the highrisk_special_prefixes
:returns: twilio.rest.voice.v1.dialing_permissions.country.highrisk_special_prefix.HighriskSpecialPrefixList
:rtype: twilio.rest.voice.v1.dialing_permissions.country.highrisk_special_prefix.HighriskSpecialPrefixList
"""
if self._highrisk_special_prefixes is None:
self._highrisk_special_prefixes = HighriskSpecialPrefixList(
self._version,
iso_code=self._solution['iso_code'],
)
return self._highrisk_special_prefixes | python | {
"resource": ""
} |
q29552 | CompositionSettingsContext.fetch | train | def fetch(self):
"""
Fetch a CompositionSettingsInstance
:returns: Fetched CompositionSettingsInstance
:rtype: twilio.rest.video.v1.composition_settings.CompositionSettingsInstance
"""
params = values.of({})
payload = self._version.fetch(
'GET',
self._uri,
params=params,
)
return CompositionSettingsInstance(self._version, payload, ) | python | {
"resource": ""
} |
q29553 | compare | train | def compare(string1, string2):
"""Compare two strings while protecting against timing attacks
:param str string1: the first string
:param str string2: the second string
:returns: True if the strings are equal, False if not
:rtype: :obj:`bool`
"""
if len(string1) != len(string2):
return False
result = True
for c1, c2 in izip(string1, string2):
result &= c1 == c2
return result | python | {
"resource": ""
} |
q29554 | remove_port | train | def remove_port(uri):
"""Remove the port number from a URI
:param uri: full URI that Twilio requested on your server
:returns: full URI without a port number
:rtype: str
"""
new_netloc = uri.netloc.split(':')[0]
new_uri = uri._replace(netloc=new_netloc)
return new_uri.geturl() | python | {
"resource": ""
} |
q29555 | RequestValidator.compute_signature | train | def compute_signature(self, uri, params, utf=PY3):
"""Compute the signature for a given request
:param uri: full URI that Twilio requested on your server
:param params: post vars that Twilio sent with the request
:param utf: whether return should be bytestring or unicode (python3)
:returns: The computed signature
"""
s = uri
if len(params) > 0:
for k, v in sorted(params.items()):
s += k + v
# compute signature and compare signatures
mac = hmac.new(self.token, s.encode("utf-8"), sha1)
computed = base64.b64encode(mac.digest())
if utf:
computed = computed.decode('utf-8')
return computed.strip() | python | {
"resource": ""
} |
q29556 | RequestValidator.validate | train | def validate(self, uri, params, signature):
"""Validate a request from Twilio
:param uri: full URI that Twilio requested on your server
:param params: dictionary of POST variables or string of POST body for JSON requests
:param signature: expected signature in HTTP X-Twilio-Signature header
:returns: True if the request passes validation, False if not
"""
if params is None:
params = {}
parsed_uri = urlparse(uri)
if parsed_uri.scheme == "https" and parsed_uri.port:
uri = remove_port(parsed_uri)
valid_signature = False # Default fail
valid_body_hash = True # May not receive body hash, so default succeed
query = parse_qs(parsed_uri.query)
if "bodySHA256" in query and isinstance(params, string_types):
valid_body_hash = compare(self.compute_hash(params), query["bodySHA256"][0])
valid_signature = compare(self.compute_signature(uri, {}), signature)
else:
valid_signature = compare(self.compute_signature(uri, params), signature)
return valid_signature and valid_body_hash | python | {
"resource": ""
} |
q29557 | DefaultsPage.get_instance | train | def get_instance(self, payload):
"""
Build an instance of DefaultsInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.autopilot.v1.assistant.defaults.DefaultsInstance
:rtype: twilio.rest.autopilot.v1.assistant.defaults.DefaultsInstance
"""
return DefaultsInstance(self._version, payload, assistant_sid=self._solution['assistant_sid'], ) | python | {
"resource": ""
} |
q29558 | Page.process_response | train | def process_response(self, response):
"""
Load a JSON response.
:param Response response: The HTTP response.
:return dict: The JSON-loaded content.
"""
if response.status_code != 200:
raise TwilioException('Unable to fetch page', response)
return json.loads(response.text) | python | {
"resource": ""
} |
q29559 | Page.load_page | train | def load_page(self, payload):
"""
Parses the collection of records out of a list payload.
:param dict payload: The JSON-loaded content.
:return list: The list of records.
"""
if 'meta' in payload and 'key' in payload['meta']:
return payload[payload['meta']['key']]
else:
keys = set(payload.keys())
key = keys - self.META_KEYS
if len(key) == 1:
return payload[key.pop()]
raise TwilioException('Page Records can not be deserialized') | python | {
"resource": ""
} |
q29560 | UserBindingList.get | train | def get(self, sid):
"""
Constructs a UserBindingContext
:param sid: The unique string that identifies the resource
:returns: twilio.rest.chat.v2.service.user.user_binding.UserBindingContext
:rtype: twilio.rest.chat.v2.service.user.user_binding.UserBindingContext
"""
return UserBindingContext(
self._version,
service_sid=self._solution['service_sid'],
user_sid=self._solution['user_sid'],
sid=sid,
) | python | {
"resource": ""
} |
q29561 | UserBindingPage.get_instance | train | def get_instance(self, payload):
"""
Build an instance of UserBindingInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.chat.v2.service.user.user_binding.UserBindingInstance
:rtype: twilio.rest.chat.v2.service.user.user_binding.UserBindingInstance
"""
return UserBindingInstance(
self._version,
payload,
service_sid=self._solution['service_sid'],
user_sid=self._solution['user_sid'],
) | python | {
"resource": ""
} |
q29562 | UserBindingContext.fetch | train | def fetch(self):
"""
Fetch a UserBindingInstance
:returns: Fetched UserBindingInstance
:rtype: twilio.rest.chat.v2.service.user.user_binding.UserBindingInstance
"""
params = values.of({})
payload = self._version.fetch(
'GET',
self._uri,
params=params,
)
return UserBindingInstance(
self._version,
payload,
service_sid=self._solution['service_sid'],
user_sid=self._solution['user_sid'],
sid=self._solution['sid'],
) | python | {
"resource": ""
} |
q29563 | ClientCapabilityToken.allow_client_outgoing | train | def allow_client_outgoing(self, application_sid, **kwargs):
"""
Allow the user of this token to make outgoing connections. Keyword arguments are passed
to the application.
:param str application_sid: Application to contact
"""
scope = ScopeURI('client', 'outgoing', {'appSid': application_sid})
if kwargs:
scope.add_param('appParams', urlencode(kwargs, doseq=True))
self.capabilities['outgoing'] = scope | python | {
"resource": ""
} |
q29564 | ClientCapabilityToken.allow_client_incoming | train | def allow_client_incoming(self, client_name):
"""
Allow the user of this token to accept incoming connections.
:param str client_name: Client name to accept calls from
"""
self.client_name = client_name
self.capabilities['incoming'] = ScopeURI('client', 'incoming', {'clientName': client_name}) | python | {
"resource": ""
} |
q29565 | ClientCapabilityToken.allow_event_stream | train | def allow_event_stream(self, **kwargs):
"""
Allow the user of this token to access their event stream.
"""
scope = ScopeURI('stream', 'subscribe', {'path': '/2010-04-01/Events'})
if kwargs:
scope.add_param('params', urlencode(kwargs, doseq=True))
self.capabilities["events"] = scope | python | {
"resource": ""
} |
q29566 | AuthTypesList.registrations | train | def registrations(self):
"""
Access the registrations
:returns: twilio.rest.api.v2010.account.sip.domain.auth_types.auth_registrations_mapping.AuthTypeRegistrationsList
:rtype: twilio.rest.api.v2010.account.sip.domain.auth_types.auth_registrations_mapping.AuthTypeRegistrationsList
"""
if self._registrations is None:
self._registrations = AuthTypeRegistrationsList(
self._version,
account_sid=self._solution['account_sid'],
domain_sid=self._solution['domain_sid'],
)
return self._registrations | python | {
"resource": ""
} |
q29567 | AuthTypesPage.get_instance | train | def get_instance(self, payload):
"""
Build an instance of AuthTypesInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.sip.domain.auth_types.AuthTypesInstance
:rtype: twilio.rest.api.v2010.account.sip.domain.auth_types.AuthTypesInstance
"""
return AuthTypesInstance(
self._version,
payload,
account_sid=self._solution['account_sid'],
domain_sid=self._solution['domain_sid'],
) | python | {
"resource": ""
} |
q29568 | AuthRegistrationsCredentialListMappingList.get | train | def get(self, sid):
"""
Constructs a AuthRegistrationsCredentialListMappingContext
:param sid: The unique string that identifies the resource
:returns: twilio.rest.api.v2010.account.sip.domain.auth_types.auth_registrations_mapping.auth_registrations_credential_list_mapping.AuthRegistrationsCredentialListMappingContext
:rtype: twilio.rest.api.v2010.account.sip.domain.auth_types.auth_registrations_mapping.auth_registrations_credential_list_mapping.AuthRegistrationsCredentialListMappingContext
"""
return AuthRegistrationsCredentialListMappingContext(
self._version,
account_sid=self._solution['account_sid'],
domain_sid=self._solution['domain_sid'],
sid=sid,
) | python | {
"resource": ""
} |
q29569 | AuthRegistrationsCredentialListMappingPage.get_instance | train | def get_instance(self, payload):
"""
Build an instance of AuthRegistrationsCredentialListMappingInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.sip.domain.auth_types.auth_registrations_mapping.auth_registrations_credential_list_mapping.AuthRegistrationsCredentialListMappingInstance
:rtype: twilio.rest.api.v2010.account.sip.domain.auth_types.auth_registrations_mapping.auth_registrations_credential_list_mapping.AuthRegistrationsCredentialListMappingInstance
"""
return AuthRegistrationsCredentialListMappingInstance(
self._version,
payload,
account_sid=self._solution['account_sid'],
domain_sid=self._solution['domain_sid'],
) | python | {
"resource": ""
} |
q29570 | AuthRegistrationsCredentialListMappingContext.fetch | train | def fetch(self):
"""
Fetch a AuthRegistrationsCredentialListMappingInstance
:returns: Fetched AuthRegistrationsCredentialListMappingInstance
:rtype: twilio.rest.api.v2010.account.sip.domain.auth_types.auth_registrations_mapping.auth_registrations_credential_list_mapping.AuthRegistrationsCredentialListMappingInstance
"""
params = values.of({})
payload = self._version.fetch(
'GET',
self._uri,
params=params,
)
return AuthRegistrationsCredentialListMappingInstance(
self._version,
payload,
account_sid=self._solution['account_sid'],
domain_sid=self._solution['domain_sid'],
sid=self._solution['sid'],
) | python | {
"resource": ""
} |
q29571 | CommandList.page | train | def page(self, sim=values.unset, status=values.unset, direction=values.unset,
transport=values.unset, page_token=values.unset,
page_number=values.unset, page_size=values.unset):
"""
Retrieve a single page of CommandInstance records from the API.
Request is executed immediately
:param unicode sim: Only return Commands to or from this SIM.
:param CommandInstance.Status status: Only return Commands with this status value.
:param CommandInstance.Direction direction: Only return Commands with this direction value.
:param CommandInstance.Transport transport: Only return Commands with this transport value.
: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 CommandInstance
:rtype: twilio.rest.wireless.v1.command.CommandPage
"""
params = values.of({
'Sim': sim,
'Status': status,
'Direction': direction,
'Transport': transport,
'PageToken': page_token,
'Page': page_number,
'PageSize': page_size,
})
response = self._version.page(
'GET',
self._uri,
params=params,
)
return CommandPage(self._version, response, self._solution) | python | {
"resource": ""
} |
q29572 | CommandList.create | train | def create(self, command, sim=values.unset, callback_method=values.unset,
callback_url=values.unset, command_mode=values.unset,
include_sid=values.unset, delivery_receipt_requested=values.unset):
"""
Create a new CommandInstance
:param unicode command: The message body of the Command or a Base64 encoded byte string in binary mode.
:param unicode sim: The Sid or UniqueName of the SIM to send the Command to.
:param unicode callback_method: The HTTP method Twilio will use when making a request to the callback URL.
:param unicode callback_url: Twilio will make a request to this URL when the Command has finished sending.
:param CommandInstance.CommandMode command_mode: A string representing which mode to send the SMS message using.
:param unicode include_sid: When sending a Command to a SIM in text mode, Twilio can automatically include the Sid of the Command in the message body, which could be used to ensure that the device does not process the same Command more than once.
:param bool delivery_receipt_requested: A boolean representing whether to request delivery receipt from the recipient.
:returns: Newly created CommandInstance
:rtype: twilio.rest.wireless.v1.command.CommandInstance
"""
data = values.of({
'Command': command,
'Sim': sim,
'CallbackMethod': callback_method,
'CallbackUrl': callback_url,
'CommandMode': command_mode,
'IncludeSid': include_sid,
'DeliveryReceiptRequested': delivery_receipt_requested,
})
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return CommandInstance(self._version, payload, ) | python | {
"resource": ""
} |
q29573 | TaskQueueStatisticsList.get | train | def get(self):
"""
Constructs a TaskQueueStatisticsContext
:returns: twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_statistics.TaskQueueStatisticsContext
:rtype: twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_statistics.TaskQueueStatisticsContext
"""
return TaskQueueStatisticsContext(
self._version,
workspace_sid=self._solution['workspace_sid'],
task_queue_sid=self._solution['task_queue_sid'],
) | python | {
"resource": ""
} |
q29574 | TaskQueueStatisticsPage.get_instance | train | def get_instance(self, payload):
"""
Build an instance of TaskQueueStatisticsInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_statistics.TaskQueueStatisticsInstance
:rtype: twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_statistics.TaskQueueStatisticsInstance
"""
return TaskQueueStatisticsInstance(
self._version,
payload,
workspace_sid=self._solution['workspace_sid'],
task_queue_sid=self._solution['task_queue_sid'],
) | python | {
"resource": ""
} |
q29575 | SessionList.get | train | def get(self, sid):
"""
Constructs a SessionContext
:param sid: The unique string that identifies the resource
:returns: twilio.rest.proxy.v1.service.session.SessionContext
:rtype: twilio.rest.proxy.v1.service.session.SessionContext
"""
return SessionContext(self._version, service_sid=self._solution['service_sid'], sid=sid, ) | python | {
"resource": ""
} |
q29576 | SessionPage.get_instance | train | def get_instance(self, payload):
"""
Build an instance of SessionInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.proxy.v1.service.session.SessionInstance
:rtype: twilio.rest.proxy.v1.service.session.SessionInstance
"""
return SessionInstance(self._version, payload, service_sid=self._solution['service_sid'], ) | python | {
"resource": ""
} |
q29577 | SessionContext.interactions | train | def interactions(self):
"""
Access the interactions
:returns: twilio.rest.proxy.v1.service.session.interaction.InteractionList
:rtype: twilio.rest.proxy.v1.service.session.interaction.InteractionList
"""
if self._interactions is None:
self._interactions = InteractionList(
self._version,
service_sid=self._solution['service_sid'],
session_sid=self._solution['sid'],
)
return self._interactions | python | {
"resource": ""
} |
q29578 | WorkflowCumulativeStatisticsList.get | train | def get(self):
"""
Constructs a WorkflowCumulativeStatisticsContext
:returns: twilio.rest.taskrouter.v1.workspace.workflow.workflow_cumulative_statistics.WorkflowCumulativeStatisticsContext
:rtype: twilio.rest.taskrouter.v1.workspace.workflow.workflow_cumulative_statistics.WorkflowCumulativeStatisticsContext
"""
return WorkflowCumulativeStatisticsContext(
self._version,
workspace_sid=self._solution['workspace_sid'],
workflow_sid=self._solution['workflow_sid'],
) | python | {
"resource": ""
} |
q29579 | WorkflowCumulativeStatisticsPage.get_instance | train | def get_instance(self, payload):
"""
Build an instance of WorkflowCumulativeStatisticsInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.taskrouter.v1.workspace.workflow.workflow_cumulative_statistics.WorkflowCumulativeStatisticsInstance
:rtype: twilio.rest.taskrouter.v1.workspace.workflow.workflow_cumulative_statistics.WorkflowCumulativeStatisticsInstance
"""
return WorkflowCumulativeStatisticsInstance(
self._version,
payload,
workspace_sid=self._solution['workspace_sid'],
workflow_sid=self._solution['workflow_sid'],
) | python | {
"resource": ""
} |
q29580 | ServiceContext.documents | train | def documents(self):
"""
Access the documents
:returns: twilio.rest.sync.v1.service.document.DocumentList
:rtype: twilio.rest.sync.v1.service.document.DocumentList
"""
if self._documents is None:
self._documents = DocumentList(self._version, service_sid=self._solution['sid'], )
return self._documents | python | {
"resource": ""
} |
q29581 | ServiceContext.sync_lists | train | def sync_lists(self):
"""
Access the sync_lists
:returns: twilio.rest.sync.v1.service.sync_list.SyncListList
:rtype: twilio.rest.sync.v1.service.sync_list.SyncListList
"""
if self._sync_lists is None:
self._sync_lists = SyncListList(self._version, service_sid=self._solution['sid'], )
return self._sync_lists | python | {
"resource": ""
} |
q29582 | ServiceContext.sync_maps | train | def sync_maps(self):
"""
Access the sync_maps
:returns: twilio.rest.sync.v1.service.sync_map.SyncMapList
:rtype: twilio.rest.sync.v1.service.sync_map.SyncMapList
"""
if self._sync_maps is None:
self._sync_maps = SyncMapList(self._version, service_sid=self._solution['sid'], )
return self._sync_maps | python | {
"resource": ""
} |
q29583 | ServiceContext.sync_streams | train | def sync_streams(self):
"""
Access the sync_streams
:returns: twilio.rest.sync.v1.service.sync_stream.SyncStreamList
:rtype: twilio.rest.sync.v1.service.sync_stream.SyncStreamList
"""
if self._sync_streams is None:
self._sync_streams = SyncStreamList(self._version, service_sid=self._solution['sid'], )
return self._sync_streams | python | {
"resource": ""
} |
q29584 | FaxMediaList.get | train | def get(self, sid):
"""
Constructs a FaxMediaContext
:param sid: The unique string that identifies the resource to fetch
:returns: twilio.rest.fax.v1.fax.fax_media.FaxMediaContext
:rtype: twilio.rest.fax.v1.fax.fax_media.FaxMediaContext
"""
return FaxMediaContext(self._version, fax_sid=self._solution['fax_sid'], sid=sid, ) | python | {
"resource": ""
} |
q29585 | FaxMediaPage.get_instance | train | def get_instance(self, payload):
"""
Build an instance of FaxMediaInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.fax.v1.fax.fax_media.FaxMediaInstance
:rtype: twilio.rest.fax.v1.fax.fax_media.FaxMediaInstance
"""
return FaxMediaInstance(self._version, payload, fax_sid=self._solution['fax_sid'], ) | python | {
"resource": ""
} |
q29586 | FaxMediaContext.fetch | train | def fetch(self):
"""
Fetch a FaxMediaInstance
:returns: Fetched FaxMediaInstance
:rtype: twilio.rest.fax.v1.fax.fax_media.FaxMediaInstance
"""
params = values.of({})
payload = self._version.fetch(
'GET',
self._uri,
params=params,
)
return FaxMediaInstance(
self._version,
payload,
fax_sid=self._solution['fax_sid'],
sid=self._solution['sid'],
) | python | {
"resource": ""
} |
q29587 | MemberContext.fetch | train | def fetch(self):
"""
Fetch a MemberInstance
:returns: Fetched MemberInstance
:rtype: twilio.rest.api.v2010.account.queue.member.MemberInstance
"""
params = values.of({})
payload = self._version.fetch(
'GET',
self._uri,
params=params,
)
return MemberInstance(
self._version,
payload,
account_sid=self._solution['account_sid'],
queue_sid=self._solution['queue_sid'],
call_sid=self._solution['call_sid'],
) | python | {
"resource": ""
} |
q29588 | CompositionList.page | train | def page(self, status=values.unset, date_created_after=values.unset,
date_created_before=values.unset, room_sid=values.unset,
page_token=values.unset, page_number=values.unset,
page_size=values.unset):
"""
Retrieve a single page of CompositionInstance records from the API.
Request is executed immediately
:param CompositionInstance.Status status: Only show Compositions with the given status.
:param datetime date_created_after: Only show Compositions created on or after this ISO8601 date-time with timezone.
:param datetime date_created_before: Only show Compositions created before this ISO8601 date-time with timezone.
:param unicode room_sid: Only show Compositions with the given Room SID.
: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 CompositionInstance
:rtype: twilio.rest.video.v1.composition.CompositionPage
"""
params = values.of({
'Status': status,
'DateCreatedAfter': serialize.iso8601_datetime(date_created_after),
'DateCreatedBefore': serialize.iso8601_datetime(date_created_before),
'RoomSid': room_sid,
'PageToken': page_token,
'Page': page_number,
'PageSize': page_size,
})
response = self._version.page(
'GET',
self._uri,
params=params,
)
return CompositionPage(self._version, response, self._solution) | python | {
"resource": ""
} |
q29589 | SyncListList.create | train | def create(self, unique_name=values.unset, ttl=values.unset,
collection_ttl=values.unset):
"""
Create a new SyncListInstance
:param unicode unique_name: Human-readable name for this list
:param unicode ttl: Alias for collection_ttl
:param unicode collection_ttl: Time-to-live of this List in seconds, defaults to no expiration.
:returns: Newly created SyncListInstance
:rtype: twilio.rest.sync.v1.service.sync_list.SyncListInstance
"""
data = values.of({'UniqueName': unique_name, 'Ttl': ttl, 'CollectionTtl': collection_ttl, })
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return SyncListInstance(self._version, payload, service_sid=self._solution['service_sid'], ) | python | {
"resource": ""
} |
q29590 | SyncListList.page | train | def page(self, page_token=values.unset, page_number=values.unset,
page_size=values.unset):
"""
Retrieve a single page of SyncListInstance records from the API.
Request is executed immediately
: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 SyncListInstance
:rtype: twilio.rest.sync.v1.service.sync_list.SyncListPage
"""
params = values.of({'PageToken': page_token, 'Page': page_number, 'PageSize': page_size, })
response = self._version.page(
'GET',
self._uri,
params=params,
)
return SyncListPage(self._version, response, self._solution) | python | {
"resource": ""
} |
q29591 | SyncListList.get_page | train | def get_page(self, target_url):
"""
Retrieve a specific page of SyncListInstance records from the API.
Request is executed immediately
:param str target_url: API-generated URL for the requested results page
:returns: Page of SyncListInstance
:rtype: twilio.rest.sync.v1.service.sync_list.SyncListPage
"""
response = self._version.domain.twilio.request(
'GET',
target_url,
)
return SyncListPage(self._version, response, self._solution) | python | {
"resource": ""
} |
q29592 | SyncListList.get | train | def get(self, sid):
"""
Constructs a SyncListContext
:param sid: The sid
:returns: twilio.rest.sync.v1.service.sync_list.SyncListContext
:rtype: twilio.rest.sync.v1.service.sync_list.SyncListContext
"""
return SyncListContext(self._version, service_sid=self._solution['service_sid'], sid=sid, ) | python | {
"resource": ""
} |
q29593 | SyncListPage.get_instance | train | def get_instance(self, payload):
"""
Build an instance of SyncListInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.sync.v1.service.sync_list.SyncListInstance
:rtype: twilio.rest.sync.v1.service.sync_list.SyncListInstance
"""
return SyncListInstance(self._version, payload, service_sid=self._solution['service_sid'], ) | python | {
"resource": ""
} |
q29594 | SyncListContext.sync_list_items | train | def sync_list_items(self):
"""
Access the sync_list_items
:returns: twilio.rest.sync.v1.service.sync_list.sync_list_item.SyncListItemList
:rtype: twilio.rest.sync.v1.service.sync_list.sync_list_item.SyncListItemList
"""
if self._sync_list_items is None:
self._sync_list_items = SyncListItemList(
self._version,
service_sid=self._solution['service_sid'],
list_sid=self._solution['sid'],
)
return self._sync_list_items | python | {
"resource": ""
} |
q29595 | SyncListContext.sync_list_permissions | train | def sync_list_permissions(self):
"""
Access the sync_list_permissions
:returns: twilio.rest.sync.v1.service.sync_list.sync_list_permission.SyncListPermissionList
:rtype: twilio.rest.sync.v1.service.sync_list.sync_list_permission.SyncListPermissionList
"""
if self._sync_list_permissions is None:
self._sync_list_permissions = SyncListPermissionList(
self._version,
service_sid=self._solution['service_sid'],
list_sid=self._solution['sid'],
)
return self._sync_list_permissions | python | {
"resource": ""
} |
q29596 | SimContext.usage_records | train | def usage_records(self):
"""
Access the usage_records
:returns: twilio.rest.wireless.v1.sim.usage_record.UsageRecordList
:rtype: twilio.rest.wireless.v1.sim.usage_record.UsageRecordList
"""
if self._usage_records is None:
self._usage_records = UsageRecordList(self._version, sim_sid=self._solution['sid'], )
return self._usage_records | python | {
"resource": ""
} |
q29597 | SimContext.data_sessions | train | def data_sessions(self):
"""
Access the data_sessions
:returns: twilio.rest.wireless.v1.sim.data_session.DataSessionList
:rtype: twilio.rest.wireless.v1.sim.data_session.DataSessionList
"""
if self._data_sessions is None:
self._data_sessions = DataSessionList(self._version, sim_sid=self._solution['sid'], )
return self._data_sessions | python | {
"resource": ""
} |
q29598 | DeploymentInstance.update | train | def update(self, friendly_name=values.unset, sync_service_sid=values.unset):
"""
Update the DeploymentInstance
:param unicode friendly_name: A human readable description for this Deployment.
:param unicode sync_service_sid: The unique identifier of the Sync service instance.
:returns: Updated DeploymentInstance
:rtype: twilio.rest.preview.deployed_devices.fleet.deployment.DeploymentInstance
"""
return self._proxy.update(friendly_name=friendly_name, sync_service_sid=sync_service_sid, ) | python | {
"resource": ""
} |
q29599 | StepContextList.get | train | def get(self):
"""
Constructs a StepContextContext
:returns: twilio.rest.studio.v1.flow.engagement.step.step_context.StepContextContext
:rtype: twilio.rest.studio.v1.flow.engagement.step.step_context.StepContextContext
"""
return StepContextContext(
self._version,
flow_sid=self._solution['flow_sid'],
engagement_sid=self._solution['engagement_sid'],
step_sid=self._solution['step_sid'],
) | python | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.