# Rezka API SDK
[![PyPI Version](https://img.shields.io/pypi/v/rezka_api_sdk.svg)](https://pypi.org/project/rezka_api_sdk/)
[![Python Version](https://img.shields.io/pypi/pyversions/rezka_api_sdk.svg)](https://pypi.org/project/rezka_api_sdk/)
SDK for unofficial Rezka API.
Details about API [at Telegram](https://t.me/aryn_dev/138).
## Installation
You can install `rezka_api_sdk` using pip:
```bash
pip install rezka_api_sdk
```
## Usage
```python
from rezka_api_sdk import RezkaAPI, models
# Init API client
rezka_api = RezkaAPI("<your API key>")
# Get me, returns `models.UserModel`
await rezka_api.get_me()
# Search items, returns `list[SearchResultModel]`
await rezka_api.search("Top Gun: Maverick")
# Get short info about item and available translators, returns `tuple[ShortInfoModel, list[TranslatorInfoModel]]`
await rezka_api.get_info_and_translators("http://hdrezka1tqbbd.org/films/action/47946-top-gan-meverik-2022.html")
# Get direct urls
# NOTE: allowed to pass item's ID or URL
# Acceptable key arguments:
#
# translator_id: int; required;
# is_film: bool; required;
# translator_additional_arguments: dict; required; you can get it from `models.TranslatorInfoModel.additional_arguments`
# For films:
await rezka_api.get_direct_urls(
id = 47946,
translator_id = 56,
is_film = True,
translator_additional_arguments = {}
)
# For series:
await rezka_api.get_direct_urls(
id = 646, # Breaking bad
translator_id = 56,
is_film = False,
translator_additional_arguments = {},
season_id = "1",
episode_id = "1"
)
```
For user-friendly cli see [cli.py](cli.py).
## Stay updated
For the latest news and updates, follow my [Telegram Channel](https://t.me/aryn_dev).
Raw data
{
"_id": null,
"home_page": "https://github.com/arynyklas/rezka_api_sdk",
"name": "rezka-api-sdk",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "rezka, hdrezka, films, series",
"author": "Aryn Yklas",
"author_email": "arynyklas@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/0a/80/e1d15a53f7f0d003f9a252c3597f425d62dc2f5affe69c9e230ad9acf1e1/rezka_api_sdk-0.0.1.post8.tar.gz",
"platform": null,
"description": "# Rezka API SDK\r\n\r\n[![PyPI Version](https://img.shields.io/pypi/v/rezka_api_sdk.svg)](https://pypi.org/project/rezka_api_sdk/)\r\n[![Python Version](https://img.shields.io/pypi/pyversions/rezka_api_sdk.svg)](https://pypi.org/project/rezka_api_sdk/)\r\n\r\nSDK for unofficial Rezka API.\r\nDetails about API [at Telegram](https://t.me/aryn_dev/138).\r\n\r\n\r\n## Installation\r\n\r\nYou can install `rezka_api_sdk` using pip:\r\n\r\n```bash\r\npip install rezka_api_sdk\r\n```\r\n\r\n\r\n## Usage\r\n\r\n```python\r\nfrom rezka_api_sdk import RezkaAPI, models\r\n\r\n# Init API client\r\nrezka_api = RezkaAPI(\"<your API key>\")\r\n\r\n# Get me, returns `models.UserModel`\r\nawait rezka_api.get_me()\r\n\r\n# Search items, returns `list[SearchResultModel]`\r\nawait rezka_api.search(\"Top Gun: Maverick\")\r\n\r\n# Get short info about item and available translators, returns `tuple[ShortInfoModel, list[TranslatorInfoModel]]`\r\nawait rezka_api.get_info_and_translators(\"http://hdrezka1tqbbd.org/films/action/47946-top-gan-meverik-2022.html\")\r\n\r\n\r\n# Get direct urls\r\n# NOTE: allowed to pass item's ID or URL\r\n# Acceptable key arguments:\r\n# \r\n# translator_id: int; required;\r\n# is_film: bool; required;\r\n# translator_additional_arguments: dict; required; you can get it from `models.TranslatorInfoModel.additional_arguments`\r\n\r\n\r\n# For films:\r\nawait rezka_api.get_direct_urls(\r\n id = 47946,\r\n translator_id = 56,\r\n is_film = True,\r\n translator_additional_arguments = {}\r\n)\r\n\r\n\r\n# For series:\r\nawait rezka_api.get_direct_urls(\r\n id = 646, # Breaking bad\r\n translator_id = 56,\r\n is_film = False,\r\n translator_additional_arguments = {},\r\n season_id = \"1\",\r\n episode_id = \"1\"\r\n)\r\n```\r\n\r\nFor user-friendly cli see [cli.py](cli.py).\r\n\r\n\r\n## Stay updated\r\n\r\nFor the latest news and updates, follow my [Telegram Channel](https://t.me/aryn_dev).\r\n",
"bugtrack_url": null,
"license": null,
"summary": "It is a library that allows you to interact with unofficial HDRezka API",
"version": "0.0.1.post8",
"project_urls": {
"Homepage": "https://github.com/arynyklas/rezka_api_sdk"
},
"split_keywords": [
"rezka",
" hdrezka",
" films",
" series"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "0a80e1d15a53f7f0d003f9a252c3597f425d62dc2f5affe69c9e230ad9acf1e1",
"md5": "11c149298fad81d44002cd40024fc5da",
"sha256": "6b8d643811f20b911ff3fb7b6c206d2c18d47b9e4c0599fc1c9990fb766f1d47"
},
"downloads": -1,
"filename": "rezka_api_sdk-0.0.1.post8.tar.gz",
"has_sig": false,
"md5_digest": "11c149298fad81d44002cd40024fc5da",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 4602,
"upload_time": "2024-11-20T18:28:32",
"upload_time_iso_8601": "2024-11-20T18:28:32.725269Z",
"url": "https://files.pythonhosted.org/packages/0a/80/e1d15a53f7f0d003f9a252c3597f425d62dc2f5affe69c9e230ad9acf1e1/rezka_api_sdk-0.0.1.post8.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-20 18:28:32",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "arynyklas",
"github_project": "rezka_api_sdk",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "rezka-api-sdk"
}