当前位置: 首页>>代码示例>>Python>>正文


Python values.of函数代码示例

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


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


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