sc-common-interface 2.4.7__tar.gz → 2.4.8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {sc-common-interface-2.4.7 → sc-common-interface-2.4.8}/PKG-INFO +1 -1
- {sc-common-interface-2.4.7 → sc-common-interface-2.4.8}/sc_common_interface/LiveCommonInterface.py +41 -18
- {sc-common-interface-2.4.7 → sc-common-interface-2.4.8}/sc_common_interface.egg-info/PKG-INFO +1 -1
- {sc-common-interface-2.4.7 → sc-common-interface-2.4.8}/setup.py +1 -1
- {sc-common-interface-2.4.7 → sc-common-interface-2.4.8}/sc_common_interface/McCommonInterface.py +0 -0
- {sc-common-interface-2.4.7 → sc-common-interface-2.4.8}/sc_common_interface/Platform.py +0 -0
- {sc-common-interface-2.4.7 → sc-common-interface-2.4.8}/sc_common_interface/PostCommonInterface.py +0 -0
- {sc-common-interface-2.4.7 → sc-common-interface-2.4.8}/sc_common_interface/__init__.py +0 -0
- {sc-common-interface-2.4.7 → sc-common-interface-2.4.8}/sc_common_interface.egg-info/SOURCES.txt +0 -0
- {sc-common-interface-2.4.7 → sc-common-interface-2.4.8}/sc_common_interface.egg-info/dependency_links.txt +0 -0
- {sc-common-interface-2.4.7 → sc-common-interface-2.4.8}/sc_common_interface.egg-info/requires.txt +0 -0
- {sc-common-interface-2.4.7 → sc-common-interface-2.4.8}/sc_common_interface.egg-info/top_level.txt +0 -0
- {sc-common-interface-2.4.7 → sc-common-interface-2.4.8}/setup.cfg +0 -0
{sc-common-interface-2.4.7 → sc-common-interface-2.4.8}/sc_common_interface/LiveCommonInterface.py
RENAMED
|
@@ -282,7 +282,7 @@ def live_search_oa_product(data):
|
|
|
282
282
|
"""
|
|
283
283
|
env = data["env"]
|
|
284
284
|
headers = data["headers"]
|
|
285
|
-
url = "%s/openApi/proxy/v1/products?page=1&per_page=
|
|
285
|
+
url = "%s/openApi/proxy/v1/products?page=1&per_page=50" %env
|
|
286
286
|
type = "spu"
|
|
287
287
|
quantity = 100
|
|
288
288
|
if "type" in data:
|
|
@@ -469,10 +469,8 @@ def create_live(data):
|
|
|
469
469
|
salesOwner = data["salesOwner"]
|
|
470
470
|
if "platform" in data:
|
|
471
471
|
platform = data["platform"]
|
|
472
|
-
|
|
473
472
|
if "patternModel" in data:
|
|
474
473
|
patternModel = data["patternModel"]
|
|
475
|
-
|
|
476
474
|
if "keywordValidInLive" in data:
|
|
477
475
|
keywordValidInLive = data["keywordValidInLive"]
|
|
478
476
|
if "keywordValidAfterLive" in data:
|
|
@@ -583,20 +581,6 @@ def create_live(data):
|
|
|
583
581
|
platformSubType = platform.split("&")[0].upper()
|
|
584
582
|
data["platform"] = "FACEBOOK"
|
|
585
583
|
res = get_channel(data)
|
|
586
|
-
# expireTime = res["data"][0]["expireTime"]
|
|
587
|
-
# expireTimeTimestamp = res["data"][0]["expireTimeTimestamp"]
|
|
588
|
-
# validToken = res["data"][0]["validToken"]
|
|
589
|
-
# validScope = res["data"][0]["validScope"]
|
|
590
|
-
# oneTimeNotifyStatus = res["data"][0]["oneTimeNotifyStatus"]
|
|
591
|
-
# mainChannel = res["data"][0]["mainChannel"]
|
|
592
|
-
# platformChannelAvatar = res["data"][0]["platformChannelAvatar"]
|
|
593
|
-
# platformChannelId = res["data"][0]["platformChannelId"]
|
|
594
|
-
# parentChannelId = res["data"][0]["parentChannelId"]
|
|
595
|
-
# groupId = res["data"][0]["groupId"]
|
|
596
|
-
# platformChannelName = res["data"][0]["platformChannelName"]
|
|
597
|
-
# privacy = res["data"][0]["privacy"]
|
|
598
|
-
# customerAuthLink = res["data"][0]["customerAuthLink"]
|
|
599
|
-
# subscribedStatus = res["data"][0]["subscribedStatus"]
|
|
600
584
|
body = {
|
|
601
585
|
"sales": {
|
|
602
586
|
"title": title,
|
|
@@ -684,8 +668,47 @@ def create_live(data):
|
|
|
684
668
|
}
|
|
685
669
|
}
|
|
686
670
|
}
|
|
671
|
+
elif platform in ("pl","obc"):
|
|
672
|
+
platformSubType = platform.upper()
|
|
673
|
+
platform = "SHOPLINE"
|
|
674
|
+
body = {
|
|
675
|
+
"sales": {
|
|
676
|
+
"title": title,
|
|
677
|
+
"salesOwner": salesOwner,
|
|
678
|
+
"salesDescription": salesDescription,
|
|
679
|
+
"platforms": [
|
|
680
|
+
platform
|
|
681
|
+
],
|
|
682
|
+
"platformChannels": [],
|
|
683
|
+
"startTime": startTime,
|
|
684
|
+
"endTime": endTime,
|
|
685
|
+
"platformSubType":platformSubType
|
|
686
|
+
},
|
|
687
|
+
"salesConfig": {
|
|
688
|
+
"patternModel": {
|
|
689
|
+
"patternModel": patternModel,
|
|
690
|
+
"keywordValidInLive": keywordValidInLive,
|
|
691
|
+
"keywordValidAfterLive": keywordValidAfterLive
|
|
692
|
+
},
|
|
693
|
+
"autoNotifyPay": {
|
|
694
|
+
"enable": autoNotifyPayEnable,
|
|
695
|
+
"message": autoNotifyPayMessage,
|
|
696
|
+
"button": autoNotifyPayButton
|
|
697
|
+
},
|
|
698
|
+
"stock": {
|
|
699
|
+
"lockStock": stockEnable,
|
|
700
|
+
"salesStockLockExpireTime": stockIime
|
|
701
|
+
},
|
|
702
|
+
"lowOfQuantity": {
|
|
703
|
+
"enable": lowOfQuantityEnable,
|
|
704
|
+
"sound": lowOfQuantitySound,
|
|
705
|
+
"quantity": lowOfQuantityQuantity
|
|
706
|
+
}
|
|
707
|
+
},
|
|
708
|
+
"postConfigMap":{}
|
|
709
|
+
}
|
|
687
710
|
response = requests.post(url,headers=headers,json=body).json()
|
|
688
|
-
print(json.dumps(body))
|
|
711
|
+
# print(json.dumps(body))
|
|
689
712
|
print(response)
|
|
690
713
|
sales_id = response["data"]["sales"]["id"]
|
|
691
714
|
return sales_id
|
{sc-common-interface-2.4.7 → sc-common-interface-2.4.8}/sc_common_interface/McCommonInterface.py
RENAMED
|
File without changes
|
|
File without changes
|
{sc-common-interface-2.4.7 → sc-common-interface-2.4.8}/sc_common_interface/PostCommonInterface.py
RENAMED
|
File without changes
|
|
File without changes
|
{sc-common-interface-2.4.7 → sc-common-interface-2.4.8}/sc_common_interface.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{sc-common-interface-2.4.7 → sc-common-interface-2.4.8}/sc_common_interface.egg-info/requires.txt
RENAMED
|
File without changes
|
{sc-common-interface-2.4.7 → sc-common-interface-2.4.8}/sc_common_interface.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|