• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python values.of函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中twilio.values.of函数的典型用法代码示例。如果您正苦于以下问题:Python of函数的具体用法?Python of怎么用?Python of使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了of函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: fetch

 def fetch(self, country_code=values.unset, type=values.unset):
     """
     Fetch a PhoneNumberInstance
     
     :param unicode country_code: The country_code
     :param unicode type: The type
     
     :returns: Fetched PhoneNumberInstance
     :rtype: PhoneNumberInstance
     """
     params = values.of({
         'CountryCode': country_code,
         'Type': type,
     })
     
     payload = self._version.fetch(
         'GET',
         self._uri,
         params=params,
     )
     
     return PhoneNumberInstance(
         self._version,
         payload,
         phone_number=self._solution['phone_number'],
     )
开发者ID:quippp,项目名称:twilio-python-old,代码行数:26,代码来源:phone_number.py


示例2: update

 def update(self, body=values.unset):
     """
     Update the MessageInstance
     
     :param unicode body: The body
     
     :returns: Updated MessageInstance
     :rtype: MessageInstance
     """
     data = values.of({
         'Body': body,
     })
     
     payload = self._version.update(
         'POST',
         self._uri,
         data=data,
     )
     
     return MessageInstance(
         self._version,
         payload,
         account_sid=self._solution['account_sid'],
         sid=self._solution['sid'],
     )
开发者ID:quippp,项目名称:twilio-python-old,代码行数:25,代码来源:__init__.py


示例3: update

 def update(self, username, password):
     """
     Update the CredentialInstance
     
     :param unicode username: The username
     :param unicode password: The password
     
     :returns: Updated CredentialInstance
     :rtype: CredentialInstance
     """
     data = values.of({
         'Username': username,
         'Password': password,
     })
     
     payload = self._version.update(
         'POST',
         self._uri,
         data=data,
     )
     
     return CredentialInstance(
         self._version,
         payload,
         account_sid=self._solution['account_sid'],
         credential_list_sid=self._solution['credential_list_sid'],
         sid=self._solution['sid'],
     )
开发者ID:quippp,项目名称:twilio-python-old,代码行数:28,代码来源:credential.py


示例4: page

 def page(self, friendly_name=values.unset, available=values.unset,
          page_token=values.unset, page_number=values.unset,
          page_size=values.unset):
     """
     Retrieve a single page of ActivityInstance records from the API.
     Request is executed immediately
     
     :param unicode friendly_name: The friendly_name
     :param unicode available: The available
     :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 ActivityInstance
     :rtype: Page
     """
     params = values.of({
         'FriendlyName': friendly_name,
         'Available': available,
         'PageToken': page_token,
         'Page': page_number,
         'PageSize': page_size,
     })
     
     response = self._version.page(
         'GET',
         self._uri,
         params=params,
     )
     
     return ActivityPage(
         self._version,
         response,
         workspace_sid=self._solution['workspace_sid'],
     )
开发者ID:quippp,项目名称:twilio-python-old,代码行数:35,代码来源:activity.py


示例5: create

 def create(self, weight, priority, enabled, friendly_name, sip_url):
     """
     Create a new OriginationUrlInstance
     
     :param unicode weight: The weight
     :param unicode priority: The priority
     :param bool enabled: The enabled
     :param unicode friendly_name: The friendly_name
     :param unicode sip_url: The sip_url
     
     :returns: Newly created OriginationUrlInstance
     :rtype: OriginationUrlInstance
     """
     data = values.of({
         'Weight': weight,
         'Priority': priority,
         'Enabled': enabled,
         'FriendlyName': friendly_name,
         'SipUrl': sip_url,
     })
     
     payload = self._version.create(
         'POST',
         self._uri,
         data=data,
     )
     
     return OriginationUrlInstance(
         self._version,
         payload,
         trunk_sid=self._solution['trunk_sid'],
     )
开发者ID:quippp,项目名称:twilio-python-old,代码行数:32,代码来源:origination_url.py


