sc-common-interface 2.3.0__tar.gz → 2.3.1__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.3.0 → sc-common-interface-2.3.1}/PKG-INFO +1 -1
- {sc-common-interface-2.3.0 → sc-common-interface-2.3.1}/sc_common_interface/LiveCommonInterface.py +56 -0
- {sc-common-interface-2.3.0 → sc-common-interface-2.3.1}/sc_common_interface.egg-info/PKG-INFO +1 -1
- {sc-common-interface-2.3.0 → sc-common-interface-2.3.1}/setup.py +1 -1
- {sc-common-interface-2.3.0 → sc-common-interface-2.3.1}/sc_common_interface/Platform.py +0 -0
- {sc-common-interface-2.3.0 → sc-common-interface-2.3.1}/sc_common_interface/PostCommonInterface.py +0 -0
- {sc-common-interface-2.3.0 → sc-common-interface-2.3.1}/sc_common_interface/__init__.py +0 -0
- {sc-common-interface-2.3.0 → sc-common-interface-2.3.1}/sc_common_interface.egg-info/SOURCES.txt +0 -0
- {sc-common-interface-2.3.0 → sc-common-interface-2.3.1}/sc_common_interface.egg-info/dependency_links.txt +0 -0
- {sc-common-interface-2.3.0 → sc-common-interface-2.3.1}/sc_common_interface.egg-info/requires.txt +0 -0
- {sc-common-interface-2.3.0 → sc-common-interface-2.3.1}/sc_common_interface.egg-info/top_level.txt +0 -0
- {sc-common-interface-2.3.0 → sc-common-interface-2.3.1}/setup.cfg +0 -0
{sc-common-interface-2.3.0 → sc-common-interface-2.3.1}/sc_common_interface/LiveCommonInterface.py
RENAMED
|
@@ -291,6 +291,62 @@ def get_merchant_info(data):
|
|
|
291
291
|
currency = "₫"
|
|
292
292
|
return base_country_code,currency,response
|
|
293
293
|
|
|
294
|
+
def delete_broadcast(data):
|
|
295
|
+
env = data["env"]
|
|
296
|
+
headers = data["headers"]
|
|
297
|
+
broadcast_id = data["broadcast_id"]
|
|
298
|
+
url = "%s/admin/api/bff-web/live/broadcast/%s"%(env,broadcast_id)
|
|
299
|
+
response = requests.delete(url,headers=headers).json()
|
|
300
|
+
return response
|
|
301
|
+
|
|
302
|
+
def get_broadcast_list(data):
|
|
303
|
+
env = data["env"]
|
|
304
|
+
headers = data["headers"]
|
|
305
|
+
sales_id = data["sales_id"]
|
|
306
|
+
name = ""
|
|
307
|
+
platform= data["platform"]
|
|
308
|
+
broadcast_id = ""
|
|
309
|
+
pageNum = 1
|
|
310
|
+
pageSize = 12
|
|
311
|
+
if "pageNum" in data:
|
|
312
|
+
pageNum = data["pageNum"]
|
|
313
|
+
if "pageSize" in data:
|
|
314
|
+
pageSize = data["pageSize"]
|
|
315
|
+
if "name" in data:
|
|
316
|
+
name= data["name"]
|
|
317
|
+
url = "%s/admin/api/bff-web/live/broadcast/query"%env
|
|
318
|
+
body = {
|
|
319
|
+
"businessId": "%s"%sales_id,
|
|
320
|
+
"businessType": "LIVE",
|
|
321
|
+
"businessSubType": "LIVE_STREAM",
|
|
322
|
+
"platform": "%s"%platform,
|
|
323
|
+
"pageNum": pageNum,
|
|
324
|
+
"pageSize": pageSize
|
|
325
|
+
}
|
|
326
|
+
reponse = requests.post(url,headers=headers,json=body).json()
|
|
327
|
+
if name !="":
|
|
328
|
+
name_list = jsonpath(reponse,"$..name")
|
|
329
|
+
broadcast_id_list = jsonpath(reponse,"$..id")
|
|
330
|
+
for i,value in enumerate(name_list):
|
|
331
|
+
if value==name:
|
|
332
|
+
broadcast_id =broadcast_id_list[i]
|
|
333
|
+
return broadcast_id,name
|
|
334
|
+
|
|
335
|
+
def get_broadcast_detail(data):
|
|
336
|
+
env = data["env"]
|
|
337
|
+
headers = data["headers"]
|
|
338
|
+
broadcast_id = data["broadcast_id"]
|
|
339
|
+
platform = data["platform"]
|
|
340
|
+
url = "%s/admin/api/bff-web/live/broadcast/detail"%env
|
|
341
|
+
body = {
|
|
342
|
+
"id": "%s"%broadcast_id,
|
|
343
|
+
"platform": "%s"%platform
|
|
344
|
+
}
|
|
345
|
+
response = requests.post(url,headers=headers,json=body).json()
|
|
346
|
+
return response
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
|
|
294
350
|
|
|
295
351
|
|
|
296
352
|
|
|
File without changes
|
{sc-common-interface-2.3.0 → sc-common-interface-2.3.1}/sc_common_interface/PostCommonInterface.py
RENAMED
|
File without changes
|
|
File without changes
|
{sc-common-interface-2.3.0 → sc-common-interface-2.3.1}/sc_common_interface.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{sc-common-interface-2.3.0 → sc-common-interface-2.3.1}/sc_common_interface.egg-info/requires.txt
RENAMED
|
File without changes
|
{sc-common-interface-2.3.0 → sc-common-interface-2.3.1}/sc_common_interface.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|