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

Python values.of函数代码示例

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

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



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

示例1: update

    def update(self, role_sid=values.unset, attributes=values.unset,
               friendly_name=values.unset):
        """
        Update the UserInstance

        :param unicode role_sid: The SID id of the Role assigned to this user
        :param unicode attributes: A valid JSON string that contains application-specific data
        :param unicode friendly_name: A string to describe the resource

        :returns: Updated UserInstance
        :rtype: twilio.rest.chat.v2.service.user.UserInstance
        """
        data = values.of({'RoleSid': role_sid, 'Attributes': attributes, 'FriendlyName': friendly_name, })

        payload = self._version.update(
            'POST',
            self._uri,
            data=data,
        )

        return UserInstance(
            self._version,
            payload,
            service_sid=self._solution['service_sid'],
            sid=self._solution['sid'],
        )
开发者ID:twilio,项目名称:twilio-python,代码行数:26,代码来源:__init__.py


示例2: page

    def page(self, unique_name=values.unset, status=values.unset,
             page_token=values.unset, page_number=values.unset,
             page_size=values.unset):
        """
        Retrieve a single page of SessionInstance records from the API.
        Request is executed immediately

        :param unicode unique_name: A unique, developer assigned name of this Session.
        :param SessionInstance.Status status: The Status of this Session
        :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 SessionInstance
        :rtype: twilio.rest.preview.proxy.service.session.SessionPage
        """
        params = values.of({
            'UniqueName': unique_name,
            'Status': status,
            'PageToken': page_token,
            'Page': page_number,
            'PageSize': page_size,
        })

        response = self._version.page(
            'GET',
            self._uri,
            params=params,
        )

        return SessionPage(self._version, response, self._solution)
开发者ID:kanyapnp,项目名称:twilio-python,代码行数:31,代码来源:__init__.py


示例3: page

    def page(self, page_token=values.unset, page_number=values.unset,
             page_size=values.unset):
        """
        Retrieve a single page of CredentialInstance 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 CredentialInstance
        :rtype: twilio.rest.chat.v2.credential.CredentialPage
        """
        params = values.of({
            'PageToken': page_token,
            'Page': page_number,
            'PageSize': page_size,
        })

        response = self._version.page(
            'GET',
            self._uri,
            params=params,
        )

        return CredentialPage(self._version, response, self._solution)
开发者ID:pby2017,项目名称:library-for-twilio-python2,代码行数:26,代码来源:credential.py


示例4: create

    def create(self, body, from_=values.unset, attributes=values.unset):
        """
        Create a new MessageInstance

        :param unicode body: The body
        :param unicode from_: The from
        :param unicode attributes: The attributes

        :returns: Newly created MessageInstance
        :rtype: twilio.rest.chat.v2.service.channel.message.MessageInstance
        """
        data = values.of({
            'Body': body,
            'From': from_,
            'Attributes': attributes,
        })

        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:pby2017,项目名称:library-for-twilio-python2,代码行数:29,代码来源:message.py