示例6: create

 def create(self, friendly_name, configuration, assignment_callback_url,
            fallback_assignment_callback_url=values.unset,
            task_reservation_timeout=values.unset):
     """
     Create a new WorkflowInstance
     
     :param unicode friendly_name: The friendly_name
     :param unicode configuration: The configuration
     :param unicode assignment_callback_url: The assignment_callback_url
     :param unicode fallback_assignment_callback_url: The fallback_assignment_callback_url
     :param unicode task_reservation_timeout: The task_reservation_timeout
     
     :returns: Newly created WorkflowInstance
     :rtype: 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'],
     )
开发者ID:quippp,项目名称:twilio-python-old,代码行数:34,代码来源:__init__.py


示例7: create

 def create(self, friendly_name, available):
     """
     Create a new ActivityInstance
     
     :param unicode friendly_name: The friendly_name
     :param bool available: The available
     
     :returns: Newly created ActivityInstance
     :rtype: 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'],
     )
开发者ID:quippp,项目名称:twilio-python-old,代码行数:26,代码来源:activity.py


示例8: update

 def update(self, attributes=values.unset, assignment_status=values.unset,
            reason=values.unset, priority=values.unset):
     """
     Update the TaskInstance
     
     :param unicode attributes: The attributes
     :param task.status assignment_status: The assignment_status
     :param unicode reason: The reason
     :param unicode priority: The priority
     
     :returns: Updated TaskInstance
     :rtype: TaskInstance
     """
     data = values.of({
         'Attributes': attributes,
         'AssignmentStatus': assignment_status,
         'Reason': reason,
         'Priority': priority,
     })
     
     payload = self._version.update(
         'POST',
         self._uri,
         data=data,
     )
     
     return TaskInstance(
         self._version,
         payload,
         workspace_sid=self._solution['workspace_sid'],
         sid=self._solution['sid'],
     )
开发者ID:quippp,项目名称:twilio-python-old,代码行数:32,代码来源:__init__.py


示例9: update

 def update(self, callback_method=values.unset, callback_url=values.unset,
            friendly_name=values.unset):
     """
     Update the TriggerInstance
     
     :param unicode callback_method: HTTP method to use with callback_url
     :param unicode callback_url: URL Twilio will request when the trigger fires
     :param unicode friendly_name: A user-specified, human-readable name for the trigger.
     
     :returns: Updated TriggerInstance
     :rtype: TriggerInstance
     """
     data = values.of({
         'CallbackMethod': callback_method,
         'CallbackUrl': callback_url,
         'FriendlyName': friendly_name,
     })
     
     payload = self._version.update(
         'POST',
         self._uri,
         data=data,
     )
     
     return TriggerInstance(
         self._version,
         payload,
         account_sid=self._solution['account_sid'],
         sid=self._solution['sid'],
     )
开发者ID:quippp,项目名称:twilio-python-old,代码行数:30,代码来源:trigger.py


示例10: create

 def create(self, friendly_name, unique_name, attributes=values.unset,
            type=values.unset):
     """
     Create a new ChannelInstance
     
     :param unicode friendly_name: The friendly_name
     :param unicode unique_name: The unique_name
     :param unicode attributes: The attributes
     :param channel.channel_type type: The type
     
     :returns: Newly created ChannelInstance
     :rtype: ChannelInstance
     """
     data = values.of({
         'FriendlyName': friendly_name,
         'UniqueName': unique_name,
         'Attributes': attributes,
         'Type': type,
     })
     
     payload = self._version.create(
         'POST',
         self._uri,
         data=data,
     )
     
     return ChannelInstance(
         self._version,
         payload,
         service_sid=self._solution['service_sid'],
     )
开发者ID:quippp,项目名称:twilio-python-old,代码行数:31,代码来源:__init__.py


示例11: update

 def update(self, url, method):
     """
     Update the MemberInstance
     
     :param unicode url: The url
     :param unicode method: The method
     
     :returns: Updated MemberInstance
     :rtype: MemberInstance
     """
     data = values.of({
         'Url': url,
         'Method': method,
     })
     
     payload = self._version.update(
         'POST',
         self._uri,
         data=data,
     )
     
     return MemberInstance(
         self._version,
         payload,
         account_sid=self._solution['account_sid'],
         queue_sid=self._solution['queue_sid'],
         call_sid=self._solution['call_sid'],
     )
开发者ID:quippp,项目名称:twilio-python-old,代码行数:28,代码来源:member.py


