コード例 #1
0
ファイル: get_smt_lm_account.py プロジェクト: xuhe1992/morph
def search_account():
    # with sessionCM() as session:
    count = 1
    f = open("smt_ccounts.text", 'rb')
    shop = Shop()
    shop.session = "0bdf6f64-372d-4b6 a-b68b-5efe64bc18bd"
    shop.site_id = 2
    shop.platform = "AliExpress"
    shop.name = 'Limerence'
    while True:
        line = f.readline()
        if not line:
            break
        shop.account = line.strip()
        print "第 %d 个..." % count
        handler = AliMessage(shop)
        result = handler.get_msg_relation_list(msg_source="order_msg")
        lens = len(result.get("result", []))
        if len(result.get("result", [])):
            print line, len(result.get("result", []))
            raw_input("continue ... ")
        count += 1
コード例 #2
0
            "content": content
        }
        if channel_id:
            params.update({"channelId": channel_id})
        if image:
            params["imgPath"] = image
        response = self.execute('api.addMsg', params)
        return response


if __name__ == "__main__":
    shop = Shop()
    shop.account = "6bf331f0-8e5b-4edb-96a4-5fabf975834c"
    shop.session = "0bdf6f64-372d-4b6 a-b68b-5efe64bc18bd"
    shop.site_id = 2
    shop.platform = "AliExpress"
    shop.name = 'Limerence'
    handler = AliMessage(shop)
    # result = handler.get_msg_detail_list(
    #     channel_id="66947353601", msg_source="message_center"
    # )

    # result = handler.get_msg_relation_list(
    #     msg_source="order_msg",
    #     current_page=1,
    #     page_size=10
    # )

    # result = handler.get_msg_detail_list("112122263502", "message_center",
    #                                      current_page=1, page_size=10
    #                                      )
コード例 #3
0
                    u'translated_message': u"Where is my product?",
                    u'translated_message_zh': u'\u54EA\u91CC\u662F\u6211\u7684\u4EA7\u54C1\uFF1F'
                }
            }],
            u'state': u'Awaiting your response',
            u'state_id': u'1',
            u'subject': u'Return or Exchange',
            u'sublabel': u'',
            u'transaction_id': u'123456789012345678901234'
        }
    },
    u'message': u''
}

if __name__ == "__main__":
    shop = Shop()
    shop.account = "373756ae5115474c8f0bcba44159194a"
    shop.session = "f5d42d3b104c4043859e09785e573e05"
    shop.owner = "596d75982eac1176e8290607"
    shop.platform = "Wish"
    shop.id = 15183
    shop.site_id = 1

    hanler = WishTicket(shop)

    # result = hanler.list_all_tickets()
    #
    # import json
    # print json.dumps(result, indent=2)