-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add Video Stream API #7360
Conversation
class VideoStream(db.Model): | ||
"Video Stream or Room" | ||
|
||
__tablename__ = 'video_streams' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Black would make changes.
def query(self, view_kwargs): | ||
query_ = self.session.query(VideoStream) | ||
|
||
if view_kwargs.get('room_id'): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Black would make changes.
|
||
class VideoStreamSchema(Schema): | ||
class Meta: | ||
type_ = 'video-stream' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Black would make changes.
Codecov Report
@@ Coverage Diff @@
## development #7360 +/- ##
===============================================
+ Coverage 64.23% 64.50% +0.27%
===============================================
Files 259 262 +3
Lines 13130 13233 +103
===============================================
+ Hits 8434 8536 +102
- Misses 4696 4697 +1
Continue to review full report at Codecov.
|
98aa8dd
to
40c4b1a
Compare
|
||
class MicrolocationSubVideoStreamFactory(MicrolocationFactoryBase): | ||
event = factory.SubFactory(EventFactoryBasic) | ||
video_stream = factory.SubFactory(VideoStreamFactoryBase) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
redefinition of unused 'video_stream' from line 3
tests/factories/microlocation.py
Outdated
@@ -1,9 +1,11 @@ | |||
import factory | |||
|
|||
from app.models import video_stream |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'app.models.video_stream' imported but unused
room = MicrolocationSubVideoStreamFactory(video_stream=stream) | ||
session = SessionSubFactory(microlocation=room, event=room.event) | ||
if user: | ||
role, _ = get_or_create(Role, name='owner', title_name='Owner') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Black would make changes.
# decorators = (api.has_permission('is_admin', methods="POST"),) | ||
|
||
def before_post(self, args, kwargs, data): | ||
require_relationship(['rooms'], data) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Black would make changes.
40c4b1a
to
4885c65
Compare
Fixes fossasia/open-event-frontend#4886