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


Python E.name方法代码示例

本文整理汇总了Python中openprovider.modules.E.name方法的典型用法代码示例。如果您正苦于以下问题:Python E.name方法的具体用法?Python E.name怎么用?Python E.name使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在openprovider.modules.E的用法示例。


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

示例1: _domain

# 需要导入模块: from openprovider.modules import E [as 别名]
# 或者: from openprovider.modules.E import name [as 别名]
def _domain(domain):
    sld, tld = domain.split('.', 1)
    print E.domain(
            E.name(sld),
            E.extension(tld),
    )
    return E.domain(
        E.name(sld),
        E.extension(tld),
    )
开发者ID:aschenkels-ictstudio,项目名称:openprovider.py,代码行数:12,代码来源:nameserver.py

示例2: _records

# 需要导入模块: from openprovider.modules import E [as 别名]
# 或者: from openprovider.modules.E import name [as 别名]
def _records(records):
    items = []
    for rec in records:
        if rec.get('prio') and rec.get('ttl'):
            item = E.item(E.type(rec.get('type')), E.name(rec.get('name')), E.value(rec.get('value')), E.prio(rec.get('prio')), E.ttl(rec.get('ttl')))
        elif not rec.get('prio') and rec.get('ttl'):
            item = E.item(E.type(rec.get('type')), E.name(rec.get('name')), E.value(rec.get('value')), E.ttl(rec.get('ttl')))
        elif not rec.get('prio') and not rec.get('ttl'):
            item = E.item(E.type(rec.get('type')), E.name(rec.get('name')), E.value(rec.get('value')))
        items.append(item)
    return E.records(E.array(*items))
开发者ID:aschenkels-ictstudio,项目名称:openprovider.py,代码行数:13,代码来源:nameserver.py

示例3: create_customer

# 需要导入模块: from openprovider.modules import E [as 别名]
# 或者: from openprovider.modules.E import name [as 别名]
    def create_customer(self, name, gender, address, phone, email, vat=None, fax=None,
                        company_name=None, additional_data=None, extension_additional_data=None):
        """Create a customer"""

        response = self.request(E.createCustomerRequest(
            E.companyName(company_name),
            E.vat(vat),
            E.name(
                E.initials(name.initials),
                E.firstName(name.first_name),
                E.prefix(name.prefix or ''),
                E.lastName(name.last_name),
            ),
            E.gender(gender),
            _get_phone_xml('phone', phone),
            _get_phone_xml('fax', fax),
            E.address(
                E.street(address.street),
                E.number(address.number),
                E.suffix(address.suffix or ''),
                E.zipcode(address.zipcode),
                E.city(address.city),
                E.state(address.state or ''),
                E.country(address.country),
            ),
            E.email(email),
            _additional_data(additional_data),
            _extension_additional_data(extension_additional_data),
        ))

        return str(response.data.handle)
开发者ID:AntagonistHQ,项目名称:openprovider.py,代码行数:33,代码来源:customer.py

示例4: retrieve_extension

# 需要导入模块: from openprovider.modules import E [as 别名]
# 或者: from openprovider.modules.E import name [as 别名]
    def retrieve_extension(self, name, **kw):
        """Retrieve details on a single extension."""

        response = self.request(
            E.retrieveExtensionRequest(
                E.name(name),
                E.withDescription(int(kw.get("with_description", 0))),
                E.withPrice(int(kw.get("with_price", 0))),
                E.withUsageCount(int(kw.get("with_usage_count", 0))),
            )
        )

        return response.as_model(Extension)
开发者ID:aschenkels-ictstudio,项目名称:openprovider.py,代码行数:15,代码来源:extension.py

示例5: check_domain_request

# 需要导入模块: from openprovider.modules import E [as 别名]
# 或者: from openprovider.modules.E import name [as 别名]
    def check_domain_request(self, domains):
        """
        Return the availability of one or more domain names.

        The availability is a model containing a domain and a status. It can also have a premium
        attribute in case the domain has non-default costs.
        """
        request = E.checkDomainRequest(
            E.domains(
                E.array(
                    *[E.item(
                        E.name(domain.split(".")[0]),
                        E.extension(domain.split(".")[1])
                    ) for domain in domains]
                )
            )
        )

        response = self.request(request)
        return [Model(item) for item in response.data.array.item]
开发者ID:AntagonistHQ,项目名称:openprovider.py,代码行数:22,代码来源:domain.py

示例6: _nameservers

# 需要导入模块: from openprovider.modules import E [as 别名]
# 或者: from openprovider.modules.E import name [as 别名]
def _nameservers(nameservers):
    items = [E.item(E.name(ns.name), OE('ip', ns.ip), OE('ip6', ns.ip6)) for ns in nameservers]
    return E.array(*items)
开发者ID:AntagonistHQ,项目名称:openprovider.py,代码行数:5,代码来源:domain.py


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