示例12: update

 def update(self, friendly_name=values.unset, api_version=values.unset,
            voice_url=values.unset, voice_method=values.unset,
            voice_fallback_url=values.unset, voice_fallback_method=values.unset,
            status_callback=values.unset, status_callback_method=values.unset,
            voice_caller_id_lookup=values.unset, sms_url=values.unset,
            sms_method=values.unset, sms_fallback_url=values.unset,
            sms_fallback_method=values.unset, sms_status_callback=values.unset,
            message_status_callback=values.unset):
     """
     Update the ApplicationInstance
     
     :param unicode friendly_name: Human readable description of this resource
     :param unicode api_version: The API version to use
     :param unicode voice_url: URL Twilio will make requests to when relieving a call
     :param unicode voice_method: HTTP method to use with the URL
     :param unicode voice_fallback_url: Fallback URL
     :param unicode voice_fallback_method: HTTP method to use with the fallback url
     :param unicode status_callback: URL to hit with status updates
     :param unicode status_callback_method: HTTP method to use with the status callback
     :param bool voice_caller_id_lookup: True or False
     :param unicode sms_url: URL Twilio will request when receiving an SMS
     :param unicode sms_method: HTTP method to use with sms_url
     :param unicode sms_fallback_url: Fallback URL if there's an error parsing TwiML
     :param unicode sms_fallback_method: HTTP method to use with sms_fallback_method
     :param unicode sms_status_callback: URL Twilio with request with status updates
     :param unicode message_status_callback: URL to make requests to with status updates
     
     :returns: Updated ApplicationInstance
     :rtype: ApplicationInstance
     """
     data = values.of({
         'FriendlyName': friendly_name,
         'ApiVersion': api_version,
         'VoiceUrl': voice_url,
         'VoiceMethod': voice_method,
         'VoiceFallbackUrl': voice_fallback_url,
         'VoiceFallbackMethod': voice_fallback_method,
         'StatusCallback': status_callback,
         'StatusCallbackMethod': status_callback_method,
         'VoiceCallerIdLookup': voice_caller_id_lookup,
         'SmsUrl': sms_url,
         'SmsMethod': sms_method,
         'SmsFallbackUrl': sms_fallback_url,
         'SmsFallbackMethod': sms_fallback_method,
         'SmsStatusCallback': sms_status_callback,
         'MessageStatusCallback': message_status_callback,
     })
     
     payload = self._version.update(
         'POST',
         self._uri,
         data=data,
     )
     
     return ApplicationInstance(
         self._version,
         payload,
         account_sid=self._solution['account_sid'],
         sid=self._solution['sid'],
     )
开发者ID:quippp,项目名称:twilio-python-old,代码行数:60,代码来源:application.py


示例13: create

 def create(self, identity, role_sid=values.unset):
     """
     Create a new MemberInstance
     
     :param unicode identity: The identity
     :param unicode role_sid: The role_sid
     
     :returns: Newly created MemberInstance
     :rtype: MemberInstance
     """
     data = values.of({
         'Identity': identity,
         'RoleSid': role_sid,
     })
     
     payload = self._version.create(
         'POST',
         self._uri,
         data=data,
     )
     
     return MemberInstance(
         self._version,
         payload,
         service_sid=self._solution['service_sid'],
         channel_sid=self._solution['channel_sid'],
     )
开发者ID:quippp,项目名称:twilio-python-old,代码行数:27,代码来源:member.py


示例14: page

 def page(self, friendly_name=values.unset, status=values.unset,
          page_token=values.unset, page_number=values.unset,
          page_size=values.unset):
     """
     Retrieve a single page of AccountInstance records from the API.
     Request is executed immediately
     
     :param unicode friendly_name: FriendlyName to filter on
     :param account.status status: Status to filter on
     :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 AccountInstance
     :rtype: Page
     """
     params = values.of({
         'FriendlyName': friendly_name,
         'Status': status,
         'PageToken': page_token,
         'Page': page_number,
         'PageSize': page_size,
     })
     
     response = self._version.page(
         'GET',
         self._uri,
         params=params,
     )
     
     return AccountPage(
         self._version,
         response,
     )
开发者ID:quippp,项目名称:twilio-python-old,代码行数:34,代码来源:__init__.py


示例15: update

 def update(self, friendly_name=values.unset):
     """
     Update the OutgoingCallerIdInstance
     
     :param unicode friendly_name: A human readable description of the caller ID
     
     :returns: Updated OutgoingCallerIdInstance
     :rtype: OutgoingCallerIdInstance
     """
     data = values.of({
         'FriendlyName': friendly_name,
     })
     
     payload = self._version.update(
         'POST',
         self._uri,
         data=data,
     )
     
     return OutgoingCallerIdInstance(
         self._version,
         payload,
         account_sid=self._solution['account_sid'],
         sid=self._solution['sid'],
     )
