-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #140 from Lost-MSth/dev
Update to v2.11.3
- Loading branch information
Showing
31 changed files
with
877 additions
and
209 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,10 @@ | ||
from flask import Blueprint | ||
|
||
from . import (users, songs, token, system, items, | ||
purchases, presents, redeems, characters) | ||
purchases, presents, redeems, characters, multiplay) | ||
|
||
bp = Blueprint('api', __name__, url_prefix='/api/v1') | ||
bp.register_blueprint(users.bp) | ||
bp.register_blueprint(songs.bp) | ||
bp.register_blueprint(token.bp) | ||
bp.register_blueprint(system.bp) | ||
bp.register_blueprint(items.bp) | ||
bp.register_blueprint(purchases.bp) | ||
bp.register_blueprint(presents.bp) | ||
bp.register_blueprint(redeems.bp) | ||
bp.register_blueprint(characters.bp) | ||
l = [users, songs, token, system, items, purchases, | ||
presents, redeems, characters, multiplay] | ||
for i in l: | ||
bp.register_blueprint(i.bp) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from flask import Blueprint, request | ||
|
||
from core.linkplay import RemoteMultiPlayer | ||
|
||
from .api_auth import api_try, request_json_handle, role_required | ||
from .api_code import success_return | ||
|
||
|
||
bp = Blueprint('multiplay', __name__, url_prefix='/multiplay') | ||
|
||
|
||
@bp.route('/rooms', methods=['GET']) | ||
@role_required(request, ['select']) | ||
@request_json_handle(request, optional_keys=['offset', 'limit']) | ||
@api_try | ||
def rooms_get(data, user): | ||
'''获取房间列表''' | ||
|
||
r = RemoteMultiPlayer().get_rooms(offset=data.get( | ||
'offset', 0), limit=data.get('limit', 100)) | ||
return success_return(r) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.