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


Python Item.sanitize_id方法代码示例

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


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

示例1: getOne

# 需要导入模块: from admitad.items.base import Item [as 别名]
# 或者: from admitad.items.base.Item import sanitize_id [as 别名]
    def getOne(self, _id, c_id, **kwargs):
        """
        Here _id is a website id and c_id is a campaign id

        Args:
            _id (int)
            c_id (int)

        """
        request_data = {
            'url': self.SINGLE_URL,
            'website_id': Item.sanitize_id(_id),
            'campaign_id': Item.sanitize_id(c_id)
        }

        return self.transport.get().request(**request_data)
开发者ID:admitad,项目名称:admitad-python-api,代码行数:18,代码来源:campaigns.py

示例2: get

# 需要导入模块: from admitad.items.base import Item [as 别名]
# 或者: from admitad.items.base.Item import sanitize_id [as 别名]
    def get(self, campaign_id, website_id, **kwargs):
        """
        Args:
            campaign_id (int)
            website_id (int)
            limit (int)
            offset (int)

        """
        request_data = {
            'url': self.URL,
            'campaign_id': Item.sanitize_id(campaign_id),
            'website_id': Item.sanitize_id(website_id),
        }

        return self.transport.get().set_pagination(**kwargs).request(**request_data)
开发者ID:admitad,项目名称:admitad-python-api,代码行数:18,代码来源:landings.py

示例3: disconnect

# 需要导入模块: from admitad.items.base import Item [as 别名]
# 或者: from admitad.items.base.Item import sanitize_id [as 别名]
    def disconnect(self, c_id, w_id, **kwargs):
        """
        Disconnect an advertising campaign from a website
        Here w_id is a website id and c_id is a campaign id

        Args:
            c_id (int)
            w_id (int)

        """
        request_data = {
            'url': self.DISCONNECT_URL,
            'campaign_id': Item.sanitize_id(c_id),
            'website_id': Item.sanitize_id(w_id)
        }

        return self.transport.post().request(**request_data)
开发者ID:admitad,项目名称:admitad-python-api,代码行数:19,代码来源:campaigns.py

示例4: update

# 需要导入模块: from admitad.items.base import Item [as 别名]
# 或者: from admitad.items.base.Item import sanitize_id [as 别名]
    def update(self, optcode_id, **kwargs):
        data = Item.sanitize_fields(self.UPDATE_FIELDS, **kwargs)
        request_data = {
            'url': self.UPDATE_URL,
            'optcode_id': Item.sanitize_id(optcode_id),
        }

        return self.transport.post().set_data(data).request(**request_data)
开发者ID:admitad,项目名称:admitad-python-api,代码行数:10,代码来源:optcodes.py

示例5: create

# 需要导入模块: from admitad.items.base import Item [as 别名]
# 或者: from admitad.items.base.Item import sanitize_id [as 别名]
    def create(self, website_id, campaign_id, **kwargs):
        """
        Args:
            website_id (int)
            campaign_id (int)
            ulp (list of str)
            subid (str)

        """
        data = Item.sanitize_fields(self.CREATE_FIELDS, **kwargs)

        request_data = {
            'url': self.CREATE_URL,
            'website_id': Item.sanitize_id(website_id),
            'campaign_id': Item.sanitize_id(campaign_id),
        }

        return self.transport.get().set_data(data).request(**request_data)
开发者ID:admitad,项目名称:admitad-python-api,代码行数:20,代码来源:deeplinks.py

示例6: getLevelsForWebsite

# 需要导入模块: from admitad.items.base import Item [as 别名]
# 或者: from admitad.items.base.Item import sanitize_id [as 别名]
    def getLevelsForWebsite(self, website_id):
        """
        Args:
            website_id (int)

        """
        request_data = {
            'url': self.LEVELS_FOR_WEBSITE_URL,
            'website_id': Item.sanitize_id(website_id)
        }

        return self.transport.get().request(**request_data)
开发者ID:admitad,项目名称:admitad-python-api,代码行数:14,代码来源:retag.py

示例7: getOne

# 需要导入模块: from admitad.items.base import Item [as 别名]
# 或者: from admitad.items.base.Item import sanitize_id [as 别名]
    def getOne(self, retag_id):
        """
        Args:
            retag_id (int)

        """
        request_data = {
            'url': self.SINGLE_URL,
            'retag_id': Item.sanitize_id(retag_id)
        }

        return self.transport.get().request(**request_data)
