Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
backend_auto
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
邓莹莹
backend_auto
Commits
21650e8c
Commit
21650e8c
authored
Aug 23, 2021
by
edz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
观众分享直播
parent
e186e06d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
70 additions
and
2 deletions
+70
-2
janus_live_request.py
all_backend_api/janus_live_request.py
+9
-2
janus_live_request.yaml
all_backend_api/janus_live_request.yaml
+11
-0
path_setting.py
path_setting.py
+3
-0
test_share_click.py
test_backend_case/janus_live_case/test_share_click.py
+18
-0
share_click.yaml
test_backend_data/janus_live_data/share_click.yaml
+29
-0
No files found.
all_backend_api/janus_live_request.py
View file @
21650e8c
...
@@ -135,6 +135,12 @@ class live_request(BaseRequest):
...
@@ -135,6 +135,12 @@ class live_request(BaseRequest):
def
service_page_live_enter
(
self
,
service_id
):
def
service_page_live_enter
(
self
,
service_id
):
self
.
params
[
"service_id"
]
=
service_id
self
.
params
[
"service_id"
]
=
service_id
return
self
.
api_send
(
self
.
data
[
"service_page_live_enter"
])
return
self
.
api_send
(
self
.
data
[
"service_page_live_enter"
])
#观众分享直播
def
share_click
(
self
,
stream_id
,
share_channel
):
self
.
params
[
"stream_id"
]
=
stream_id
self
.
params
[
"share_channle"
]
=
share_channel
return
self
.
api_send
(
self
.
data
[
"share_click"
])
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
# print(live_request().live_services("745", "4177", "0", "10"))
# print(live_request().live_services("745", "4177", "0", "10"))
...
@@ -148,4 +154,5 @@ if __name__ == '__main__':
...
@@ -148,4 +154,5 @@ if __name__ == '__main__':
print
(
live_request
()
.
add_live_gift
(
"739"
,
"59127"
,
""
,
"4283"
,
"7.45.0"
))
print
(
live_request
()
.
add_live_gift
(
"739"
,
"59127"
,
""
,
"4283"
,
"7.45.0"
))
print
(
live_request
()
.
delete_live_gift
(
"739"
,
"59127"
,
"1"
,
"4283"
,
"7.45.0"
))
print
(
live_request
()
.
delete_live_gift
(
"739"
,
"59127"
,
"1"
,
"4283"
,
"7.45.0"
))
# print(live_request().pop_gift("4271", "59124", "746.0"))
# print(live_request().pop_gift("4271", "59124", "746.0"))
# print(live_request().get_gift( "59124", "746.0"))
# print(live_request().get_gift( "59124", "746.0"))
\ No newline at end of file
print
(
live_request
()
.
share_click
(
'4340'
,
'What'
))
\ No newline at end of file
all_backend_api/janus_live_request.yaml
View file @
21650e8c
...
@@ -172,4 +172,14 @@ service_page_live_enter:
...
@@ -172,4 +172,14 @@ service_page_live_enter:
params
:
params
:
service_id
:
${service_id}
service_id
:
${service_id}
data
:
{}
data
:
{}
json
:
{}
#观众点击直播内美购
share_click
:
method
:
post
url
:
/api/janus/live/share_click
params
:
{}
data
:
stream_id
:
${stream_id}
share_channel
:
${share_channel}
json
:
{}
json
:
{}
\ No newline at end of file
path_setting.py
View file @
21650e8c
...
@@ -724,6 +724,9 @@ DELETEGIFT = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_live_d
...
@@ -724,6 +724,9 @@ DELETEGIFT = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_live_d
M_GET_CHANNEL_STATUS_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"janus_live_request.yaml"
)
M_GET_CHANNEL_STATUS_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"janus_live_request.yaml"
)
M_GET_CHANNEL_STATUS
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/janus_live_data"
,
"m_get_channel_status.yaml"
)
M_GET_CHANNEL_STATUS
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/janus_live_data"
,
"m_get_channel_status.yaml"
)
#观众分享直播
SHARE_CLICK
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/janus_live_data"
,
"share_click.yaml"
)
#观众进入直播间
#观众进入直播间
ENTER_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"live_request.yaml"
)
ENTER_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"live_request.yaml"
)
ENTER
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/live_data"
,
"enter.yaml"
)
ENTER
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/live_data"
,
"enter.yaml"
)
...
...
test_backend_case/janus_live_case/test_share_click.py
0 → 100644
View file @
21650e8c
import
pytest
import
path_setting
from
all_backend_api.janus_live_request
import
live_request
from
ids_list
import
get_ids
from
in_common.base_request
import
BaseRequest
class
TestShareClick
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
SHARE_CLICK
)
share_click_case
,
share_click_data
=
get_ids
(
data
,
"share_click"
)
@pytest.mark.parametrize
(
"param"
,
share_click_data
,
ids
=
share_click_case
)
def
test_share_click
(
self
,
param
):
r
=
live_request
()
.
share_click
(
param
[
"stream_id"
],
param
[
"share_channel"
],)
if
r
[
"error"
]
==
0
:
assert
r
[
"error"
]
==
param
[
"assert"
]
else
:
assert
r
[
"error"
]
==
param
[
"assert"
]
\ No newline at end of file
test_backend_data/janus_live_data/share_click.yaml
0 → 100644
View file @
21650e8c
share_click
:
-
case
:
"
观众分享直播-微信"
url
:
/api/janus/live/share_click
stream_id
:
"
4340"
share_channel
:
"
Wchat"
assert
:
0
-
case
:
"
观众分享直播-朋友圈"
url
:
/api/janus/live/share_click
stream_id
:
"
4340"
share_channel
:
"
WechatMoments"
assert
:
0
-
case
:
"
观众分享直播-qq"
url
:
/api/janus/live/share_click
stream_id
:
"
4340"
share_channel
:
"
QQ"
assert
:
0
-
case
:
"
观众分享直播-微博"
url
:
/api/janus/live/share_click
stream_id
:
"
4340"
share_channel
:
"
Weibo"
assert
:
0
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment