示例#1
0
    def patchToNapiListCategory(self,
                                host,
                                class_id,
                                app_id,
                                napi_key,
                                item_id,
                                item_info,
                                list_id,
                                category_id,
                                user='******'):
        import recoitem_common
        #print item_id, item_info, class_id, app_id, napi_key
        #exit()
        recoitem_common.setNapiHost(host)

        if not user:
            status, url = recoitem_common.patchRecoItemListCategory(
                item_id, item_info, class_id, app_id, napi_key, list_id,
                category_id)
        else:
            status, url = recoitem_common.patchRecoItemListCategoryUser(
                item_id, item_info, class_id, app_id, napi_key, list_id,
                category_id, user)

        return status, url
示例#2
0
    def delRelIds(self, host, class_id, app_id, napi_key, item_id, rel_ids):
        import recoitem_common
        #print item_id, item_info, class_id, app_id, napi_key
        #exit()
        recoitem_common.setNapiHost(host)

        for id in rel_ids:
            is_exist = recoitem_common.checkRecoItemList(
                app_id, class_id, id, item_id)
            if is_exist:
                recoitem_common.delFromNapiLstCurl(app_id, class_id, id,
                                                   item_id)
示例#3
0
    def delFromNapiList(self,
                        host,
                        class_id,
                        app_id,
                        item_id,
                        list_id,
                        user='******'):
        import recoitem_common
        #print item_id, item_info, class_id, app_id, napi_key
        #exit()
        recoitem_common.setNapiHost(host)

        if not user:
            status, url = recoitem_common.delFromNapiList(
                app_id, class_id, list_id, item_id)
        else:
            status, url = recoitem_common.delFromNapiListUser(
                app_id, class_id, list_id, item_id, user)

        return status, url
示例#4
0
    def inactiveNapi(self,
                     host,
                     class_id,
                     app_id,
                     napi_key,
                     item_id,
                     user='******'):
        import recoitem_common
        #print item_id, item_info, class_id, app_id, napi_key
        #exit()
        recoitem_common.setNapiHost(host)

        if not user:
            status, url = recoitem_common.inactiveRecoItem(
                item_id, class_id, app_id, napi_key)
        else:
            status, url = recoitem_common.inactiveRecoItemUser(
                item_id, class_id, app_id, napi_key, user)

        return status, url