开发者ID:admitad,项目名称:admitad-python-api,代码行数:14,代码来源:retag.py

示例8: getOne

# 需要导入模块: from admitad.items.base import Item [as 别名]
# 或者: from admitad.items.base.Item import sanitize_id [as 别名]
    def getOne(self, broken_link_id):
        """
        Args:
            broken_link_id (int)

        """
        request_data = {
            'url': self.SINGLE_URL,
            'broken_link_id': Item.sanitize_id(broken_link_id)
        }

        return self.transport.get().request(**request_data)
开发者ID:admitad,项目名称:admitad-python-api,代码行数:14,代码来源:broken_links.py

示例9: getLevelsForCampaign

# 需要导入模块: from admitad.items.base import Item [as 别名]
# 或者: from admitad.items.base.Item import sanitize_id [as 别名]
    def getLevelsForCampaign(self, campaign_id):
        """
        Args:
            capaign_id (int)

        """
        request_data = {
            'url': self.LEVELS_FOR_CAMPAIGN_URL,
            'campaign_id': Item.sanitize_id(campaign_id)
        }

        return self.transport.get().request(**request_data)
开发者ID:admitad,项目名称:admitad-python-api,代码行数:14,代码来源:retag.py

示例10: delete

# 需要导入模块: from admitad.items.base import Item [as 别名]
# 或者: from admitad.items.base.Item import sanitize_id [as 别名]
    def delete(self, lost_order_id):
        """
        Args:
            lost_order_id (int)

        """
        request_data = {
            'url': self.DELETE_URL,
            'lost_order_id': Item.sanitize_id(lost_order_id),
        }

        return self.transport.delete().request(**request_data)
开发者ID:admitad,项目名称:admitad-python-api,代码行数:14,代码来源:lost_orders.py

示例11: delete

# 需要导入模块: from admitad.items.base import Item [as 别名]
# 或者: from admitad.items.base.Item import sanitize_id [as 别名]
    def delete(self, _id):
        """
        Args:
            _id (int)

        """
        request_data = {
            'url': self.DELETE_URL,
            'website_id': Item.sanitize_id(_id)
        }

        return self.transport.post().request(**request_data)
开发者ID:admitad,项目名称:admitad-python-api,代码行数:14,代码来源:websites.py

示例12: getOne

# 需要导入模块: from admitad.items.base import Item [as 别名]
# 或者: from admitad.items.base.Item import sanitize_id [as 别名]
    def getOne(self, _id, **kwargs):
        """
        Args:
            _id (int)

        """
        request_data = {
            'url': self.SINGLE_URL,
            'payment_id': Item.sanitize_id(_id)
        }

        return self.transport.get().request(**request_data)
开发者ID:admitad,项目名称:admitad-python-api,代码行数:14,代码来源:payments.py

示例13: getOne

# 需要导入模块: from admitad.items.base import Item [as 别名]
# 或者: from admitad.items.base.Item import sanitize_id [as 别名]
    def getOne(self, lost_order_id):
        """
        Args:
            lost_order_id (int)

        """
        request_data = {
            'url': self.SINGLE_URL,
            'lost_order_id': Item.sanitize_id(lost_order_id)
        }

        return self.transport.get().request(**request_data)
开发者ID:admitad,项目名称:admitad-python-api,代码行数:14,代码来源:lost_orders.py

示例14: verify

# 需要导入模块: from admitad.items.base import Item [as 别名]
# 或者: from admitad.items.base.Item import sanitize_id [as 别名]
    def verify(self, _id):
        """
        Args:
            _id (int)

        """
        request_data = {
            'url': self.VERIFY_URL,
            'website_id': Item.sanitize_id(_id)
        }

        return self.transport.post().request(**request_data)
开发者ID:admitad,项目名称:admitad-python-api,代码行数:14,代码来源:websites.py

示例15: delete

# 需要导入模块: from admitad.items.base import Item [as 别名]
# 或者: from admitad.items.base.Item import sanitize_id [as 别名]
    def delete(self, _id, **kwargs):
        """
        Delete a payment request.
        _id is a payment id.

        Args:
            _id (int)

        """
        request_data = {
            'url': self.DELETE_URL,
            'payment_id': Item.sanitize_id(_id)
        }

        return self.transport.post().request(**request_data)
开发者ID:admitad,项目名称:admitad-python-api,代码行数:17,代码来源:payments.py


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