mirror of
https://github.com/remnawave/python-sdk.git
synced 2026-05-13 12:16:42 +00:00
- Restructured HWID tests into classes for better organization and clarity. - Enhanced subscription tests to cover additional scenarios and improved assertions. - Introduced new tests for system statistics and monitoring. - Implemented CRUD operations for user management with comprehensive test coverage. - Added new controllers and models for handling subscription request history. - Created tests for subscription request history, including pagination and statistics. - Improved error handling in tests to skip when exceptions occur.
34 lines
No EOL
1.1 KiB
Python
34 lines
No EOL
1.1 KiB
Python
from typing import Annotated
|
|
|
|
from rapid_api_client import Query
|
|
|
|
from remnawave.models import (
|
|
GetAllSubscriptionRequestHistoryResponseDto,
|
|
GetSubscriptionRequestHistoryStatsResponseDto,
|
|
)
|
|
from remnawave.rapid import BaseController, get
|
|
|
|
|
|
class SubscriptionRequestHistoryController(BaseController):
|
|
@get("/subscription-request-history", response_class=GetAllSubscriptionRequestHistoryResponseDto)
|
|
async def get_all_subscription_request_history(
|
|
self,
|
|
size: Annotated[
|
|
int, Query(default=25, ge=1, description="Page size for pagination")
|
|
] = 25,
|
|
start: Annotated[
|
|
int, Query(default=0, ge=0, description="Offset for pagination")
|
|
] = 0,
|
|
) -> GetAllSubscriptionRequestHistoryResponseDto:
|
|
"""Get all subscription request history"""
|
|
...
|
|
|
|
@get(
|
|
"/subscription-request-history/stats",
|
|
response_class=GetSubscriptionRequestHistoryStatsResponseDto,
|
|
)
|
|
async def get_subscription_request_history_stats(
|
|
self,
|
|
) -> GetSubscriptionRequestHistoryStatsResponseDto:
|
|
"""Get subscription request history stats"""
|
|
... |