sc-common-interface 3.1.2__tar.gz → 3.1.3__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.
Files changed (17) hide show
  1. {sc_common_interface-3.1.2 → sc_common_interface-3.1.3}/PKG-INFO +1 -1
  2. {sc_common_interface-3.1.2 → sc_common_interface-3.1.3}/sc_common_interface/LiveCommonInterface.py +14 -2
  3. {sc_common_interface-3.1.2 → sc_common_interface-3.1.3}/sc_common_interface.egg-info/PKG-INFO +1 -1
  4. {sc_common_interface-3.1.2 → sc_common_interface-3.1.3}/setup.py +1 -1
  5. {sc_common_interface-3.1.2 → sc_common_interface-3.1.3}/sc_common_interface/CommonOa.py +0 -0
  6. {sc_common_interface-3.1.2 → sc_common_interface-3.1.3}/sc_common_interface/McCommonInterface.py +0 -0
  7. {sc_common_interface-3.1.2 → sc_common_interface-3.1.3}/sc_common_interface/OperaMysql.py +0 -0
  8. {sc_common_interface-3.1.2 → sc_common_interface-3.1.3}/sc_common_interface/OperaRedis.py +0 -0
  9. {sc_common_interface-3.1.2 → sc_common_interface-3.1.3}/sc_common_interface/PostCommonInterface.py +0 -0
  10. {sc_common_interface-3.1.2 → sc_common_interface-3.1.3}/sc_common_interface/ScPulsar.py +0 -0
  11. {sc_common_interface-3.1.2 → sc_common_interface-3.1.3}/sc_common_interface/ScWebsocket.py +0 -0
  12. {sc_common_interface-3.1.2 → sc_common_interface-3.1.3}/sc_common_interface/__init__.py +0 -0
  13. {sc_common_interface-3.1.2 → sc_common_interface-3.1.3}/sc_common_interface.egg-info/SOURCES.txt +0 -0
  14. {sc_common_interface-3.1.2 → sc_common_interface-3.1.3}/sc_common_interface.egg-info/dependency_links.txt +0 -0
  15. {sc_common_interface-3.1.2 → sc_common_interface-3.1.3}/sc_common_interface.egg-info/requires.txt +0 -0
  16. {sc_common_interface-3.1.2 → sc_common_interface-3.1.3}/sc_common_interface.egg-info/top_level.txt +0 -0
  17. {sc_common_interface-3.1.2 → sc_common_interface-3.1.3}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sc_common_interface
3
- Version: 3.1.2
3
+ Version: 3.1.3
4
4
  Summary: SC贴文销售公用的接口
5
5
  Home-page: UNKNOWN
6
6
  Author: river
@@ -644,8 +644,18 @@ def get_channel(data):
644
644
  env = data["env"]
645
645
  headers = data["headers"]
646
646
  platform = data["platform"]
647
+ valid = data.get("valid",True)
647
648
  url = "%s/api/posts/post/sales/multiPlatformChannelList?platformList=%s" % (env, platform.upper())
648
- response = requests.get(url, headers=headers).json()
649
+ response = requests.get(url, headers=headers)
650
+ if response.status_code == 200 and response.json()["code"] == "SUCCESS":
651
+ response = response.json()
652
+ data_list = response["data"]
653
+ for i in data_list:
654
+ validToken = i["validToken"]
655
+ if validToken==valid:
656
+ response = i
657
+ break
658
+ # print(response)
649
659
  return response
650
660
 
651
661
 
@@ -788,7 +798,7 @@ def create_live(data):
788
798
  ],
789
799
  "platformSubType": platformSubType,
790
800
  "platformChannels": [
791
- res["data"][0]
801
+ res
792
802
  ],
793
803
  "startTime": startTime,
794
804
  "endTime": endTime
@@ -981,8 +991,10 @@ def create_live(data):
981
991
  }
982
992
 
983
993
  count = 0
994
+ # print(body)
984
995
  while True:
985
996
  response = requests.post(url, headers=headers, json=body)
997
+ # print(response.json())
986
998
  if response.status_code == 200 and response.json()["code"] == "SUCCESS":
987
999
  sales_id = response.json()["data"]["sales"]["id"]
988
1000
  return sales_id
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sc-common-interface
3
- Version: 3.1.2
3
+ Version: 3.1.3
4
4
  Summary: SC贴文销售公用的接口
5
5
  Home-page: UNKNOWN
6
6
  Author: river
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name='sc_common_interface',
5
- version='3.1.2',
5
+ version='3.1.3',
6
6
  description='SC贴文销售公用的接口',
7
7
  author='river',
8
8
  packages=find_packages(),