Metadata-Version: 2.1
Name: lolzteam
Version: 1.4.10
Summary: A library that contains all the methods of the Lolzteam API (Market/Forum/Antipublic)
Home-page: https://github.com/AS7RIDENIED/LOLZTEAM
Author: AS7RID
Author-email: as7ridwork@gmail.com
Classifier: Programming Language :: Python :: 3.11
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE

<div align="center">
  <a href="https://zelenka.guru/threads/5523020/">
    <img src="https://i.imgur.com/Vm2tOZh.png" alt="LOLZTEAM API Library" width="80%"/>
  </a>
</div>

## рџљЂ Installation

Install the package using pip:

```shell
pip install LOLZTEAM
```

## рџ’» Usage

Import the required modules and initialize the API clients:

```python
from LOLZTEAM.Client import Forum, Market, Antipublic
from LOLZTEAM.Base import Constants
import asyncio

token = "your_token"

forum = Forum(token=token)
market = Market(token=token)
antipublic = Antipublic(token="Antipublic_key")

# API Client Parameters

# - **token** (str): Your token.
# - **language** (str["ru", "en"]): Language of the API responses.
# - **delay_min** (float): Minimal delay between requests.
# - **proxy** (str): Proxy string.
#     > protocol://ip:port or protocol://login:password@ip:port (socks5://login:password@192.168.1.1:8080 or http://login:password@192.168.1.1:8080)
# - **timeout** (float): Request timeout.


# All following examples also work for Market & Antipublic clients

forum.settings.logger.enable()                                        # рџ“ќ Start logging
# Forum & Market client will log into {user_id}.{Client_name}.log file
# Antipublic client will log into Antipublic.log file
forum.settings.delay.enable()                                         # рџ•’ Enable auto delay (Auto delay is enabled by default for Market & Forum but not for Antipublic)

response = forum.users.get(user_id=2410024)                           # вљЎ Sync request
job = forum.users.get.job(user_id=2410024)                            # рџ“‹ Job creation (Always SYNC)
response = forum.request("GET", "/users/2410024")                     # вљЎ Custom request (You can use full url or just path)
job = forum.request.job("GET", "/users/2410024")                      # рџ“‹ Job creation for custom request

async def async_example():
    response = await forum.users.get(user_id=2410024)                 # вљЎ Async request
    job = forum.users.get.job(user_id=2410024)                        # рџ“‹ Job creation (Always SYNC)
    response = await forum.request("GET", "/users/2410024")           # вљЎ Custom async request
    job = forum.request.job("GET", "/users/2410024")                  # рџ“‹ Job creation for custom request

asyncio.run(async_example())

# You should just add ".job" between function name and parentheses to create a job.
# You can't create a job for methods that are uploading files (like avatar/background) and ofc not for client.batch(...) method.
# P.s Your IDE probably may not show that ".job" function exists but it does, trust me.

forum.settings.token = "token"                                        # рџ”‘ Change token
forum.settings.language = "en"                                        # рџЊЌ Change language (Antipublic client doesn't support language changing)
forum.settings.proxy = "http://login:password@192.168.1.1:8080"       # рџЊђ Change proxy
forum.settings.delay.min = 3                                          # рџ•’ Set minimal delay (E.g. your minimal delay is 3 seconds, but if a method you want to use has a delay of 0.5 seconds, your script will sleep for 3 seconds instead of 0.5 seconds)
forum.settings.delay.disable()                                        # рџ•’ Disable auto delay
forum.settings.logger.disable()                                       # рџ“ќ Stop logging

# You can view all changeable settings in LOLZTEAM/Client/Base/Core.py file
```

## рџ“љ Documentation

### Package Documentation:

### [Forum API Client](https://github.com/AS7RIDENIED/LOLZTEAM/blob/main/LOLZTEAM/Documentation/Forum.md) - [Market API Client](https://github.com/AS7RIDENIED/LOLZTEAM/blob/main/LOLZTEAM/Documentation/Market.md) - [Antipublic API Client](https://github.com/AS7RIDENIED/LOLZTEAM/blob/main/LOLZTEAM/Documentation/Antipublic.md)

### Official API Documentation:

### [Forum API](https://docs.api.zelenka.guru/?forum) - [Market API](https://docs.api.zelenka.guru/?market) - [Antipublic API](https://antipublic.one/docs/?antipublic)