开发者ID:quippp,项目名称:twilio-python-old,代码行数:25,代码来源:outgoing_caller_id.py


示例16: update

 def update(self, friendly_name=values.unset, status=values.unset):
     """
     Update the AccountInstance
     
     :param unicode friendly_name: FriendlyName to update
     :param account.status status: Status to update the Account with
     
     :returns: Updated AccountInstance
     :rtype: AccountInstance
     """
     data = values.of({
         'FriendlyName': friendly_name,
         'Status': status,
     })
     
     payload = self._version.update(
         'POST',
         self._uri,
         data=data,
     )
     
     return AccountInstance(
         self._version,
         payload,
         sid=self._solution['sid'],
     )
开发者ID:quippp,项目名称:twilio-python-old,代码行数:26,代码来源:__init__.py


示例17: create

 def create(self, friendly_name, type, certificate=values.unset,
            private_key=values.unset, sandbox=values.unset,
            api_key=values.unset):
     """
     Create a new CredentialInstance
     
     :param unicode friendly_name: The friendly_name
     :param credential.push_service type: The type
     :param unicode certificate: The certificate
     :param unicode private_key: The private_key
     :param bool sandbox: The sandbox
     :param unicode api_key: The api_key
     
     :returns: Newly created CredentialInstance
     :rtype: CredentialInstance
     """
     data = values.of({
         'FriendlyName': friendly_name,
         'Type': type,
         'Certificate': certificate,
         'PrivateKey': private_key,
         'Sandbox': sandbox,
         'ApiKey': api_key,
     })
     
     payload = self._version.create(
         'POST',
         self._uri,
         data=data,
     )
     
     return CredentialInstance(
         self._version,
         payload,
     )
开发者ID:quippp,项目名称:twilio-python-old,代码行数:35,代码来源:credential.py


示例18: create

 def create(self, ip_access_control_list_sid):
     """
     Create a new IpAccessControlListMappingInstance
     
     :param unicode ip_access_control_list_sid: The ip_access_control_list_sid
     
     :returns: Newly created IpAccessControlListMappingInstance
     :rtype: IpAccessControlListMappingInstance
     """
     data = values.of({
         'IpAccessControlListSid': ip_access_control_list_sid,
     })
     
     payload = self._version.create(
         'POST',
         self._uri,
         data=data,
     )
     
     return IpAccessControlListMappingInstance(
         self._version,
         payload,
         account_sid=self._solution['account_sid'],
         domain_sid=self._solution['domain_sid'],
     )
开发者ID:quippp,项目名称:twilio-python-old,代码行数:25,代码来源:ip_access_control_list_mapping.py


示例19: create

 def create(self, body, from_=values.unset):
     """
     Create a new MessageInstance
     
     :param unicode body: The body
     :param unicode from_: The from
     
     :returns: Newly created MessageInstance
     :rtype: MessageInstance
     """
     data = values.of({
         'Body': body,
         'From': from_,
     })
     
     payload = self._version.create(
         'POST',
         self._uri,
         data=data,
     )
     
     return MessageInstance(
         self._version,
         payload,
         service_sid=self._solution['service_sid'],
         channel_sid=self._solution['channel_sid'],
     )
开发者ID:quippp,项目名称:twilio-python-old,代码行数:27,代码来源:message.py


示例20: update

 def update(self, friendly_name):
     """
     Update the ActivityInstance
     
     :param unicode friendly_name: The friendly_name
     
     :returns: Updated ActivityInstance
     :rtype: ActivityInstance
     """
     data = values.of({
         'FriendlyName': friendly_name,
     })
     
     payload = self._version.update(
         'POST',
         self._uri,
         data=data,
     )
     
     return ActivityInstance(
         self._version,
         payload,
         workspace_sid=self._solution['workspace_sid'],
         sid=self._solution['sid'],
     )
开发者ID:quippp,项目名称:twilio-python-old,代码行数:25,代码来源:activity.py



注:本文中的twilio.values.of函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python twill.add_wsgi_intercept函数代码示例发布时间:2022-05-27
下一篇:
Python util.TwilioCapability类代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap