當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。