示例5: update

    def update(self, url, method):
        """
        Update the MemberInstance

        :param unicode url: The url
        :param unicode method: The method

        :returns: Updated MemberInstance
        :rtype: twilio.rest.api.v2010.account.queue.member.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:pby2017,项目名称:library-for-twilio-python2,代码行数:28,代码来源:member.py


示例6: create

    def create(self, code, to=values.unset, verification_sid=values.unset,
               amount=values.unset, payee=values.unset):
        """
        Create a new VerificationCheckInstance

        :param unicode code: The verification string
        :param unicode to: The phone number to verify
        :param unicode verification_sid: A SID that uniquely identifies the Verification Check
        :param unicode amount: The amount of the associated PSD2 compliant transaction.
        :param unicode payee: The payee of the associated PSD2 compliant transaction

        :returns: Newly created VerificationCheckInstance
        :rtype: twilio.rest.verify.v2.service.verification_check.VerificationCheckInstance
        """
        data = values.of({
            'Code': code,
            'To': to,
            'VerificationSid': verification_sid,
            'Amount': amount,
            'Payee': payee,
        })

        payload = self._version.create(
            'POST',
            self._uri,
            data=data,
        )

        return VerificationCheckInstance(self._version, payload, service_sid=self._solution['service_sid'], )
开发者ID:twilio,项目名称:twilio-python,代码行数:29,代码来源:verification_check.py


示例7: update

    def update(self, body=values.unset, attributes=values.unset):
        """
        Update the MessageInstance

        :param unicode body: The new message body string.
        :param unicode attributes: The new attributes metadata field you can use to store any data you wish.

        :returns: Updated MessageInstance
        :rtype: twilio.rest.chat.v1.service.channel.message.MessageInstance
        """
        data = values.of({'Body': body, 'Attributes': attributes, })

        payload = self._version.update(
            'POST',
            self._uri,
            data=data,
        )

        return MessageInstance(
            self._version,
            payload,
            service_sid=self._solution['service_sid'],
            channel_sid=self._solution['channel_sid'],
            sid=self._solution['sid'],
        )
开发者ID:twilio,项目名称:twilio-python,代码行数:25,代码来源:message.py


示例8: update

    def update(self, friendly_name=values.unset, certificate=values.unset,
               private_key=values.unset, sandbox=values.unset, api_key=values.unset,
               secret=values.unset):
        """
        Update the CredentialInstance

        :param unicode friendly_name: A string to describe the resource
        :param unicode certificate: [APN only] The URL encoded representation of the certificate
        :param unicode private_key: [APN only] The URL encoded representation of the private key
        :param bool sandbox: [APN only] Whether to send the credential to sandbox APNs
        :param unicode api_key: [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential
        :param unicode secret: [FCM only] The Server key of your project from Firebase console

        :returns: Updated CredentialInstance
        :rtype: twilio.rest.chat.v2.credential.CredentialInstance
        """
        data = values.of({
            'FriendlyName': friendly_name,
            'Certificate': certificate,
            'PrivateKey': private_key,
            'Sandbox': sandbox,
            'ApiKey': api_key,
            'Secret': secret,
        })

        payload = self._version.update(
            'POST',
            self._uri,
            data=data,
        )

        return CredentialInstance(self._version, payload, sid=self._solution['sid'], )
开发者ID:twilio,项目名称:twilio-python,代码行数:32,代码来源:credential.py


示例9: create

    def create(self, credentials, friendly_name=values.unset,
               account_sid=values.unset):
        """
        Create a new AwsInstance

        :param unicode credentials: A string that contains the AWS access credentials in the format <AWS_ACCESS_KEY_ID>:<AWS_SECRET_ACCESS_KEY>
        :param unicode friendly_name: A string to describe the resource
        :param unicode account_sid: The Subaccount this Credential should be associated with.

        :returns: Newly created AwsInstance
        :rtype: twilio.rest.accounts.v1.credential.aws.AwsInstance
        """
        data = values.of({
            'Credentials': credentials,
            'FriendlyName': friendly_name,
            'AccountSid': account_sid,
        })

        payload = self._version.create(
            'POST',
            self._uri,
            data=data,
        )

        return AwsInstance(self._version, payload, )
开发者ID:twilio,项目名称:twilio-python,代码行数:25,代码来源:aws.py


示例10: page

    def page(self, order=values.unset, page_token=values.unset,
             page_number=values.unset, page_size=values.unset):
        """
        Retrieve a single page of MessageInstance records from the API.
        Request is executed immediately

        :param MessageInstance.OrderType order: The order
        :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 MessageInstance
        :rtype: twilio.rest.chat.v1.service.channel.message.MessagePage
        """
        params = values.of({
            'Order': order,
            'PageToken': page_token,
            'Page': page_number,
            'PageSize': page_size,
        })

        response = self._version.page(
            'GET',
            self._uri,
            params=params,
        )

        return MessagePage(self._version, response, self._solution)
开发者ID:twilio,项目名称:twilio-python,代码行数:28,代码来源:message.py


示例11: 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: twilio.rest.api.v2010.account.usage.trigger.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:pby2017,项目名称:library-for-twilio-python2,代码行数:30,代码来源:trigger.py


示例12: page

    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: Filter by recurring
        :param TriggerInstance.TriggerField trigger_by: Filter by trigger by
        :param TriggerInstance.UsageCategory usage_category: Filter by Usage Category
        :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)
开发者ID:pby2017,项目名称:library-for-twilio-python2,代码行数:33,代码来源:trigger.py


示例13: create

    def create(self, identity, role_sid=values.unset, attributes=values.unset,
               friendly_name=values.unset):
        """
        Create a new UserInstance

        :param unicode identity: The `identity` value that identifies the new resource's User
        :param unicode role_sid: The SID of the Role assigned to this user
        :param unicode attributes: A valid JSON string that contains application-specific data
        :param unicode friendly_name: A string to describe the new resource

        :returns: Newly created UserInstance
        :rtype: twilio.rest.chat.v2.service.user.UserInstance
        """
        data = values.of({
            'Identity': identity,
            'RoleSid': role_sid,
            'Attributes': attributes,
            'FriendlyName': friendly_name,
        })

        payload = self._version.create(
            'POST',
            self._uri,
            data=data,
        )

        return UserInstance(self._version, payload, service_sid=self._solution['service_sid'], )
开发者ID:twilio,项目名称:twilio-python,代码行数:27,代码来源:__init__.py


示例14: page

    def page(self, end=values.unset, start=values.unset, page_token=values.unset,
             page_number=values.unset, page_size=values.unset):
        """
        Retrieve a single page of DataSessionInstance records from the API.
        Request is executed immediately

        :param datetime end: The end
        :param datetime start: The start
        :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 DataSessionInstance
        :rtype: twilio.rest.wireless.v1.sim.data_session.DataSessionPage
        """
        params = values.of({
            'End': serialize.iso8601_datetime(end),
            'Start': serialize.iso8601_datetime(start),
            'PageToken': page_token,
            'Page': page_number,
            'PageSize': page_size,
        })

        response = self._version.page(
            'GET',
            self._uri,
            params=params,
        )

        return DataSessionPage(self._version, response, self._solution)
开发者ID:twilio,项目名称:twilio-python,代码行数:30,代码来源:data_session.py


示例15: update

    def update(self, role_sid=values.unset, attributes=values.unset,
               friendly_name=values.unset):
        """
        Update the UserInstance

        :param unicode role_sid: The unique id of the [Role][role] assigned to this user.
        :param unicode attributes: An optional string used to contain any metadata or other information for the User.
        :param unicode friendly_name: An optional human readable string representing the user.

        :returns: Updated UserInstance
        :rtype: twilio.rest.chat.v1.service.user.UserInstance
        """
        data = values.of({'RoleSid': role_sid, 'Attributes': attributes, 'FriendlyName': friendly_name, })

        payload = self._version.update(
            'POST',
            self._uri,
            data=data,
        )

        return UserInstance(
            self._version,
            payload,
            service_sid=self._solution['service_sid'],
            sid=self._solution['sid'],
        )
开发者ID:kanyapnp,项目名称:twilio-python,代码行数:26,代码来源:__init__.py


示例16: update

    def update(self, read, write, manage):
        """
        Update the SyncMapPermissionInstance

        :param bool read: Read access.
        :param bool write: Write access.
        :param bool manage: Manage access.

        :returns: Updated SyncMapPermissionInstance
        :rtype: twilio.rest.preview.sync.service.sync_map.sync_map_permission.SyncMapPermissionInstance
        """
        data = values.of({'Read': read, 'Write': write, 'Manage': manage, })

        payload = self._version.update(
            'POST',
            self._uri,
            data=data,
        )

        return SyncMapPermissionInstance(
            self._version,
            payload,
            service_sid=self._solution['service_sid'],
            map_sid=self._solution['map_sid'],
            identity=self._solution['identity'],
        )
开发者ID:kanyapnp,项目名称:twilio-python,代码行数:26,代码来源:sync_map_permission.py


示例17: create

    def create(self, identity, role_sid=values.unset, attributes=values.unset,
               friendly_name=values.unset):
        """
        Create a new UserInstance

        :param unicode identity: A unique string that identifies the user within this service - often a username or email address.
        :param unicode role_sid: The unique id of the Role assigned to this user.
        :param unicode attributes: An optional string used to contain any metadata or other information for the User.
        :param unicode friendly_name: An optional human readable string representing the user.

        :returns: Newly created UserInstance
        :rtype: twilio.rest.chat.v1.service.user.UserInstance
        """
        data = values.of({
            'Identity': identity,
            'RoleSid': role_sid,
            'Attributes': attributes,
            'FriendlyName': friendly_name,
        })

        payload = self._version.create(
            'POST',
            self._uri,
            data=data,
        )

        return UserInstance(self._version, payload, service_sid=self._solution['service_sid'], )
开发者ID:kanyapnp,项目名称:twilio-python,代码行数:27,代码来源:__init__.py


示例18: update

    def update(self, body=values.unset, attributes=values.unset):
        """
        Update the MessageInstance

        :param unicode body: The body
        :param unicode attributes: The attributes

        :returns: Updated MessageInstance
        :rtype: twilio.rest.chat.v2.service.channel.message.MessageInstance
        """
        data = values.of({
            'Body': body,
            'Attributes': attributes,
        })

        payload = self._version.update(
            'POST',
            self._uri,
            data=data,
        )

        return MessageInstance(
            self._version,
            payload,
            service_sid=self._solution['service_sid'],
            channel_sid=self._solution['channel_sid'],
            sid=self._solution['sid'],
        )
开发者ID:pby2017,项目名称:library-for-twilio-python2,代码行数:28,代码来源:message.py


示例19: page

    def page(self, date_created_before=values.unset, date_created=values.unset,
             date_created_after=values.unset, page_token=values.unset,
             page_number=values.unset, page_size=values.unset):
        """
        Retrieve a single page of RecordingInstance records from the API.
        Request is executed immediately

        :param date date_created_before: The date_created
        :param date date_created: The date_created
        :param date date_created_after: The date_created
        :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 RecordingInstance
        :rtype: twilio.rest.api.v2010.account.call.recording.RecordingPage
        """
        params = values.of({
            'DateCreated<': serialize.iso8601_date(date_created_before),
            'DateCreated': serialize.iso8601_date(date_created),
            'DateCreated>': serialize.iso8601_date(date_created_after),
            'PageToken': page_token,
            'Page': page_number,
            'PageSize': page_size,
        })

        response = self._version.page(
            'GET',
            self._uri,
            params=params,
        )

        return RecordingPage(self._version, response, self._solution)
开发者ID:pby2017,项目名称:library-for-twilio-python2,代码行数:33,代码来源:recording.py


示例20: page

    def page(self, reservation_status=values.unset, page_token=values.unset,
             page_number=values.unset, page_size=values.unset):
        """
        Retrieve a single page of ReservationInstance records from the API.
        Request is executed immediately

        :param ReservationInstance.Status reservation_status: The reservation_status
        :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 ReservationInstance
        :rtype: twilio.rest.taskrouter.v1.workspace.worker.reservation.ReservationPage
        """
        params = values.of({
            'ReservationStatus': reservation_status,
            'PageToken': page_token,
            'Page': page_number,
            'PageSize': page_size,
        })

        response = self._version.page(
            'GET',
            self._uri,
            params=params,
        )

        return ReservationPage(self._version, response, self._solution)
开发者ID:pby2017,项目名称:library-for-twilio-python2,代码行数:28,代码来源:reservation.py



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Python jwt.decode函数代码示例发布时间:2022-05-27
下一篇:
Python serialize.object函数代码示例发布时间: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