ENG
📝 Major Update for PYSCX
🔑 Key Changes:
- **Changed the request building mechanism**
Requests are now built through a builder interface, invoking a method group factory.
- **Changed the token storage mechanism**
Token unpacking algorithms, as well as methods for retrieving tokens from the API object, have been modified.
- **Added custom exceptions for the API**
Exceptions now more fully reflect the nature of the error in the API.
- **Reorganized module structure**
The Server class has been moved to the `http.py` module.
- **Modified the API class**
The API is now the only object, not inheriting from anything, and implements its own logic. At the same time, the HTTP session creation mechanism (in the `http` module) has become more independent.
🛠️ Project Changes:
- **Added pytest tests**
Tests now cover the core functionality of the library.
- **Added usage examples**
You can now learn how to use the library by simply looking at the code!
- **Updated in-code documentation**
The documentation has become more minimalistic and reflects the main essence.
- **Added documentation**
Added documentation to the library, generated via Sphinx and posted on GitHub pages.
✅ Fixes:
- The `FullCharacterInfo` model now correctly parses the `stats` field.
- When dumping models into raw format, `None` values are no longer included in the final result.
- The `CharacterStat` model now correctly parses the `value` field.
- Tokens are now correctly overridden when passed directly to the API method.
**Full changelog**: https://github.com/Oidaho/pyscx/compare/v1.0.0...v1.1.0
---
RU
📝 Крупное обновление PYSCX
🔑 Основные изменения:
- **Изменен механизм построения запросов**
Теперь запросы строятся через интерфейс-билдер, вызывая фабрику групп методов.
- **Изменен механизм хранения токенов**
Алгоритмы распаковки токенов, а также методы получения токенов из объекта API изменены.
- **Добавлены собственные исключения для API**
Теперь исключения более полноценно отражают суть ошибки в API.
- **Реорганизация структуры модулей**
Класс Server перенесен в модуль http.py
- **Изменен класс API**
API является единственным объектом, ни от чего не наследуются и реализует собственную логику. В то же время, механизм создания HTTP сессии (модуль http) стал более самостоятельным.
🛠️ Проектные изменения:
- **Добавлены тесты pytest**
Тесты покрывают основную функциональность библиотеки.
- **Добавлены примеры использования**
Теперь можно узнать, как использовать библиотеку, просто посмотрев на код!
- **Обновлена in-code документация**
Она стала более минималистичной и отражает главную суть.
- **Добавлена документация**
Добавлена документация к библиотеке, сгенерированная через Sphinx и размещенная на GitHub pages.
✅ Исправления:
- Модель FullCharacterInfo теперь корректно парсит поле `stats`.
- При дампе моделей в сырой вид значения `None` не учитываются в итоговом результате.
- Модель CharacterStat теперь корректно парсит поле `value`
- Теперь токены корректно переопределяются при прямой передаче в метод API.
**Полный список изменений**: https://github.com/Oidaho/pyscx/compare/v1.0.0...v1.1.0