feat: Update README and pyproject.toml for version 1.0.4; enhance UsersController with pagination support

This commit is contained in:
Artem 2025-04-24 19:46:48 +02:00
parent adc37ab126
commit 15cfb16c67
No known key found for this signature in database
GPG key ID: 833485276B7902CE
3 changed files with 15 additions and 3 deletions

View file

@ -41,6 +41,7 @@ pip install git+https://github.com/sm1ky/remnawave-api.git
### Dependencies
- `orjson` (>=3.10.15, <4.0.0)
- `rapid-api-client` (==0.6.0)
- `httpx` (>=0.27.2, <0.28.0)
## 🚀 Usage

View file

@ -1,6 +1,6 @@
[project]
name = "remnawave-api"
version = "1.0.3"
version = "1.0.4"
description = "A Python SDK for interacting with the Remnawave API."
authors = [
{name = "Artem",email = "sm1ky@forestsnet.com"}

View file

@ -1,6 +1,6 @@
from typing import Annotated
from rapid_api_client import Path
from rapid_api_client import Path, Query
from rapid_api_client.annotations import PydanticBody
from remnawave_api.models import (
@ -35,8 +35,19 @@ class UsersController(BaseController):
@get("/users/v2", response_class=UsersResponseDto)
async def get_all_users_v2(
self,
size: Annotated[int, Query(100, description="Size of the page")],
start: Annotated[int, Query(0, description="Start index of the page")],
) -> UsersResponseDto:
"""Get All Users"""
"""
Get a paginated list of users.
Args:
size (int): Number of users per page.
start (int): Index to start pagination from.
Returns:
UsersResponseDto: Paginated users list.
"""
...
@patch("/users/revoke/{uuid}", response_class=UserResponseDto)